-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[GPTNeoX
] Faster rotary embedding for GPTNeoX (based on llama changes)
#25830
Conversation
The documentation is not available anymore as the PR was closed or merged. |
GPTNeoX
] Faster rotary embedding for GPTNeoX (based on llama changes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
Only question is about the dtype casting in Idefics. Could you run slow tests and some checks on the effects of the model outputs when rope scaling is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (and nice touch adding the copied from!)
cc @StellaAthena FYI, this PR should greatly speed up the ROPE embeddings of the GPTNeoX model, similarly to how it was done for the LLaMa model. Let us know if you want to review/have any comments! |
cc @Narsil as this touches buffers that will no longer be persistent, will wait for you in case this is conflicting with TGI? |
…rs into improve-gpt-neox
…rs; branch 'main' of github.com:huggingface/transformers into improve-gpt-neox
…es) (huggingface#25830) * Faster rotary embedding for GPTNeoX * there might be un-necessary moves from device * fixup * fix dtype issue * add copied from statements * fox copies * oupsy * add copied from Llama for scaled ones as well * fixup * fix * fix copies
…es) (huggingface#25830) * Faster rotary embedding for GPTNeoX * there might be un-necessary moves from device * fixup * fix dtype issue * add copied from statements * fox copies * oupsy * add copied from Llama for scaled ones as well * fixup * fix * fix copies
What does this PR do?
Fixes #25813 which indicates that ROPE is slow. It's a follow up of #22785, were ROPE was improved for Llama model.