Currently I am finetuning
transformers T5 model for translation task. As part of the dataset, I am given sentences in Japanese, their translation to English, and for every English sentence I am also given a few (English) words which need to be in the translated sentence.
Is there a way to modify the
Seq2SeqTrainer and the loss being used in order to penalize the model (while training) for not including the given words in the translated sentence?