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

Specify the head_size from the config when importing Gemma from Hugging Face. #1148

Closed

Conversation

mfuntowicz
Copy link
Contributor

This fix importing Gemma model from Hugging Face Hub when input and outputs sizes for the attention differs (such as 7b falvour).

The current implementation was inferring the size from the hidden_size but this leads to wrong shape being defined.

This PR fixes this by especially setting the head_size value from GemmaConfig

Needs PR #1147

@mfuntowicz mfuntowicz changed the title Specify the head_size from the config from the Hugging Face. Specify the head_size from the config when importing Gemma from Hugging Face. Feb 23, 2024
@byshiue
Copy link
Collaborator

byshiue commented Mar 4, 2024

@mfuntowicz Thanks very much for your great contribution. The changes will be included in the next main branch update to the GitHub, and we will credit you as co-author. Thanks!

@kaiyux kaiyux mentioned this pull request Mar 5, 2024
@nv-guomingz nv-guomingz closed this Jun 4, 2024
@nv-guomingz nv-guomingz added triaged Issue has been triaged by maintainers Merged labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged triaged Issue has been triaged by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants