How to modify loss function in a seq2seq trainer?

Hi,

You can overwrite the Seq2SeqTrainer’s compute_loss method as shown here.