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

lm_head.weight in convert_opt_checkpoint.py #36

Open
quaternior opened this issue Oct 31, 2024 · 0 comments
Open

lm_head.weight in convert_opt_checkpoint.py #36

quaternior opened this issue Oct 31, 2024 · 0 comments

Comments

@quaternior
Copy link

Hello authors, I would like to express my gratitude for thecontributions you've made.
I read convert_opt_checkpoint.py, and I found the code as below.

    item['lm_head.weight'] = model.state_dict()['model.decoder.embed_tokens.weight']
    item['final_layer_norm.weight'] = model.state_dict()['model.decoder.final_layer_norm.weight']
    item['final_layer_norm.bias'] = model.state_dict()['model.decoder.final_layer_norm.bias']

Since the key is 'lm_head.weight', shouldn't it be read as the key for 'lm_head.weight' in the model as well?
Thanks!

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

1 participant