Quick Reference
Choose the option from the source you have, not from the precision name:--model-path always selects the base model. The component key must be a real
key from its model_index.json or native pipeline registry; examples include
transformer, transformer_2, text_encoder, video_vae, and audio_vae,
but no one name is universal.
Recommended example for pre-quantized checkpoints:
--model-path, but that is a compatibility path. If a
repo contains multiple candidate checkpoints, select an exact component or
weight source explicitly.
Pre-quantized files are self-describing. Pass one selected file by local path,
owner/repo/path/file.safetensors, or direct Hugging Face file URL and do not
add an online quantization option. The
MiniMax-H3 compatibility table
is the canonical list of H3 component formats and published example sources;
this page defines the backend families and their shared constraints.
Quantized Component Repositories
Every loaded component can point to an independent repository, but path routing does not imply that every loader can materialize every quantization format. SGLang resolves quantized component checkpoints through one of three explicit paths:- load through an SGLang quantization implementation;
- delegate a standard component to Transformers or Diffusers;
- fail closed in a native plain-state loader when the format cannot be restored.
--quantization is the explicit override for the primary transformer loader;
--component-quantizations.<component> expresses the same intent for one
supported component. Pair the latter with
--component-quantization-ignored-layers.<component> to keep matching layers
unquantized. Pre-quantized component repositories instead select their format
through their own metadata and the capability of the selected loader. A generic
string override without a matching materialization backend would advertise
support that the component does not have, while a quantized weight file without
matching config metadata cannot be identified or restored generically.
Quant Families
Here,quant_family means a checkpoint and loading family with shared CLI
usage and loader behavior. It is not just the numeric precision or a kernel
backend.
| quant_family | checkpoint form | checkpoint selector | supported models | extra dependency | platform / notes |
|---|---|---|---|---|---|
fp8 / mxfp4 (online quantization) | Unquantized checkpoint (offline via AMD Quark coming soon) | —component-quantizations.<component> {fp8,mxfp4} | Z-Image-Turbo (validated), others likely work. More support coming soon. | MXFP4: aiter on ROCm | MXFP4 requires ROCm and MI350+ (gfx95x). Weights quantized at load time, activations quantized to fp8 / mxfp4 dynamically. |
kitchen_int8 (online quantization) | Unquantized BF16/FP16 checkpoint | —component-quantizations.<component> kitchen_int8 | MiniMax-H3 (validated on 1× RTX 4090 24 GB) | comfy-kitchen | Data-free INT8 ConvRot at load time via comfy_kitchen.int8_linear. Layers whose input dim is not divisible by the group size stay in BF16. Requires Turing+ (SM75). |
fp8 (offline quantization) | Quantized transformer component folder, or safetensors with quantization_config metadata | —component-paths.<component> or —component-weights-paths.<component> | Native DiTs whose linear layers support the selected FP8 method; validate quality per model | None | Component-folder and single-file flows are both supported |
modelopt-fp8 | Converted ModelOpt FP8 transformer directory or repo with config.json | —component-paths.<component> | FLUX.1, FLUX.2, Wan2.2, HunyuanVideo, Qwen Image, Qwen Image Edit | None | Serialized config stays quant_method=modelopt with quant_algo=FP8; dit_layerwise_offload is supported and dit_cpu_offload stays disabled |
auto-round W4A16 | Transformer component repo with a self-describing quantization_config and auto_round:auto_gptq packing | —component-paths.<component> | Native dense DiTs with compatible component parameter mappings; MiniMax-H3 Diffusers components are supported | None | Auto-detected; reuses the SRT GPTQ/Marlin backend. No —quantization flag is needed; use TP/sequence parallelism rather than FSDP. |
modelopt-nvfp4 | Mixed transformer directory/repo with config.json, raw or Comfy layer-marked NVFP4 safetensors, or full ModelOpt Diffusers repo | —component-paths.<component> for component repos; —component-weights-paths.<component> for raw files; —model-path for full repos | FLUX.1, FLUX.2, Wan2.2, Qwen Image, Qwen Image 2512, Qwen Image Edit, Qwen Image Edit 2511, MiniMax-H3 | None | Mixed override repos keep the base model separate; full Qwen Image exports can be loaded directly as —model-path; raw exports such as black-forest-labs/FLUX.2-dev-NVFP4 use the weights-path flow. Comfy markers select NVFP4 plus INT8 or FP8 companion linears automatically; omit —quantization. |
gguf | One selected GGUF DiT or native encoder file | —component-weights-paths.<component> | MiniMax-H3 original or pruned FL2VA / Ref2VA DiTs and its Qwen3-VL text encoder | None | CUDA only and auto-detected; supports standard and K-quant GGML types. TP requires aligned GGML blocks; component/layerwise offload is supported and FSDP is not. |
comfy-fp8 | One selected Comfy safetensors file with per-layer comfy_quant metadata | —component-weights-paths.<component> | MiniMax-H3 pruned FL2VA / Ref2VA DiTs | None | CUDA; auto-detected; TP, sequence parallelism, and component/layerwise offload are supported, while FSDP is not. Checkpoint-marked fc2 layers retain FP8 storage and use compute-dtype matmul. |
comfy-int8-convrot | One selected safetensors file with per-layer int8_tensorwise and ConvRot metadata | —component-weights-paths.<component> | Native DiTs and encoders whose parameter mappings preserve each marked linear; MiniMax-H3 DiT and Qwen3-VL encoder checkpoints have validated tensor contracts | comfy-kitchen | CUDA; auto-detected; uses the fused Kitchen INT8 kernel and validates weight/scale layout before model construction. TP requires every row-parallel input shard to preserve the checkpoint’s ConvRot group boundary. The H3 256-group DiT supports TP1/2/4, not TP8; its Qwen3-VL encoder keeps TP8 by replicating only incompatible row projections. Offload is supported; FSDP is not. |
mxfp8 | Self-describing serialized weights, or BF16/FP16 weights for online quantization | —component-weights-paths.<component>, or —component-quantizations.<component> mxfp8 online | Native diffusion linears; mixed MiniMax-H3 checkpoints are selected per layer | SRT’s platform MXFP8 backend | Serialized metadata is auto-detected. NVIDIA and ROCm reuse SRT’s dense MXFP8 kernels; Ascend keeps its native online path. Mixed per-layer checkpoints do not support FSDP. |
comfy-w4a8-convrot | Safetensors with serialized asym_w4a8_int8 layer metadata and packed weights | —component-weights-paths.<component> | MiniMax-H3 FL2VA / Ref2VA DiTs and its native Qwen3-VL encoder | comfy-kitchen>=0.2.27 | Auto-detected; omit —quantization. Requires SM80+ and validates packed weights, group/channel scales, and optional codebooks before model construction. Mixed encoder files may keep their embedding tensorwise INT8. TP must preserve ConvRot group boundaries; offload is supported and FSDP is not. |
comfy-w4a4-convrot | Safetensors with serialized convrot_w4a4 metadata, optionally mixed with int8_tensorwise layers | —component-weights-paths.<component> | Native DiTs and encoders with matching parameter mappings; MiniMax-H3 FL2VA / Ref2VA DiTs and Qwen3-VL encoder layouts are recognized | comfy-kitchen | Auto-detected; omit —quantization. Each layer dispatches to its serialized W4A4 or INT8 ConvRot kernel. CUDA requires SM75+; TP must preserve each format’s quantization and ConvRot group boundaries. Offload is supported and FSDP is not. |
comfy-nvfp4-full-precision | Safetensors with serialized nvfp4 and optional row-wise int8_tensorwise layer metadata | —component-weights-paths.text_encoder | MiniMax-H3 native Qwen3-VL encoder | None | Auto-detected; omit explicit quantization. Preserves packed storage, high-nibble-first weights, swizzled block scales, and AWQ input pre-scales. Each active NVFP4 matrix is dequantized for BF16/FP16 compute, so this is a memory path rather than a native FP4 speed path. |
quanto-int8 | One native encoder safetensors file with an embedded Quanto quantization map | —component-weights-paths.<component> | Native encoders whose mapped linear layers consume every declared qint8 entry; MiniMax-H3’s Qwen3-VL encoder is supported | None | Auto-detected weight-only qint8 storage. Each active matrix is dequantized to the compute dtype for the ordinary linear operation, so this reduces stored/resident weight memory rather than promising INT8 GEMM speed. TP and offload are supported; FSDP is not. |
qvg-kv | Unquantized model with runtime causal KV-cache compression | —kv-cache-quant {int4,int2} | LingBot World realtime causal path | quant-videogen | CUDA only; compresses completed cache chunks rather than model weights; lossy and disabled by default |
nunchaku-svdq | Pre-quantized Nunchaku transformer weights, usually named svdq-{int4|fp4}_r{rank}-… | —transformer-weights-path | Model-specific support such as Qwen-Image, FLUX, and Z-Image | nunchaku | SGLang can infer precision and rank from the filename and supports both int4 and nvfp4 |
msmodelslim | Pre-quantized msmodelslim transformer weights | —model-path | Wan2.2 family | None | Currently only compatible with the Ascend NPU family and supports mxfp8, mxfp4, w8a8, and w4a4 |
Causal KV-Cache Quantization
Quant-VideoGen KV-cache quantization targets long-running autoregressive video sessions, where the causal self-attention cache can become comparable to the model weights. It does not change or quantize the checkpoint weights. See Realtime and Causal Video Models for the session lifecycle, supported pipelines, and the distinction between realtime and request-based causal generation. Install the optional dependency without allowing its stale Torch requirement to replace SGLang’s pinned Torch version, then enable int4 compression when serving a supported LingBot World realtime pipeline:Storage Policy
The current chunk is rewritten at every denoising step, so it remains in BF16. The newest--kv-cache-quant-keep-recent completed chunks also remain in BF16.
Older completed chunks are stable and are packed once with Progressive Residual
Quantization (PRQ); their dense BF16 tensors are then released.
When a transformer layer runs attention, its packed visible chunks are
dequantized and concatenated with the recent BF16 chunks. This creates one
layer’s dense attention view at a time instead of keeping dense windows
resident for every transformer layer.
How PRQ Works
For each K or V vector, PRQ uses k-means to select a centroid, then quantizes the remaining error:Quality And Performance
In the initial LingBot measurements, int4 used about 47% of the dense resident KV-cache memory for a 24-frame window and added about 18% per-chunk latency. Int2 used about 37% of the dense resident KV-cache memory but introduces more quantization error. These measurements are configuration-specific; benchmark memory, latency, temporal consistency, identity stability, and motion quality on the intended session length. Start with int4 unless capacity requires int2. The current implementation is limited to the LingBot realtime sliding-window-and-sink path, including Ulysses sequence sharding. It does not support LongLive2 pinned sinks, global sinks, or dynamically growing caches.Tuning Options
Online Quantization
This section describes the online methods currently implemented by the transformer loader. They are useful when a pre-quantized transformer checkpoint is not available. Encoders, VAEs, and auxiliary components are independent: their repositories may still carry serialized quantized weights, which are restored when the selected component loader supports that format.FP8 Online Quantization
Apply FP8 quantization to a supported unquantized DiT checkpoint:transformer, the shorter
--quantization fp8 spelling is equivalent.
MiniMax-H3 supports this path while preserving its required FP32 patch,
timestep, and output projections. See the
MiniMax-H3 cookbook
for its distributed serving recipe.
MXFP4 Online Quantization
MXFP4 provides aggressive 4-bit compression with online quantization. Note: Requires ROCm and MI350+ (gfx95x) GPU.aiter package with MXFP4 kernel support
Kitchen INT8
Serialized Comfy ConvRot INT8 DiTs and compatible native encoders use--component-weights-paths.<component>. Both are auto-detected from per-layer
markers and load INT8 weights and row scales directly; omit online
quantization. --transformer-weights-path remains the primary-DiT convenience
spelling.
For a BF16 checkpoint, --component-quantizations.transformer kitchen_int8
instead performs online quantization after loading:
kitchen_int8 quantizes DiT linear weights online from the stock BF16
checkpoint. Forward uses the fused comfy_kitchen.int8_linear op (rotation,
dynamic per-row activation quantization, INT8 GEMM, dequant, and bias).
Install the optional dependency first:
qkv reorder is already applied. Layers whose input dim is not divisible by
the group size (256) stay in BF16 instead of failing the load; H3’s AdaLN
projections take that path.
Large-M GEMMs (rows > 8192 and out_features >= 8192) are split by rows so
the fused kernel stays on the data-parallel CUTLASS config. Override the
thresholds with SGLANG_KITCHEN_INT8_MAX_ROWS and
SGLANG_KITCHEN_INT8_MIN_SPLIT_N.
Skipping Layers
By default, transformer online quantization quantizes every supported linear layer in that component. However,--quantization-ignored-layers can keep
specific transformer layers in their original precision:
layers.0.attention.to_q). A layer is skipped and left unquantized if its prefix contains any of the given patterns.
Transformers-managed Quantized Components
Model components that already have a native Transformers loading path delegate self-describing checkpoints whose standard top-levelquantization_config is
recognized by the installed Transformers version. Successful loading still
depends on that backend’s optional dependencies, platform, and model/checkpoint
compatibility. An available native SGLang implementation remains preferred when
it can restore the same format. For example, replace FLUX’s T5 component with
the official BitsAndBytes checkpoint:
Command
Validated ModelOpt Checkpoints
This section is the canonical support matrix for the thirteen published diffusion ModelOpt checkpoints currently wired up in SGLang docs and validation coverage. Published checkpoints keep the serialized quantization config asquant_method=modelopt; the FP8 vs NVFP4 split below is a documentation label
derived from quant_algo.
Twelve of the thirteen repos live under lmsys/*. The FLUX.2 NVFP4 entry keeps
the official black-forest-labs/FLUX.2-dev-NVFP4 repo.
| Quant Algo | Base Model | Preferred CLI | HF Repo | Current Scope | Notes |
|---|---|---|---|---|---|
FP8 | black-forest-labs/FLUX.1-dev | —transformer-path | lmsys/flux1-dev-modelopt-fp8-sglang-transformer | single-transformer override, deterministic latent/image comparison, H100 benchmark, torch-profiler trace | SGLang converter keeps a validated BF16 fallback set for modulation and FF projection layers; use —model-id FLUX.1-dev for local mirrors |
FP8 | black-forest-labs/FLUX.2-dev | —transformer-path | lmsys/flux2-dev-modelopt-fp8-sglang-transformer | single-transformer override load and generation path | published SGLang-ready transformer override |
FP8 | Wan-AI/Wan2.2-T2V-A14B-Diffusers | —transformer-path | lmsys/wan22-t2v-a14b-modelopt-fp8-sglang-transformer | primary transformer quantized, transformer_2 kept BF16 | primary-transformer-only path; keep transformer_2 on the base checkpoint, and do not describe this as dual-transformer full-model FP8 unless that path is validated separately |
FP8 | hunyuanvideo-community/HunyuanVideo | —transformer-path | lmsys/hunyuanvideo-modelopt-fp8-sglang-transformer | single-transformer override, BF16-vs-FP8 video comparison, H100 benchmark, torch-profiler trace | HunyuanVideo uses different ModelOpt/diffusers and SGLang runtime module names; the converter maps those names before writing FP8 scale tensors and BF16 fallback ignores |
FP8 | Qwen/Qwen-Image | —transformer-path | lmsys/qwen-image-modelopt-fp8-sglang-transformer | single-transformer override, BF16-vs-FP8 image comparison, H100 benchmark, torch-profiler trace | shares the Qwen Image FP8 fallback preset; keep img_in, txt_in, timestep embedder, norm_out.linear, proj_out, img_mod/txt_mod, and img_mlp.net.2 in BF16 |
FP8 | Qwen/Qwen-Image-Edit-2511 | —transformer-path | lmsys/qwen-image-edit-modelopt-fp8-sglang-transformer | TI2I edit path, BF16-vs-FP8 image comparison, H100 benchmark | shares QwenImageTransformer2DModel with Qwen Image and uses the same Qwen Image FP8 fallback preset |
NVFP4 | black-forest-labs/FLUX.1-dev | —transformer-path | lmsys/flux1-dev-modelopt-nvfp4-sglang-transformer | mixed BF16+NVFP4 transformer override, correctness validation, 4x RTX 5090 benchmark, torch-profiler trace | use build_modelopt_nvfp4_transformer.py; validated builder keeps selected FLUX.1 modules in BF16 and sets swap_weight_nibbles=false |
NVFP4 | black-forest-labs/FLUX.2-dev | —transformer-weights-path | black-forest-labs/FLUX.2-dev-NVFP4 | packed-QKV load path | official raw export repo; validated packed export detection and runtime layout handling |
NVFP4 | Wan-AI/Wan2.2-T2V-A14B-Diffusers | —transformer-path | lmsys/wan22-t2v-a14b-modelopt-nvfp4-sglang-transformer | primary transformer quantized with ModelOpt NVFP4, transformer_2 kept BF16 | primary-transformer-only path; keep transformer_2 on the base checkpoint; the default FP4 GEMM backend is flashinfer_trtllm |
NVFP4 | Qwen/Qwen-Image | —model-path | lmsys/qwen-image-modelopt-nvfp4-sglang | full ModelOpt NVFP4 Diffusers repo, BF16-vs-NVFP4 B200 image comparison | full repo loaded directly; exported with ModelOpt PR #1706 SVDQuant NVFP4 (—format fp4, max calibration, block size 16) and BF16 fallbacks for attention-sensitive modules plus first/last transformer blocks |
NVFP4 | Qwen/Qwen-Image-2512 | —model-path | lmsys/qwen-image-2512-modelopt-nvfp4-sglang | full ModelOpt NVFP4 Diffusers repo, BF16-vs-NVFP4 B200 image comparison, B200 CI case | same full-repo loader path as Qwen Image; this is the Qwen Image NVFP4 representative in multimodal-gen-test-1-b200 |
NVFP4 | Qwen/Qwen-Image-Edit | —model-path | lmsys/qwen-image-edit-modelopt-nvfp4-sglang | TI2I edit full ModelOpt NVFP4 Diffusers repo, BF16-vs-NVFP4 B200 image comparison | full repo loaded directly with normal image-edit inputs; exported with the same ModelOpt PR #1706 NVFP4 recipe |
NVFP4 | Qwen/Qwen-Image-Edit-2511 | —model-path | lmsys/qwen-image-edit-2511-modelopt-nvfp4-sglang | TI2I edit full ModelOpt NVFP4 Diffusers repo, BF16-vs-NVFP4 B200 image comparison | full repo loaded directly with normal image-edit inputs; exported with the same ModelOpt PR #1706 NVFP4 recipe |
multimodal-gen-test-1-b200) uses a
representative NVFP4 subset and includes
lmsys/qwen-image-2512-modelopt-nvfp4-sglang for Qwen Image coverage.
ModelOpt FP8
Usage Examples
Converted ModelOpt FP8 transformer repos should be loaded as transformer component overrides. If the repo or local directory already containsconfig.json, use --transformer-path. Full Diffusers repos such as the
NVIDIA Wan2.2 FP8 checkpoint can be passed directly with --model-path.
Notes
--transformer-pathis the primary-DiT convenience spelling for converted ModelOpt FP8 component repos or directories that already carryconfig.json.- If the override repo or local directory contains its own
config.json, SGLang reads the quantization config from that override instead of relying on the base model config. --transformer-weights-pathstill works when you intentionally point at raw weight files or a directory that should be metadata-probed as weights first.dit_layerwise_offloadis supported for ModelOpt FP8 checkpoints.dit_cpu_offloadstill stays disabled for ModelOpt FP8 checkpoints.- The layerwise offload path now preserves the non-contiguous FP8 weight stride expected by the runtime FP8 GEMM path.
- On disk, the quantization config stays
quant_method=modeloptwithquant_algo=FP8; themodelopt-fp8label in this document is a support family name, not a serialized config key. - To build the converted checkpoint yourself from a ModelOpt diffusers export,
use
python -m sglang.multimodal_gen.tools.build_modelopt_fp8_transformer.
ModelOpt NVFP4
Usage Examples
For mixed ModelOpt NVFP4 transformer overrides that already containconfig.json, keep the base model and quantized transformer separate and use
--transformer-path:
--transformer-weights-path:
--model-path:
transformer
was quantized:
Notes
- Use
--transformer-pathfor mixed ModelOpt NVFP4 transformer repos or local directories that already includeconfig.json. - Use
--transformer-weights-pathfor raw NVFP4 exports, individual safetensors files, or repo layouts that should be treated as weights first. - For dual-transformer pipelines such as
Wan2.2-T2V-A14B-Diffusers, the primary--transformer-pathoverride targets onlytransformer. Use a per-component override such as--transformer-2-pathonly when you intentionally want a non-defaulttransformer_2. - On Blackwell, the diffusion ModelOpt NVFP4 path defaults to FlashInfer
TensorRT-LLM FP4 GEMM (
flashinfer_trtllm). - The published Qwen Image NVFP4 exports keep the
img_mod/txt_modmodulation projections and first/last transformer blocks in BF16. - Qwen-Image NVFP4 does not always improve latency at 1024x1024. On B200, the
validated ModelOpt exports were faster than BF16 at 2048x2048 with
SGLANG_DIFFUSION_FLASHINFER_FP4_GEMM_BACKEND=cutlass, while 1024x1024 remained BF16-faster. - Direct
--model-pathloading is the canonical path for full Qwen Image ModelOpt NVFP4 repos and a compatibility path for FLUX.2 NVFP4-style repos or local directories. - If
--transformer-weights-pathis provided explicitly, it takes precedence over the compatibility--model-pathflow. - For local directories, SGLang first looks for
*-mixed.safetensors, then falls back to loading from the directory. - To force the diffusion ModelOpt FP4 path onto a different FlashInfer
backend, set
SGLANG_DIFFUSION_FLASHINFER_FP4_GEMM_BACKEND. Supported values includeflashinfer_cudnn,flashinfer_cutlass, andflashinfer_trtllm. - On disk, the quantization config stays
quant_method=modeloptwithquant_algo=NVFP4; themodelopt-nvfp4label here is again a documentation family name rather than a serialized config key.
GGUF
GGUF loads a community-quantized transformer from a single.gguf file while
the rest of the pipeline — VAE, text encoder, scheduler, tokenizer — keeps
loading from the base model.
GGUF primarily reduces checkpoint, host-memory, and resident-weight size. For
example, MiniMax-H3’s transformer is 17.5 GiB as Q4_K_M versus 61.7 GiB as
BF16. With full layerwise offload, VAE decode and offload buffers can still
dominate peak GPU memory, but each streamed DiT layer also transfers fewer
bytes.
Packed linears reuse SRT’s GGUF type definitions and CUDA dequantization, then
run the native GEMM. SRT’s fused MMVQ/MMQ kernels target the low-token LLM
regime and are slower at diffusion sequence lengths. GGUF remains a
capacity-oriented option; latency depends on the quantization type, activation
shape, and placement policy.
Layers the checkpoint stores unquantized (F32/F16/BF16) take the ordinary linear
path rather than the packed one. Their precision is then whatever the model
declares for that layer, exactly as on the safetensors path — a checkpoint
cannot raise a layer above the model’s own dtype by storing it wider. For
MiniMax-H3 the two agree: the layers it pins to FP32 are the ones the validated
checkpoint leaves unquantized, and post_load_weights fails the load if any of
them ends up narrower.
Usage
No extra install:gguf is already a core SGLang dependency.
--model-path stays the base model;
--component-weights-paths.<component> takes the GGUF. A local path,
owner/repo/file.gguf, or owner/repo:QUANT_TYPE all work. The quant-type
shorthand is accepted only when exactly one repository file matches it;
otherwise SGLang lists the candidates and asks for a full path.
transformer is H3’s registered DiT component name. The
--transformer-weights-path alias produces the same result. Note that
--quantization gguf is not the selector: the quantization is read from the
file itself, so passing the file is what enables the path.
MiniMax-H3 GGUF checkpoints may use either the original timestep MLP or the
pruned AdaLN curve architecture. Repositories often contain both FL2VA and
Ref2VA files, so use the full Hub file reference instead of an ambiguous
owner/repo:QUANT_TYPE selector. The
H3 compatibility table
links both published layouts without duplicating their commands here.
The pruned architecture keeps its sampled curve and reduced AdaLN projections
in FP32, matching the published checkpoint implementation. This precision
island deliberately bypasses the BF16-only fused modulation kernels.
Whether to offload the VAE
Addingvae to --layerwise-offload-components trades a lot of latency for
some peak VRAM, because the video VAE decoder is re-streamed per decode tile.
Measured on 1× RTX 5090 with this checkpoint, 1344×768 × 107 frames:
Denoise is unaffected, and the output is bit-identical either way. Leave the VAE
resident unless the 6.7 GiB matters — on a 24 GB card by this measurement it
does, and the 6× slower decode is the price of fitting.
Constraints
Every constraint above fails at startup with an explanatory error rather than
silently producing wrong output.
Sequence parallelism (
--ulysses-degree / --ring-degree) remains available
because it shards activations rather than packed weights. TP is also available;
startup rejects a degree that cuts a row-parallel matrix inside a GGML block.
Validated scope
The DiT loads at 17.5 GiB against 61.7 GiB for the BF16 checkpoint. Weight
fidelity was checked tensor-by-tensor against the BF16 reference: cosine
1.00000 for the F32/BF16 tensors and 0.9973 for Q4_K/Q4_0.
Not validated in the measurements above: any other quantization type, the
ref2va partition, and a BF16-vs-GGUF output comparison.
Nunchaku (SVDQuant)
Install
Install the runtime dependency first:File Naming and Auto-Detection
For Nunchaku checkpoints,--model-path should still point to the original
base model, while --transformer-weights-path points to the quantized
transformer weights.
If the basename of --transformer-weights-path contains the pattern
svdq-(int4|fp4)_r{rank}, SGLang will automatically:
- enable SVDQuant
- infer
--quantization-precision - infer
--quantization-rank
| checkpoint name fragment | inferred precision | inferred rank | notes |
|---|---|---|---|
svdq-int4_r32 | int4 | 32 | Standard INT4 checkpoint |
svdq-int4_r128 | int4 | 128 | Higher-quality INT4 checkpoint |
svdq-fp4_r32 | nvfp4 | 32 | fp4 in the filename maps to CLI value nvfp4 |
svdq-fp4_r128 | nvfp4 | 128 | Higher-quality NVFP4 checkpoint |
| filename | precision | rank | typical use |
|---|---|---|---|
svdq-int4_r32-qwen-image.safetensors | int4 | 32 | Balanced default |
svdq-int4_r128-qwen-image.safetensors | int4 | 128 | Quality-focused |
svdq-fp4_r32-qwen-image.safetensors | nvfp4 | 32 | RTX 50-series / NVFP4 path |
svdq-fp4_r128-qwen-image.safetensors | nvfp4 | 128 | Quality-focused NVFP4 |
svdq-int4_r32-qwen-image-lightningv1.0-4steps.safetensors | int4 | 32 | Lightning 4-step |
svdq-int4_r128-qwen-image-lightningv1.1-8steps.safetensors | int4 | 128 | Lightning 8-step |
--enable-svdquant, --quantization-precision, and --quantization-rank
explicitly.
Usage Examples
Recommended auto-detected flow:Notes
--transformer-weights-pathis the primary-DiT convenience spelling used by Nunchaku examples. Older config names such asquantized_model_pathare treated as compatibility aliases.- Auto-detection only happens when the checkpoint basename matches
svdq-(int4|fp4)_r{rank}. - The CLI values are
int4andnvfp4. In filenames, the NVFP4 variant is written asfp4. - Lightning checkpoints usually expect matching
--num-inference-steps, such as4or8. - Current runtime validation only allows Nunchaku on NVIDIA CUDA Ampere (SM8x) or SM12x GPUs. Hopper (SM90) is currently rejected.
ModelSlim
MindStudio-ModelSlim (msModelSlim) is a model offline quantization compression tool launched by MindStudio and optimized for Ascend hardware.-
Installation
-
Multimodal_sd quantization
Download the original floating-point weights of the large model. Taking Wan2.2-T2V-A14B as an example, you can go to Wan2.2-T2V-A14B to obtain the original model weights. Then install other dependencies (related to the model, refer to the modelscope model card).
Note: You can find pre-quantized validated models on modelscope/Eco-Tech.
Run quantization using one-click quantization (recommended):For more detailed examples of quantization of models, as well as information about their support, see the examples section in ModelSLim repo.Note: SGLang does not support quantized embeddings, please disable this option when quantizing using msmodelslim.
-
Auto-Detection and different formats
For msmodelslim checkpoints, it’s enough to specify only
--model-path, the detection of quantization occurs automatically for each layer using parsing ofquant_model_description.jsonconfig. In the case ofWan2.2onlyDiffusersweights storage format are supported, whereas modelslim saves the quantized model in the originalWan2.2format. For conversion, use the one-stepwan_repack.pyscript:Supported--model-typevalues:Wan2.2-TI2V-5B(single-transformer),Wan2.2-T2V-A14BandWan2.2-I2V-A14B(Cascade dual-transformer). The script automatically handles: copying the base model, converting quantized weights to Diffusers format, and restoringconfig.json. -
Usage Example
With auto-detected flow:
-
Available Quantization Methods:
-
W4A4_DYNAMIClinear with online quantization of activations -
W8A8linear with offline quantization of activations -
W8A8_DYNAMIClinear with online quantization of activations -
W8A8_MXFP8linear with offline quantization (msmodelslim pre-quantized weights) -
mxfp8linear with online quantization (--quantization mxfp8) -
W4A4_MXFP4/W4A4_MXFP4_DUALSCALElinear with offline quantization (msmodelslim pre-quantized weights) -
mxfp4_npulinear with online quantization (--quantization mxfp4_npu)
-
MXFP8 Quantization
Self-describing serialized MXFP8 transformers are inferred from their checkpoint metadata. For online MXFP8 quantization, load the original FP16/BF16 model and add--quantization mxfp8. NVIDIA and ROCm reuse SRT’s
dense MXFP8 implementation; Ascend uses npu_dynamic_mx_quant and
npu_quant_matmul with a block size of 32.
npu_dynamic_mx_quant is not available on A2/A3.
MXFP8 Offline Quantization (msmodelslim)
Pre-quantized MXFP8 weights exported by msmodelslim are auto-detected viaquant_model_description.json
(W8A8_MXFP8 scheme). Use wan_repack.py to convert the quantized weights to Diffusers format,
then load the converted model with --model-path:
MXFP4 Online Quantization
For online MXFP4 quantization on Ascend NPU, load the original FP16/BF16 model and add--quantization mxfp4_npu. The mxfp4_npu key is used for Ascend because mxfp4
is reserved for the ROCm/aiter backend.
Weights are quantized at load time via npu_dynamic_dual_level_mx_quant, and activations
are quantized per-token during inference before npu_dual_level_quant_matmul. MXFP4 uses
dual-level block scales with an L1 block size of 32 and an L0 block size of 512.
Hardware requirement: Ascend A5 series or newer.npu_dynamic_dual_level_mx_quantandnpu_dual_level_quant_matmulare not available on A2/A3. Note: Online MXFP4 weight quantization is experimental. The offline msmodelslim flow uses pre-quantized weights and may produce different numerical results.
MXFP4 Offline Quantization (msmodelslim)
Pre-quantized MXFP4 weights exported by msmodelslim are auto-detected viaquant_model_description.json (W4A4_MXFP4 / W4A4_MXFP4_DUALSCALE scheme).
Use wan_repack.py to convert the quantized weights to Diffusers format, then load
the converted model with --model-path:
weight_scale, weight_dual_scale). If exported with smooth quantization,
mul_scale is loaded and applied before activation quantization to keep activations
aligned with the calibrated weights.