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 rmsnorm kernel for T5 #89

Closed
pommedeterresautee opened this issue Oct 9, 2022 · 0 comments · Fixed by #90
Closed

Add rmsnorm kernel for T5 #89

pommedeterresautee opened this issue Oct 9, 2022 · 0 comments · Fixed by #90
Assignees
Labels
benchmark Measure, measure, measure performance make things faster, always triton triton kernel / implementation

Comments

@pommedeterresautee
Copy link
Member

pommedeterresautee commented Oct 9, 2022

T5 uses rmsnorm instead of layernorm.
They are both very similar, just there is no centering with the mean.
We may implement both normalization in the same kernel.

Paper: https://arxiv.org/pdf/1910.07467.pdf

HF implementation:
https://github.com/huggingface/transformers/blob/main/src/transformers/models/t5/modeling_t5.py#L239

Perf discussion:
pytorch/pytorch#72643
huggingface/transformers#14656

@pommedeterresautee pommedeterresautee changed the title Add rmsprop fir t5 Add rmsprop kernel for t5 Oct 9, 2022
@pommedeterresautee pommedeterresautee changed the title Add rmsprop kernel for t5 Add rmsnorm kernel for T5 Oct 9, 2022
@pommedeterresautee pommedeterresautee self-assigned this Oct 9, 2022
@pommedeterresautee pommedeterresautee added benchmark Measure, measure, measure optimization triton triton kernel / implementation performance make things faster, always and removed performance make things faster, always optimization labels Oct 9, 2022
@pommedeterresautee pommedeterresautee added this to the release v0.1.0 milestone Oct 9, 2022
@pommedeterresautee pommedeterresautee added the performance make things faster, always label Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Measure, measure, measure performance make things faster, always triton triton kernel / implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant