Adding start token while generating with MT5

194 views Asked by At

I've a specific use case for generating text using mT5 model provided by huggingface. I need to be able to control the language in which text is generated. I tried adding prefixes to encoder input but the model is always generating text in English. Is there a way to add a prefix to decoder input so that I can use the decoder prefix to control the language of generated text. I am using model.generate() function to generate text.

0

There are 0 answers