Can we force first token by model.config.forced_bos_token_id?
I am using mbart-large-cc25 (MBartForConditionalGeneration) model to finetune it for multi-lingual tasks.To evaluate the model, I need the model to generate translations for specific target language each time. How can we force the bos token for mbart?I know that we can usemodel.generatewithforced_bos_token_idbut this is way too slow compared to just forward computing withmodel(**inputs). So I tried to set the forced_token_id bymodel.config.forced_bos_token_id=[lang_id]once I load a model… but it seems that the model starts generation with a random token regardless.How can we make the model do the forward computing with forced bos token, without usingmodel.generate?