Views
No views yet
| param | shape | dtype |
|---|---|---|
qweight | [N, K/2] | int8 (FP4 nibble pack, low nibble = even-k) |
wscales | [K/16, N] | float8_e4m3fn |
wcscales | [N] | bfloat16 (per-output-channel) |
wtscale | [1] | bfloat16 (global α) |
smooth_factor | [K] | bfloat16 |
proj_down | [K, R] | bfloat16 (SVD residual) |
proj_up | [N, R] | bfloat16 (SVD residual) |
R = 128. The W4A4 reconstruction at runtime is
y = scaled_mma(quant(x · smooth), qweight, ascales, wscales) · wtscale · wcscales + (x @ proj_down) @ proj_upᵀ + bias.quantization_config in transformer/config.json
restricts SVDQuant to the DiT only; the text encoder loads
unquantized.qweight, wscales, proj_up, and proj_down.
Shipping that permutation on disk would force every consumer to
understand the nunchaku layout, even on hardware that does not use
the nunchaku kernel.vllm/model_executor/layers/quantization/kernels/svdquant/cute/)
consumes the on-disk tensors directly with no repack.vllm/model_executor/layers/quantization/svdquant.py::_pack_nvfp4_to_nunchaku_fragment).
The pack/unpack pair is bit-exact and verified against
nunchaku.ops.gemm.svdq_gemm_w4a4_cuda.1from vllm_omni.diffusion import OmniPipeline
2
3pipe = OmniPipeline.from_pretrained(
4 "ultranationalism/nunchaku-z-image-turbo-svdq",
5 torch_dtype="bfloat16",
6)
7# Backend is picked automatically: native (B200/GB300) or nunchaku
8# (Turing through consumer Blackwell). The selection is in
9# `vllm/model_executor/layers/quantization/utils/svdquant_dispatch.py`.
10
11image = pipe(
12 "Young woman in a quiet rooftop garden at golden hour, photorealistic",
13 height=1024, width=1024,
14 num_inference_steps=9, # 8 DiT forwards + 1 t=0
15 guidance_scale=0.0,
16).images[0]
17image.save("out.png")| GPU | backend | notes |
|---|---|---|
| RTX 4090 / 5090 / 3090 (SM_8.x, SM_120) | nunchaku | requires pip install nunchaku; load-time repack to fragment |
| RTX 6000 Pro Blackwell (SM_120) | nunchaku | same as above |
| B200 / GB300 (SM_100a / SM_103) | native | CuTe DSL kernel, direct row-major consume |
| H100 / Hopper (SM_90) | unsupported | nunchaku does not target SM_90, native is SM_100+ |
vllm_omni/quantization/tools/convert_nunchaku_to_svdquant.py.
Layout adapters live in vLLM at
vllm/model_executor/layers/quantization/utils/svdquant_nvfp4_layout.py.nunchaku-tech/nunchaku-z-image-turbo.
Each tensor is unpacked once from the nunchaku fragment to the
row-major canonical form (the converter is the only consumer of
the unpack_* direction; pack_* runs in vLLM at load time for the
nunchaku backend).proj_down carries a transpose quirk in nunchaku's pack_lowrank_weight(..., down=True)
([R, K] in / [K, R] out); the converter strips it so disk layout
is plain [K, R]. Round-trip verified bit-exact across all stress
shapes — see scratch/diag_proj_down_roundtrip.py in the working
tree.1@article{team2025zimage,
2 title={Z-Image: An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer},
3 author={Z-Image Team},
4 journal={arXiv preprint arXiv:2511.22699},
5 year={2025}
6}
7
8@article{liu2025decoupled,
9 title={Decoupled DMD: CFG Augmentation as the Spear, Distribution Matching as the Shield},
10 author={Dongyang Liu and Peng Gao and David Liu and Ruoyi Du and Zhen Li and Qilong Wu and Xin Jin and Sihan Cao and Shifeng Zhang and Hongsheng Li and Steven Hoi},
11 journal={arXiv preprint arXiv:2511.22677},
12 year={2025}
13}
14
15@article{jiang2025distribution,
16 title={Distribution Matching Distillation Meets Reinforcement Learning},
17 author={Jiang, Dengyang and Liu, Dongyang and Wang, Zanyi and Wu, Qilong and Jin, Xin and Liu, David and Li, Zhen and Wang, Mengmeng and Gao, Peng and Yang, Harry},
18 journal={arXiv preprint arXiv:2511.13649},
19 year={2025}
20}
21
22@misc{li2024svdquant,
23 title={SVDQuant: Absorbing Outliers by Low-Rank Components for 4-Bit Diffusion Models},
24 author={Muyang Li and Yujun Lin and Zhekai Zhang and Tianle Cai and Xiuyu Li and Junxian Guo and Enze Xie and Chenlin Meng and Jun-Yan Zhu and Song Han},
25 year={2024},
26 eprint={2411.05007},
27 archivePrefix={arXiv},
28 primaryClass={cs.CV}
29}