Error in Seq2SeqTrainingArguments
I am training a simple encoder-decoder transformer model on a text-to-text translation task. I am usingSeq2SeqTrainingArgumentsclass. It works fine when I am not using thelabel_smoothingargument. When I addlabel_smoothing=0.1, I get the following error:ValueError                                Traceback (most recent call last)
Cell In[29], line 81
     74 trainer = MySeq2SeqTrainer(
     75   model=model,
     76   args=trainer_args,
     77   train_dataset=train_dataset,
     78   eval_dataset=dev_dataset
     79 )
-> 81 trainer.train()

File /data/envs/hugface/lib/python3.8/site-packages/transformers/trainer.py:1501, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)
   1496     self.model_wrapped = self.model
   1498 inner_training_loop = find_executable_batch_size(
   1499     self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size
   1500 )
-> 1501 return inner_training_loop(
   1502     args=args,
   1503     resume_from_checkpoint=resume_from_checkpoint,
   1504     trial=trial,
   1505     ignore_keys_for_eval=ignore_keys_for_eval,
   1506 )

File /data/envs/hugface/lib/python3.8/site-packages/transformers/trainer.py:1749, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)
...
    return forward_call(*input, **kwargs)
  File "/data/envs/hugface/lib/python3.8/site-packages/transformers/models/bert/modeling_bert.py", line 966, in forward
    raise ValueError("You have to specify either input_ids or inputs_embeds")
ValueError: You have to specify either input_ids or inputs_embedsI am not able to figure out what is causing this issue.
2022-12-12T17:55:11Z
Hi! The parameter name islabel_smoothing_factor, can you try and see if that works?
2022-12-12T20:15:05Z
Sorry, it was a typo. I have setlabel_smoothing_factoronly.
2023-05-30T05:06:53Z
Shreeshail:I am training a simple encoder-decoder transformer model on a text-to-text translation task. I am usingSeq2SeqTrainingArgumentsclass. It works fine when I am not using thelabel_smoothingargument. When I addlabel_smoothing=0.1, I get the following error:I met the same issue, have your resolved it?