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

bug -object has no attribute 'lm_head'- #91

Open
LeonardRanaldi opened this issue Jun 6, 2023 · 2 comments
Open

bug -object has no attribute 'lm_head'- #91

LeonardRanaldi opened this issue Jun 6, 2023 · 2 comments

Comments

@LeonardRanaldi
Copy link

I am testing the BioGPT model with your visualizer. After completing the configuration, I have the following bug: AttributeError: 'BioGptForCausalLM' object has no attribute 'lm_head'

@jalammar
Copy link
Owner

"lm_head" is a hardcodeed name of the layer at the end of the model. It likely has a different name in bioGPT

@jalammar
Copy link
Owner

jalammar commented Jun 28, 2023

In your local version of the code, try replacing self.model.lm_head here:

'lm_head': self.model.lm_head,

It seems BioGPT uses the name self.model.output_projection. Try using it instead of self.model.lm_head

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

2 participants