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

Fix gemma rms_normalization's use of epsilon #1472

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

cpsauer
Copy link
Contributor

@cpsauer cpsauer commented Feb 27, 2024

Hi wonderful Keras folks,

I was browsing the new Gemma source and noticed that the RMSNorm code didn't use the epsilon parameter it takes in. This fixes that.

While we're here, I'm curious what drove the 1+scale multiplier (instead of just initializing scale to 1). Would love to learn if you're down to share.

Thanks,
Chris
(ex-Googler)

Hi wonderful Keras folks,

I was browsing the new Gemma source and noticed that the RMSNorm code didn't use the epsilon parameter it takes in. This fixes that.

While we're here, I'm curious what drove the 1+scale multiplier (instead of just initializing scale to 1). Would love to learn if you're down to share.

Thanks,
Chris
(ex-Googler)
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Thanks and looks good to me. I don't actually know why 1 + scale was chosen and I'd love to know myself. If I learn will let you know!

@cpsauer
Copy link
Contributor Author

cpsauer commented Feb 28, 2024

Thanks, Matt! Glad I'm not the only one curious.
(Also, looked you up on linkedin and it looks like we took similar academic tracks. Go Stanford :)

@mattdangerw mattdangerw merged commit 81de50a into keras-team:master Feb 28, 2024
6 checks passed
abuelnasr0 pushed a commit to abuelnasr0/keras-nlp that referenced this pull request Apr 2, 2024
Hi wonderful Keras folks,

I was browsing the new Gemma source and noticed that the RMSNorm code didn't use the epsilon parameter it takes in. This fixes that.

While we're here, I'm curious what drove the 1+scale multiplier (instead of just initializing scale to 1). Would love to learn if you're down to share.

Thanks,
Chris
(ex-Googler)
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.

2 participants