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

NPU adaption for RMSNorm #10534

Merged
merged 5 commits into from
Jan 16, 2025
Merged

NPU adaption for RMSNorm #10534

merged 5 commits into from
Jan 16, 2025

Conversation

leisuzz
Copy link
Contributor

@leisuzz leisuzz commented Jan 11, 2025

What does this PR do?

Added NPU RMSNorm function to get the better performance for NPU devices

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@leisuzz
Copy link
Contributor Author

leisuzz commented Jan 11, 2025

@sayakpaul Please take a look at this PR, thanks for your help!

@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
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@yiyixuxu yiyixuxu requested a review from hlky January 13, 2025 20:30
Copy link
Collaborator

@hlky hlky left a comment

Choose a reason for hiding this comment

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

Thanks @leisuzz. Would be nice to check the numerical accuracy of this when we start adding NPU to CI.

@leisuzz
Copy link
Contributor Author

leisuzz commented Jan 13, 2025

Hi @hlky, I've already checked the accuracy of the npu RMSnorm. It didn't affect the accuracy of the result (loss are the same between the two methods in NPU).

@hlky
Copy link
Collaborator

hlky commented Jan 15, 2025

That's great, thanks for checking @leisuzz.

@yiyixuxu yiyixuxu merged commit cecada5 into huggingface:main Jan 16, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants