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 | |
---|---|---|---|---|
【Solved】How can I get loss by using trainer when training gpt2? | 3 | 909 | July 21, 2022 | |
Extending a GPT2 Model (Dialo) | 0 | 558 | September 9, 2021 | |
Train GPT2 from scratch (Tensorflow) - Loss function | 1 | 2043 | July 21, 2021 | |
Train GPT2 from scratch (Tensorflow) - Loss function issue | 0 | 714 | March 11, 2021 | |
ValueError: The model did not return a loss from the inputs, only the following keys: last_hidden_state, past_key_values. For reference, the inputs it received are input_ids, attention_mask | 3 | 756 | February 16, 2024 |