Skip to content
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

Missing keys in state-dict when loading model from checkpoint #1

Open
joshbarua opened this issue Jun 15, 2023 · 2 comments
Open

Missing keys in state-dict when loading model from checkpoint #1

joshbarua opened this issue Jun 15, 2023 · 2 comments

Comments

@joshbarua
Copy link

While loading the state_dict from checkpoint['model_state_dict'] on line 89 in label.py, I got the following error:

RuntimeError: Error(s) in loading state_dict for DataParallel:
Missing key(s) in state_dict: "module.bert.embeddings.position_ids".

I downloaded the checkpoint file directly from the google drive folder here. Would setting strict=False when loading the state_dict significantly hurt performance? Thank you for your help.

@fepegar
Copy link

fepegar commented Jun 21, 2023

I've got this error too.

@saahil9jain
Copy link
Collaborator

Just following up here, were you using the same version specified in the requirements.txt?

If not, curious what your fix was (along with the version)! Appreciate it, thanks for the patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants