"compute_loss" function

as shown in here in Huggingface documentation, Fine-tuning with custom datasets — transformers 4.7.0 documentation