Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

NVFP4 support for Qwen3_5MoeExperts (fused MoE): quantizer registration + export serializer

Đang mở
#2,011 10 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@meenchen đang làm issue này rồi.

Từ ngày 23/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

  1. Register a _QuantQwen3_5MoeExperts(QuantModule) (analogous to _QuantLlama4TextExperts but with F.linear/(out,in) layout — no transpose). Reference impl that works today as an external registration is included in the HF repo below.
  2. Add a fused-3-D export path so export_hf_checkpoint emits w13/w2 NVFP4 (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

Ngôn ngữ chính
Python
Star
5.2k
Fork
736
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
160

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/Model-Optimizer

Tất cả issue của NVIDIA/Model-Optimizer

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.