-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
llama4_vision_rope: add HIP override to accept (q, k) and avoid (positions, q, k) mismatch #26790
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
Merged
Conversation
This file contains hidden or 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
Signed-off-by: Huamin Li <3ericli@gmail.com>
mgoin
approved these changes
Oct 14, 2025
Member
mgoin
left a comment
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.
Looks reasonable to me, thanks
Jonahcb
pushed a commit
to Jonahcb/vllm
that referenced
this pull request
Oct 15, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: Jonah Bernard <jb2528@cornell.edu>
bbartels
pushed a commit
to bbartels/vllm
that referenced
this pull request
Oct 16, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: bbartels <benjamin@bartels.dev>
lywa1998
pushed a commit
to lywa1998/vllm
that referenced
this pull request
Oct 20, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com>
alhridoy
pushed a commit
to alhridoy/vllm
that referenced
this pull request
Oct 24, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com>
xuebwang-amd
pushed a commit
to xuebwang-amd/vllm
that referenced
this pull request
Oct 24, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
xuebwang-amd
pushed a commit
to xuebwang-amd/vllm
that referenced
this pull request
Oct 24, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
0xrushi
pushed a commit
to 0xrushi/vllm
that referenced
this pull request
Oct 26, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
0xrushi
pushed a commit
to 0xrushi/vllm
that referenced
this pull request
Oct 26, 2025
…tions, q, k) mismatch (vllm-project#26790) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
On ROCm/HIP, the base RoPE path expects
(positions, query, key)and, in the fallback branch, callsforward_cuda(positions, query, key). The Llama4‑Vision RoPE implementsforward_cuda(query, key)(2 args), so HIP can pass the wrong arg order or arg count.This PR overrides
forward_hip(query, key)inLlama4VisionRotaryEmbeddingand delegate to the existing native implementation. This keeps the current call siteself.rotary_emb(q, k)working, avoids creatingpositions, and prevents the base class from calling the 3‑arg CUDA path.Test Plan
run with rocm
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.