Encoder-decoder model is not working correctly for the latest versions
See original GitHub issueSystem Info
transformers==4.2.1
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- [] An officially supported task in the
examples
folder (such as GLUE/SQuAD, …) - [X ] My own task or dataset (give details below)
Reproduction
Hi,
I’m working with a seq2seq problem, in particular with EncoderDecoderModel
model. The problem is that I can’t have good results with the latest version (4.21.3). I also tried with 4.18.0 because of this but didn’t work either. It is however working when using version 4.2.1
I have made an public notebook you can run to see the issue. Is an example to train a model to generate the written digits, given a number.
Expected behavior
You works nicely with version 4.2.1, but very bad with the most recent versions.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Encoder Decoder Models - Hugging Face
The EncoderDecoderModel can be used to initialize a sequence-to-sequence model with any pretrained autoencoding model as the encoder and any pretrained ...
Read more >LSTM encoder decoder model training errors: ValueError
My LSTM Encoder Decoder model takes 2 input as sequence: items and item-types ... Last dense layer calculates probability of purchase of 129 ......
Read more >How to Develop an Encoder-Decoder Model for Sequence-to ...
How to correctly define a sophisticated encoder-decoder model in Keras ... I had the same problem, and updated Keras (to version 2.1.2) and ......
Read more >Encoder-Decoder Seq2Seq Models, Clearly Explained!!
The Encoder-Decoder architecture is relatively new and had been ... problems for which modified versions of this RNN architecture are used.
Read more >10.7. Encoder-Decoder Seq2Seq for Machine Translation
In so-called seq2seq problems like machine translation (as discussed in Section ... one token at a time, the decoder model, consisting of a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey! Sorry not yet, it’s pretty tricky, but I hope I’ll resolve it soon! 🤗
Hey @miguelwon it seems that you are right about the training not converging at all using current version. However, since loading a trained model in the new versions does not give bad results, I suspect that the issue comes from either the computation of the loss, or the trainer.
I will have a look in more details as I believe this is a pretty important bug 😄