[model] fix: improve apply_rope_fusion assert message for Qwen3-VL#3328
Open
[model] fix: improve apply_rope_fusion assert message for Qwen3-VL#3328
Conversation
…3296) The bare `assert not config.apply_rope_fusion` gave no context on why fusion is unsupported. Add a detailed comment and assertion message explaining the three layers that prevent fused RoPE for Qwen3-VL / Qwen3.5-VL: incompatible absolute freq format, custom attention bypass, and upstream validation guard. Closes #3296 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA bare assertion preventing Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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
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.
Summary
assert not config.apply_rope_fusioninrope.pywith a descriptive assertion message and detailed comments explaining why fused RoPE is unsupported for Qwen3-VL / Qwen3.5-VLapply_rope_fusion=Truenever actually enables TE fused kernels due to three upstream guards:validate_rope_fusion_compatibility()blocksposition_embedding_type="mrope"Qwen3VLSelfAttentioncallsapply_rotary_pos_emb_absolute()directly (bypasses fused dispatch)(seq_len, bs, 1, 2*dim)is incompatible with TE's expected(max_seqlen, 1, 1, 2*dim)Closes #3296
Test plan
tests/unit_tests/models/qwen_vl/)🤖 Generated with Claude Code
Summary by CodeRabbit