Fine-tuning mBART

Hello!

Is it possible to use OpenNMT-py or OpenNMT-tf to fine-tune mBART for machine translation?

Thanks!
Yasmin

1 Like

IIRC mBART is fairseq-based. You would have to write some custom code to load/convert the weights. And maybe adapt some of the layers. I think they added a few additional layers after the traditional transformer encoder/decoder also.

All of this should not be very difficult to add, but is not implemented as of now. We would gladly welcome some contributions around this though.

2 Likes

Hello,

To accomplish this, is there an example somewhere to use as reference?

Dear Samuel,

Yes, you can check this:

https://tmramalho.github.io/science/2020/06/10/fine-tune-neural-translation-models-with-mBART/

You can also use Hugging Face Transformers for fine-tuning mBART, OPUS models, among others.

Kind regards,
Yasmin

Hi Yasmin.

Thanks for sharing these useful links.

I was wondering if anyone has any experience doing fine-tuning of the MBART on a new language pair/ adding a new language either in the src or trg side?

Thank you.

Shamus

Dear Shamus,

Most likely, you will need to integrate back-translation after the initial fine-tuning step. See these papers.

Kind regards,
Yasmin