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.
Asked
Active
Viewed 133 times
1

Beso
- 1,176
- 5
- 12
- 26

Pavan Kandru
- 51
- 3