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

ENH: Add default target layers for gemma2 architecture #2078

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BenjaminBossan
Copy link
Member

Google's gemma 2 models have a slightly different architecture than gemma 1 and thus a different model_type attribute. This PR adds default target_layers for gemma 2 that correspond to the default target_layers of gemma 1.

Google's gemma 2 models have a slightly different architecture than
gemma 1 and thus a different model_type attribute. This PR adds default
target_layer for gemma 2 that correspond to the default target_layer of
gemma 1.
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! Left a comment

Comment on lines 74 to +75
"gemma": ["input_layernorm", "post_attention_layernorm", "norm"],
"gemma2": ["input_layernorm", "norm"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it normal that they are not the same since you said that it was the same layers as gemma1 in the description of the PR.

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 this pull request may close these issues.

3 participants