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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RMS Norm layer #128713

Open
PraNavKumAr01 opened this issue Jun 14, 2024 · 2 comments
Open

Add RMS Norm layer #128713

PraNavKumAr01 opened this issue Jun 14, 2024 · 2 comments
Labels
module: norms and normalization triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@PraNavKumAr01
Copy link

馃殌 The feature, motivation and pitch

Hey team, i love building things from scratch, and as i was implementing the LLaMa paper by meta obviously using pytorch i saw that pytorch did not have a nn.rmsnorm function for RMS Normalization layer . I did end up implementing it on my own, but i still feel like RMS Normalization being used in mutliple other new language models, LLaMa being the most popler one, needs to be implemented in Pytorch and should be a part of it.

Alternatives

There are many other normalization layer functions already in pytorch, but as results show, RMS Norm has been really impactful in the success of LLaMa, so i think the community might benefit with it being in pytorch

Additional context

Also, ive been using pytorch for a long time and ive always build things from scratch, and it has always been on my todo list to contribute to pytorch, i feel like this might be it.

@vadimkantorov
Copy link
Contributor

vadimkantorov commented Jun 15, 2024

Related:

I think, this layer was recently added in PyTorch, but not in a fused/optimized version yet

@ezyang ezyang added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: norms and normalization labels Jun 15, 2024
@PraNavKumAr01
Copy link
Author

@vadimkantorov Oh gotcha, maybe ill read through that thread and work on the optimization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: norms and normalization triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants