Repository navigation
Closed
Labels
priority:mediumMedium prioritystatus:doneCompletedtype:bugBug fixes, error corrections, or issue resolutions
Milestone
Description
Summary
NVIDIA's ModelOpt NVFP4 export of Qwen2.5-VL does not load. Three things in the Qwen2.5-VL route stop it, one after the other:
- The export's
vision_confignames the patch-embedding channel count twice, asin_channelsand as the olderin_chans.Qwen25VLVisionConfigreads either through a serde alias, and serde refuses the pair as a duplicate field. load_qwen2_5_vldoes not repack ModelOpt's{weight, weight_scale, weight_scale_2}triplets to MLX native NVFP4, as the text-only route and the Qwen3.5 VLM route (fix(loading): repack ModelOpt NVFP4 weights on the Qwen3.5 VLM route #3030) do.- The export has no MLX
quantizationblock, andQwen2VLConfig::bits()/group_size()are 0 without one, which the quantized loaders refuse.
Reproduction steps
hf download nvidia/Qwen2.5-VL-7B-Instruct-NVFP4 --revision d13bb1f2d --local-dir models/Qwen2.5-VL-7B-Instruct-NVFP4
mlxcel generate -m models/Qwen2.5-VL-7B-Instruct-NVFP4 -n 96 --temp 0 \
-p "What is the capital of France? Answer in one word."Expected behavior
Paris, as mlx-community/Qwen2.5-VL-3B-Instruct-4bit answers.
Actual behavior
Error: Failed to parse Qwen2.5VL vision config: duplicate field `in_channels`
Exit 1. With the first cause fixed alone the load stops at the second (the refusal #3019 added), and with the first two fixed at the third:
Error: Failed to load Qwen2.5VL text model: Unsupported packed weight: model.layers.0.self_attn.q_proj.weight is uint8 with model.layers.0.self_attn.q_proj.weight_scale; this dense linear loader cannot decode it. …
Error: Failed to load Qwen2.5VL text model: quantization.bits (0) must be between 1 and 32: …
mlxcel version
main @ e91045a (v0.9.0-beta.1)
Install method
Built from source
Platform
Linux + CUDA (gb10)
Model checkpoint
nvidia/Qwen2.5-VL-7B-Instruct-NVFP4 @ d13bb1f2d (qwen2_5_vl, ModelOpt 0.37.0 dev, quant_algo: NVFP4, group size 16, visual* and lm_head excluded)
Relevant logs
The vision_config of the export (the original Qwen/Qwen2.5-VL-7B-Instruct has in_chans only):
"in_channels": 3,
"in_chans": 3,Additional context
- The Qwen3-Omni loader in the same file already drops
in_chanswhen both names are present; the helper the Qwen2-VL and Qwen2.5-VL loaders share (qwen_vision_config) does not. Qwen2VLConfigis also the Qwen2-VL text config. I found no ModelOpt export of Qwen2-VL to check that route with.- Not covered here: compressed-tensors
nvfp4-pack-quantizedexports of Qwen3-VL (for exampleJEILDLWLRMA/Qwen3-VL-4B-Instruct-NVFP4) fail withWeight not found: model.layers.0.self_attn.q_proj.weight; that is another format (weight_packed,weight_global_scale) and a separate gap. - A fix with tests is ready.
Pre-submission checks
- I searched existing issues and did not find a duplicate
- This is not a security vulnerability (those go to SECURITY.md instead)
Metadata
Metadata
Assignees
Labels
priority:mediumMedium prioritystatus:doneCompletedtype:bugBug fixes, error corrections, or issue resolutions
Activity
fix(loading): dedupe in_chans on the Qwen2-VL IREE host routes too
fix(loading): load ModelOpt NVFP4 Qwen2.5-VL checkpoints (lablup#3166)