You can simply overwrite the Trainer loss: Specify Loss for Trainer / TrainingArguments - #2 by nielsr