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

feat: refactor rms_norm for ascend speed #69

Merged
merged 8 commits into from
Apr 2, 2024
Merged

Conversation

POI-WX
Copy link
Collaborator

@POI-WX POI-WX commented Apr 2, 2024

Refactor rms norm.

@POI-WX POI-WX changed the title feat: refactor rms_norm feat: refactor rms_norm for ascend speed Apr 2, 2024
else input_dtype
)
inv_rms = torch.empty(
hidden_states.shape[:-1] + (1,),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
hidden_states.shape[:-1] + (1,),
list(hidden_states.shape)[:-1] +[1]

@yangbofun yangbofun merged commit 07ccdc9 into main Apr 2, 2024
4 checks passed
@yangbofun yangbofun deleted the wx/refactor_rms_norm branch April 2, 2024 09:11
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