Skip to content

[Attention] Clean up iRoPE in V1 #21188

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

Conversation

LucasWilkinson
Copy link
Collaborator

@LucasWilkinson LucasWilkinson commented Jul 18, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

With 89cab4d we can actually entirely remove the concept of iRoPE from V1 backends.

Test Plan

lm eval checks; maybe someone with access to a TPU could help me test that? otherwise the change seems simple enough

Test Result

VLLM_ATTENTION_BACKEND=FLASH_ATTN python -m lm_eval --model vllm --model_args pretrained=/home/lwilkinson/local_models/meta-llama--Llama-4-Scout-17B-16E-Instruct,tensor_parallel_size=2,gpu_memory_utilization=0.8,trust_remote_code=True,max_model_len=16384 --tasks ruler --limit 100 --batch_size auto --output_path ./test_fixed_flashinfer.json
...
|Groups|Version|Filter|n-shot|Metric|   |Value |   |Stderr|
|------|------:|------|------|-----:|---|-----:|---|------|
|ruler |      1|none  |      |  4096|↑  |0.9527|±  |   N/A|

(Optional) Documentation Update

Signed-off-by: Lucas Wilkinson <[email protected]>
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added v1 tpu Related to Google TPUs labels Jul 18, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively refactors the handling of iRoPE by centralizing the logic and removing it from individual V1 attention backends. The changes are clean and align with the stated goal. I've identified one potential issue regarding a removed warning for the CPU backend that could lead to silent correctness issues if iRoPE is not actually supported. Please see the detailed comment.

Signed-off-by: Lucas Wilkinson <[email protected]>
Signed-off-by: Lucas Wilkinson <[email protected]>
@LucasWilkinson LucasWilkinson added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 18, 2025
@LucasWilkinson LucasWilkinson requested a review from luccafong July 18, 2025 18:24
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

LGTM! I'll share it with @yaochengji to make sure TPU is unaffected

@mgoin mgoin added this to the v0.10.0 milestone Jul 18, 2025
Copy link
Collaborator

@yaochengji yaochengji left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! This change looks good on TPU.

@LucasWilkinson LucasWilkinson enabled auto-merge (squash) July 18, 2025 19:22
@mgoin mgoin removed this from the v0.10.0 milestone Jul 18, 2025
Copy link

mergify bot commented Jul 19, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @LucasWilkinson.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Jul 19, 2025
@mergify mergify bot removed the needs-rebase label Jul 19, 2025
Copy link

mergify bot commented Jul 19, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @LucasWilkinson.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Jul 19, 2025
@mergify mergify bot removed the needs-rebase label Jul 20, 2025
@vllm-bot vllm-bot merged commit 304dce7 into vllm-project:main Jul 21, 2025
63 of 67 checks passed
LyrisZhong pushed a commit to LyrisZhong/vllm that referenced this pull request Jul 23, 2025
Signed-off-by: Lucas Wilkinson <[email protected]>
Co-authored-by: Michael Goin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed tpu Related to Google TPUs v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants