Hugging Face Forums
How to modify loss function in a seq2seq trainer?
🤗Transformers
nielsr
August 31, 2024, 8:36am
2
Hi,
You can overwrite the Seq2SeqTrainer’s compute_loss method as shown
here
.
show post in topic
Related topics
Topic
Replies
Views
Activity
Custom trainer does not work on multiple GPUs
🤗Transformers
1
1430
December 21, 2021
Having troubel in understanding what loss is currently in use
Beginners
1
775
November 24, 2023
Use custom loss function for training ML task
Beginners
2
7206
March 17, 2022
Specify Loss for Trainer / TrainingArguments
🤗Transformers
5
21848
October 5, 2021
Custom Training Loss Function for Seq2Seq BART
Beginners
1
1745
July 21, 2023