Skip to content

fix(loading): NVIDIA's ModelOpt NVFP4 Qwen2.5-VL export fails to load #3165

Closed

Description

@Jaeyeong-CHOI

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:

  1. The export's vision_config names the patch-embedding channel count twice, as in_channels and as the older in_chans. Qwen25VLVisionConfig reads either through a serde alias, and serde refuses the pair as a duplicate field.
  2. load_qwen2_5_vl does 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.
  3. The export has no MLX quantization block, and Qwen2VLConfig::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_chans when both names are present; the helper the Qwen2-VL and Qwen2.5-VL loaders share (qwen_vision_config) does not.
  • Qwen2VLConfig is 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-quantized exports of Qwen3-VL (for example JEILDLWLRMA/Qwen3-VL-4B-Instruct-NVFP4) fail with Weight 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)

Activity

  1. added a commit that references this issue on Nov 19, 2026
    e986e83
  2. added
    status:done
    type:bug
    priority:medium
    on Nov 30, 2026
  3. added this to the 0.9 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:mediumstatus:donetype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions