-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
ggml : unify rope norm/neox #7634
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
ggml
changes relating to the ggml tensor library for machine learning
label
May 30, 2024
No. ChatGLM now uses NEOX-style rope with position ids specified. |
ggerganov
changed the title
ggml : unify rope norm/neox (CPU)
ggml : unify rope norm/neox
May 30, 2024
ggerganov
force-pushed
the
gg/rope-refactor
branch
from
May 30, 2024 11:06
4739018
to
814d57d
Compare
github-actions
bot
added
testing
Everything test related
Nvidia GPU
Issues specific to Nvidia GPUs
Vulkan
Issues specific to the Vulkan backend
examples
SYCL
https://en.wikipedia.org/wiki/SYCL - GPU programming language
labels
May 30, 2024
github-actions
bot
added
python
python script changes
Kompute
https://github.com/KomputeProject/kompute/
labels
May 30, 2024
ggerganov
force-pushed
the
gg/rope-refactor
branch
from
May 30, 2024 11:44
0b564b0
to
6ebee16
Compare
mofosyne
added
Review Complexity : High
Generally require indepth knowledge of LLMs or GPUs
refactoring
Refactoring
labels
May 30, 2024
slaren
reviewed
Jun 2, 2024
ggml-ci
ggerganov
force-pushed
the
gg/rope-refactor
branch
from
June 2, 2024 17:09
4b1e676
to
ddac1ef
Compare
joeatodd
added a commit
that referenced
this pull request
Jun 13, 2024
As per: #7634 Signed-off-by: Joe Todd <joe.todd@codeplay.com>
4 tasks
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
examples
ggml
changes relating to the ggml tensor library for machine learning
Kompute
https://github.com/KomputeProject/kompute/
Nvidia GPU
Issues specific to Nvidia GPUs
python
python script changes
refactoring
Refactoring
Review Complexity : High
Generally require indepth knowledge of LLMs or GPUs
SYCL
https://en.wikipedia.org/wiki/SYCL - GPU programming language
testing
Everything test related
Vulkan
Issues specific to the Vulkan backend
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The RoPE modes NORM and NEOX are technically the same but simply operate on different pairs of dimensions in the head:
However, on
master
the 2 implementations are quite different due to legacy reasons:This PR will normalize the implementation in the 2 modes to make changes in the future easier.
We also remove support for xPos RoPE (ggerganov/ggml#442) since it does not seem to be used
I've also considered removing the GLM mode, but it seems to be used by ChatGLM (ggerganov/ggml#477)
@li-plus Could you confirm if GLM RoPE is still relevant today?
TODO
n_ctx
argumentfreq_factors
n_dims
argument for partial rotationn_orig_ctx
->n_ctx_orig