-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
T5 model: There were missing keys in the checkpoint model loaded: ['encoder.embed_tokens.weight', 'decoder.embed_tokens.weight', 'lm_head.weight']. #27972
Comments
cc @muellerzr @pacman100 as the warning seems to be coming from trainer |
I also get with run_summarizaton.py and
But fine-tuning continues from the last checkpoint rather than crashing. However, |
Related to #27293 |
@muellerzr thanks for linking to the issue. But the solution mentioned there is for |
Facing the same issue for all T5 as well as RoBERTa models. Any solution yet? |
@muellerzr and @pacman100 - it's slightly concerning that this warning still appears. Is there any understanding of what transformers release guarantees correct checkpoint saving & loading? I have (natively) used the library to implement my next research paper, but I don't know whether or not I can actually use any of the models given the warning on model loading? Let's chat and see how we can get to the bottom of this. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
also, I had a similar issue with training the Bart model for abstractive-based text summarization. |
I'm facing a similar warning with
I'm saving with
and loading with
I have encountered several times that setting |
+1 here on January 31, 2025. |
Closed? Im facing this issue as well.. |
+2 here on Feb. 24, 2025. |
System Info
transformers
version: 4.35.2Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Steps to reproduce.
Salesforce/codet5p-220m
but the issue can probably be reproduced with other T5 models (certainly FlanT5)restart_from_chekpoint=True
CLI option and settingoutput_dir
to be the checkpoint directory (ie where thecheckpoint-[step]
directories are created)[WARNING|trainer.py:2231] 2023-12-12 11:09:58,921 >> There were missing keys in the checkpoint model loaded: ['encoder.embed_tokens.weight', 'decoder.embed_tokens.weight', 'lm_head.weight'].
Expected behavior
Either there is no warning or the warning message tells the user if the warning applies to them. My intuition here is that nothing is wrong: I am using
T5ForConditionlGeneration
out of the box (so nolm_head
) and the encoder and decoder enmbedings are tied (and hopefully loaded ?!). Is this a case of extending the warning to be more explicit?@younesbelkada
The text was updated successfully, but these errors were encountered: