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

Add partial RMSnorm "pRMSNorm" variation #153

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

gkielian
Copy link
Collaborator

This was described in the RMSNorm paper as being able to accomplish the same task as RMSNorm usually with only performing calculations on the first 6% of entries.

This is because the average of the RMSNorm changes more slowly the more items are added, and the RMSNorm authors noted that the tokens they measured had around the same value.

This was described in the RMSNorm paper as being able to accomplish the
same task as RMSNorm usually with only performing calculations on the
first 6% of entries.

This is because the average of the RMSNorm changes more slowly the more
items are added, and the RMSNorm authors noted that the tokens they
measured had around the same value.
Add variation of pRMSNorm that simply sets a max number of tokens to
utilize for the RMSNorm normalization.

This should be much easier to implement in hardware.
@klei22 klei22 self-assigned this Apr 19, 2024
@gkielian gkielian marked this pull request as ready for review April 19, 2024 04:23
@klei22
Copy link
Collaborator

klei22 commented Apr 19, 2024

Looks good

@klei22 klei22 merged commit 3e592a5 into ReaLLMASIC:master Apr 19, 2024
5 checks passed
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