Hi,
I’m fine-tuning an mt5 model for my task; after training, I got an error when I wanted to save my PyTorch model with model.save_pretrained(save_directory) command. The error is:
   1051         if self._keys_to_ignore_on_save is not None:
   1052             for ignore_key in self._keys_to_ignore_on_save:
-> 1053                 del state_dict[ignore_key]
   1054 
   1055         # If we save using the predefined names, we can load using `from_pretrained`

KeyError: 'encoder\\.embed_tokens\\.weight'

Does anybody know why this happened?