Pavan Kandru
Pavan Kandru

Reputation: 51

Adding start token while generating with MT5

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.

Upvotes: 1

Views: 213

Answers (0)

Related Questions