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

GPTNeo: importing model with padded vocab size should truncate wte #11078

Closed
leogao2 opened this issue Apr 6, 2021 · 0 comments · Fixed by #11079
Closed

GPTNeo: importing model with padded vocab size should truncate wte #11078

leogao2 opened this issue Apr 6, 2021 · 0 comments · Fixed by #11079
Assignees

Comments

@leogao2
Copy link
Contributor

leogao2 commented Apr 6, 2021

Environment info

  • transformers version: latest from master

Who can help

@LysandreJik

Information

Model I am using (Bert, XLNet ...): GPTNeo

Script: https://github.com/huggingface/transformers/blob/master/src/transformers/models/gpt_neo/convert_gpt_neo_mesh_tf_to_pytorch.py

Some GPTNeo models are trained with a vocab size greater than the actual used vocab size (i.e 50304 in config when the actual vocab size is 50257) where all tokens after the first i.e 50257 are unused. These models cannot currently be converted using the script because there is no way to cut the extra embeddings out of wte.

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

Successfully merging a pull request may close this issue.

2 participants