-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[feat] Support MRoPE + YaRN #25384
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
[feat] Support MRoPE + YaRN #25384
Conversation
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
👋 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 You ask your reviewers to trigger select CI tests on top of 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 If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
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.
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.
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com>
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 the contribution! This looks reasonable to me!
Signed-off-by: liuye.hj <liuye.hj@alibaba-inc.com> Co-authored-by: liuye.hj <liuye.hj@alibaba-inc.com>
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>
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>
Support MRoPE + YaRN for Qwen3-VL, tested with internal ckpt. 🙏
Enable YaRN with modified config: