Closed alecoutre1 closed 3 years ago
Hey @alecoutre1 I think this was fixed very recently.
I cannot reproduce your error on master -> could you try to pip install the master version and see if the error persists?
pip install git+https://github.com/huggingface/transformers
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.
Environment info
transformers
version: 4.0.1Using distributed or parallel set-up in script?: No
@patrickvonplaten
Description
I am having issues to reload a saved mt5 model when the token embedding has been resized. This error doesn't appear with the t5 model. I receive the following error :
Error(s) in loading state_dict for MT5ForConditionalGeneration: size mismatch for lm_head.weight: copying a param with shape torch.Size([250112, 768]) from checkpoint, the shape in current model is torch.Size([250102, 768]).
Is there something different between the models that I am missing ?
To reproduce :