Precision and quantization
Use the following table to select weight, activation, and KV-cache precision and to configure model-specific quantization paths.
| Parameter | Purpose |
|---|---|
--dtype | Model weight and activation dtype. auto follows model metadata. |
--kv-cache-dtype | KV cache dtype. Lower precision reduces KV memory. nvfp4 stores packed E2M1 payloads with one E4M3 scale per 16 head_dim elements (no global scale) for Qwen4-Exp QSA attention. FlatKV stores scales inline by default. --no-qwen4-exp-flat-kv uses separate scale planes. Prefill, decode, and verify use FlashInfer PrimTS on SM100/SM103 for 256-wide heads and compatible logical top-k metadata, and FlashInfer's default qsa_sparse_paged_attention on SM90 for inline-scale 256-wide FlatKV when flashinfer.sparse exposes it. Other FP4 QSA calls use Triton. The indexer's compressed keys stay BF16. FP4 KV and --decode-monokernel are incompatible. |
--kv-cache-quant-method | KV cache quantization method. |
--mamba-ssm-dtype | Stored linear-attention recurrent state dtype (GDN and KDA): float32 (default) or bfloat16. Scans still accumulate in FP32; bfloat16 halves state memory. |
--enable-deferred-gdn-state | Defer accepted recurrent replay to the next GDN layer's WY state read. Off by default. NVIDIA BF16 state, K128/V128 chain MTP3/T4 with value-head counts divisible by four and one pipeline stage; convolution commits immediately. Stopped rows and distinct source/destination state blocks commit immediately; unsupported forwards first materialize pending rows. Reserves a second batch payload bank (about 291 MiB at batch 128 and 36 GDN layers) plus small slot metadata. See the execution contract. |
--quantization | Weight quantization mode such as fp8, nvfp4, w8a8_fp8, or compressed-tensors. |
--quantization-param-path | JSON file of FP8 KV cache scaling factors, read only under an FP8 KV cache. KV caches run unscaled, so every factor must be 1.0, as must any KV-cache scale the checkpoint carries. |
--enable-fp8-attn-proj | Enable online FP8 QKV/O and GDN QKVZ/output projections in the Qwen3.5 or Qwen4-Exp target model. Off by default. |
--prefill-collective-payload {bf16,int8-block16} | Muse Spark: the payload encoding of the owned-row prefill collectives (the QKVG all-to-all and the attention and expert reduce-scatters) in extend forwards. bf16 (the default) transfers the rows as produced; int8-block16 transfers INT8 codes with an FP32 scale per 16 elements (a payload of 1.25 bytes an element) and decodes them to BF16 before the collective's arithmetic. A numerics change; decode and verify forwards stay BF16, and with --owned-attention-output all-to-all the attention heads travel as BF16 and the output gate stays on the token owners, unencoded. Refused for other checkpoints, under --numerics rl-bitwise, and at startup when the server prepares no Iris owned-row layout for it (Iris needs gfx950 and attention TP 4 or 8; the layout needs forwards large enough for its row boundary). |
--allreduce-quantization {none,int8,fp8} | The payload encoding of fused tensor-parallel all-reduce + residual + RMSNorm launches with more rows than --comm-fusion-max-num-tokens (prefill chunks), where the exact fused kernels stop. none (the default) keeps those rows on the exact, unfused reduction; int8 and fp8 (E4M3) transfer codes with one FP32 scale per 32 elements in both halves of a two-shot exchange (about 1.1 bytes an element instead of 2). Lossy: the reduced rows carry two quantization errors (int8 is the more accurate), while every rank's residual stream stays identical. AMD gfx950 only, attention TP 4 or 8, and it needs the all-reduce fusion (--enable-allreduce-fusion, auto-enabled for single-node attention TP); refused otherwise, and with --speculative-algorithm EAGLE3 or EAGLE4, whose draft layer asks the fused norm for a block-FP8 output the quantized kernel does not produce. |
--owned-attention-output {reduce-scatter,all-to-all} | Muse Spark: how owned-row prefill (extend) forwards return attention outputs to the token owners. reduce-scatter (the default) reduce-scatters every rank's partial projection; all-to-all sends each owner its rows of every rank's heads and projects them through the whole output projection, gathered on every rank after loading: 128 MiB (8192 × 8192 BF16) a layer, about 7.75 GiB a rank over 62 layers, taken from the KV pool. Fewer bytes; a numerics change. Where the QKVG all-to-all runs, it then moves Q/K/V only: each owner keeps its rows' output gate and normalizes and gates the returned heads itself, with the same bits as gating before the exchange under the bf16 payload (under int8-block16 the gate no longer takes the INT8 encoding, so the bits differ from gating the decoded gate); the owners' gate rows live in one buffer prepared before the KV pool is sized (owned-row limit / TP × 8192 BF16: 96 MiB a rank at 24576 rows, TP4). Decode forwards keep the reduce-scatter. Refused for other checkpoints, under --numerics rl-bitwise, and at startup when the server prepares no Iris owned-row layout for it (Iris needs gfx950 and attention TP 4 or 8; the layout needs forwards large enough for its row boundary); live weight updates are refused with all-to-all. |
Qwen FP8 attention projections
Online conversion applies to floating target projection weights. It preserves existing FP8 configs and per-projection formats in mixed checkpoints. MTP draft projections follow the checkpoint.
Group128 quantizes floating weights once after loading with 128×128 block scales and dynamically quantizes activation rows in groups of 128 channels. The GEMM returns the model's floating activation dtype. On SM100/SM103, --dense-gemm-backend deepgemm prepares UE8M0 weight scales and writes activation scales directly into the packed layout. The auto backend uses FP32 scales for this online block FP8 path.
For an NVFP4 checkpoint with floating attention projections, add the following options to your server command:
--quantization nvfp4 --enable-fp8-attn-projTarget models resolve the projection switch once and pass it to their layers. MTP backbones explicitly disable additional online FP8 projection quantization and retain their checkpoint quantization policy.
GDN splits its input into an FP8 QKVZ GEMM and a floating BA GEMM. Any split QKVZ/BA projection uses BA overlap when an auxiliary stream is available, regardless of quantization format. The streams join before the attention boundary. The standard FP8 exclusions cover BA, convolution, and Mamba mixer projections. Explicit checkpoint exclusions also apply. With the switch off, floating GDN checkpoint projections stay floating even with a global online FP8 config. Serialized GDN projections use the checkpoint config.
Projection fusion
With packed DeepGEMM scales, eligible BF16 output projections fuse activation quantization with the full-attention sigmoid gate or GDN per-head RMSNorm and SiLU/sigmoid gate. This path preserves the BF16 rounding boundary and supports group128, CUDA Graph, and PDL. Fusion requires a power-of-two head width of at least 128 and BF16 norm weights for GDN. Other supported projection layouts apply the gate or norm before a separate quantization launch.