NVFP4 support for Qwen3_5MoeExperts (fused MoE): quantizer registration + export serializer
维护者通常 2 天内回复
@meenchen 已经在做这个了。
开始于 2026年7月23日。
评估
这个 Issue 还没有评估数据。
描述
Summary
mtq.quantize silently skips the fused experts of transformers Qwen3_5MoeExperts (Qwen3.5/3.6-VL-MoE) — they're 3-D nn.Parameters (gate_up_proj [E,2I,H], down_proj [E,H,I]) with a per-expert F.linear loop, and there's no QuantModuleRegistry entry. Result: the ~50GB expert bulk stays bf16, and export_hf_checkpoint has no serializer for it (layer_utils.get_experts_list only handles per-expert nn.Linear, Mixtral/DBRX-style).
Proposed
- Register a
_QuantQwen3_5MoeExperts(QuantModule)(analogous to_QuantLlama4TextExpertsbut withF.linear/(out,in)layout — no transpose). Reference impl that works today as an external registration is included in the HF repo below. - Add a fused-3-D export path so
export_hf_checkpointemitsw13/w2NVFP4 (packed uint8 + fp8 block scale + fp32 per-shard global + input scale).
Workaround shipped
Custom registration + manual NVFP4 packing via NVFP4QTensor (global amax/(6·448), block amax/(6·global)), writing the vLLM-ready checkpoint directly (also avoids export_hf_checkpoint OOM on unified-memory boxes).
Artifacts
Full quantize.py + resulting model (67GB→22GB, vision intact): https://huggingface.co/frischeDaten/Qwen3.6-VL-35B-A3B-NVFP4-DGX-Spark-VisionSafe
- 主要语言
- Python
- 星标
- 5.3k
- 派生
- 745
- 平均合并
- 3 天 17 小时
- 30 天内合并 PR
- 177
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/Model-Optimizer 的其他 Issue
-
[Bug] modelopt-mcp: all launcher subprocesses hang when the server runs as a stdio MCP server — missing stdin=DEVNULL可能已有人在做 @ChenhanYu 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
NVIDIA/Model-Optimizer#2551 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Puzzletron Progress 6/8 (calculating one block scores) takes 10 to 20 times more than in tutorial可能重新可做 @tejasng053 于 22 天前认领,目前没有进行中的 PR。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
NVIDIA/Model-Optimizer#1667 ·
维护者通常 2 天内回复
-
feature request
难度 5/5 一周以上 新手友好度 25/100
NVIDIA/Model-Optimizer#2865 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 54/100
NVIDIA/Model-Optimizer#2857 ·
维护者通常 2 天内回复
-
fp4_kernel_hopper.py uses tl.make_block_ptr, which is removed in Triton main (breaks NVFP4 fake quant)可能已有人在做 @kinjalpatel27 于 2 天前认领。 未关闭
难度 3/5 半天 新手友好度 72/100
NVIDIA/Model-Optimizer#2810 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 NVIDIA/Model-Optimizer 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#140958 ·
维护者通常 1 天内回复
-
bisect
难度 2/5 1-3 小时 新手友好度 72/100
dtcxzyw/llvm-bisect-service#548 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
sallowayma-git/IELTS-practice#248 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
anthropics/claude-plugins-official#6763 · 10 条评论 · 10 个 reaction ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复