examples/legacy/seq2seq/seq2seq_trainer.py/Seq2SeqTrainer/compute_loss
class Seq2SeqTrainer:    def compute_loss(self, model, inputs):
        labels = inputs.pop("labels")
        loss, _ = self._compute_loss(model, inputs, labels)
        return loss