-
Notifications
You must be signed in to change notification settings - Fork 295
Add Quantizers for Qwen3VLMoeTextDecoderLayer #666
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
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d3013f6
upd
soodoshll 70ddcc4
fix
soodoshll 4ac0c87
fix
soodoshll 904be6a
fix
soodoshll ef200ea
upd
soodoshll 60b9e75
refactor to directly impl qwen3_vl_moe
soodoshll 37c24f4
format
soodoshll 41efac8
Merge branch 'main' into qwen3-vl-moe
shengliangxu ac6d76d
Update modelopt/torch/quantization/plugins/huggingface.py
soodoshll 1c02c90
fix
soodoshll 5ad1f7a
fmt
soodoshll f4c5de5
Merge branch 'main' into qwen3-vl-moe
shengliangxu 6fab4a4
fix
soodoshll b4919e0
Merge branch 'main' into qwen3-vl-moe
soodoshll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 152
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 436
🌐 Web query:
Qwen3VLMoeTextExperts expert_dim attribute huggingface transformers💡 Result:
Short answer: Hugging Face's Qwen3/VL-MoE configs do not expose an attribute named expert_dim. For MoE in transformers you should use:
Evidence:
If you expected an expert_dim field in transformers, use moe_intermediate_size for per-expert hidden size and num_experts for expert count. References: Hugging Face transformers Qwen3/Qwen3-VL-MoE docs and MindSpore MoE docs. [1][2][3][4]
Sources
[1] Hugging Face — Qwen3MoE config docs.
[2] Hugging Face — Qwen3-VL-Moe config docs.
[3] Hugging Face (alternate version) — Qwen3-VL-Moe parameters.
[4] MindSpore MoE implementation (expert_dim usage).
[5] MindSpore MoE (other release).
Remove undefined
expert_dimattribute reference — this will causeAttributeErrorat runtime.The
expert_dimattribute does not exist on HuggingFace'sQwen3VLMoeTextExpertsclass. Lines 607–608 accessself.expert_dim, which will fail at runtime. The correct attribute for the per-expert intermediate size ismoe_intermediate_size. Replace:with:
🤖 Prompt for AI Agents