New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: You have to specify either decoder_input_ids or decoder_inputs_embeds Transformers Translation Tutorial Repro #24254
Comments
Hello there @gante ! Thanks for your quick response and help ! In fact, the _tokenized_books (cell 16) returns something in the form of
And data_collator (cell 19) returns something like
Am I missing something from the video that should be in code ? My apologies in advance for the extremely notebook verbose code regarding GPU low level operation use. I am trying to optimize for that therefore all trace. Thanks so so much for your time on this |
Hey @SoyGema 👋 Your For future reference in case you encounter further bugs, have a look at our complete translation example: https://github.com/huggingface/transformers/blob/main/examples/tensorflow/translation/run_translation.py |
Hello there @gante 👋 Thanks for the reference. I'm definetly having this as a north script and also using it ! I'm closing this issue (as it is solved but other arised )and probably open another ones in my own repo as it goes so issues are unitary-structured . Hope this makes sense. Hope I can take it from there and not disturb you! Thanks again! |
Just for Reproducibility. If someone wants to go through the script example. Documentation about flag configuration and more can be found here |
System Info
Context
Hello There!
First and foremost, congrats for Transformers Translation tutorial. 👍
It serves as a Spark for building english-to-many translation languages models!
I´m following it along with TF mostly reproducing it in a jupyter Notebook with TF for mac with GPU enabled
Using the following dependency versions.
* NOTE : tensorflow-macos dependencies are fixed for ensuring GPU training
Who can help?
@ArthurZucker @younesbelkada
@gante maybe?
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Issue Description
Im finding the following error when fitting the model for finetunning a model coming from TFAutoModelForSeq2SeqLM autoclass
It is returning
Backtrace
Tried:
Remove callbacks : The model is trained, but of course not loaded into the Hub, nor the metrics computed
Followed Loading from AutoModel gives ValueError: You have to specify either decoder_input_ids or decoder_inputs_embeds #16234 , this comment and ensured that Im using AutoTokenizer. This glimpsed that this could be related to TFAutoModelForSeq2SeqLM .
Seems to be working correctly. Therefore I assume that the pre-trained model is loaded
save_strategy=no
argument in PushToCallBack , but the error persistedExpected behavior
Model trained should be uploaded to the Hub.
The folder appears empty , there is an error
Hypothesis
At this point, what Im guessing is that once I load the model I shall redefine the verbose error trace?
Any help please of how to do this ? :) or how can I fix it ? Do I have to define a specific Trainer ? Any idea of where I can find this in docs?
The text was updated successfully, but these errors were encountered: