Skip to content

[feat] Support MRoPE + YaRN - #25384

Merged
ywang96 merged 3 commits into
vllm-project:mainfrom
JJJYmmm:main
Sep 23, 2025
Merged

ywang96 merged 3 commits into
vllm-project:mainfrom
JJJYmmm:main

Conversation

@JJJYmmm

@JJJYmmm JJJYmmm commented Sep 22, 2025 •

Copy link
Copy Markdown
Contributor

Support MRoPE + YaRN for Qwen3-VL, tested with internal ckpt. 🙏

Enable YaRN with modified config:

...
    "max_position_embeddings": 1000000,
    "rope_scaling": {
      "rope_type": "yarn",
      "mrope_section": [
        24,
        20,
        20
      ],
      "mrope_interleaved": true,
      "factor": 3.0, # MRoPE has a slower factor compared to vanilla rope
      "original_max_position_embeddings": 256000
    },
...

Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
@github-actions

Copy link
Copy Markdown

👋 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 ask your reviewers to trigger select CI tests on top of fastcheck CI.

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.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

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

Copy link
Copy Markdown
Contributor

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 adds support for MRoPE with YaRN scaling. The changes in vllm/model_executor/layers/rotary_embedding/__init__.py correctly dispatch to MRotaryEmbedding when YaRN scaling is used with mrope_section. The changes in vllm/model_executor/layers/rotary_embedding/mrope.py add YaRN parameters and reuse logic from YaRNScalingRotaryEmbedding. However, I've found a critical issue in how MRotaryEmbedding interacts with the YaRN scaling logic, which will lead to incorrect rotary embeddings. Please see my detailed comment.

liuye.hj and others added 2 commits September 22, 2025 21:25
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>

@ywang96 ywang96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution! This looks reasonable to me!

@ywang96 ywang96 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 22, 2025
@ywang96
ywang96 enabled auto-merge (squash) September 22, 2025 19:30
@ywang96 ywang96 mentioned this pull request Sep 22, 2025
7 of 12 tasks
@ywang96
ywang96 merged commit fc97733 into vllm-project:main Sep 23, 2025
charlifu pushed a commit to ROCm/vllm that referenced this pull request Sep 25, 2025
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
Signed-off-by: charlifu <charlifu@amd.com>
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
ptrdlr14 pushed a commit to ptrdlr14/vllm that referenced this pull request Oct 20, 2025
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
mystous pushed a commit to mystous/vllm_hybrid that referenced this pull request May 10, 2026
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
my-other-github-account pushed a commit to my-other-github-account/vllm that referenced this pull request May 15, 2026
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
my-other-github-account pushed a commit to my-other-github-account/vllm that referenced this pull request May 15, 2026
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
0826joyce pushed a commit to 0826joyce/vllm-serving-optimization that referenced this pull request May 19, 2026
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
plasticchris pushed a commit to plasticchris/vllm that referenced this pull request Jul 20, 2026
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants