I have a question concerning training GPT2DoubleHeadsModel, in my setting only mc_labels is provided, and I want to train it with multiple choice loss, but I get : The model did not return a loss from the inputs, only the following keys: mc_loss,logits,mc_logits,past_key_values. For reference, the inputs it received are input_ids,attention_mask,mc_labels,mc_token_ids. Is there a way to train the model with trainer API under this circumstance?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Key Error 'loss' while fine tuning GPT-2 with the Trainer utility | 9 | 7470 | May 10, 2022 | |
Newbie Understanding GPT2 loss | 1 | 5115 | March 12, 2023 | |
Finetuning GPT2 with user defined loss | 56 | 16096 | July 23, 2023 | |
Api and parameters change from transofrmers 2.5.1 to 3.5.1 for GPT2 | 0 | 239 | January 4, 2021 | |
Generate desired text output based on model training | 3 | 307 | December 17, 2024 |