vllm.model_executor.layers.quantization.online.fp8_requant
¶
Block-FP8 routed experts re-quantized to MXFP4 at load (ROCm).
VLLM_FP8_MOE_REQUANT=mxfp4 keeps the checkpoint's block-FP8 expert
weights for loading and, once loaded, dequantizes each expert to bf16 and
quantizes it to MXFP4 (e2m1 values, e8m0 block-32 scales) for the aiter MXFP4
MoE kernels: half the expert bytes of FP8. VLLM_FP8_MOE_REQUANT_ACT selects
the activation dtype: a8w4 (fp8 per-token; aiter's interleaved FlyDSL kernels,
the AITER_MXFP4_BF16 backend; default), a4w4 (MXFP4 activations,
AITER_MXFP4_MXFP4) or a16w4 (bf16, AITER_TRITON_MXFP4_BF16).
Classes:
-
Fp8BlockExpertsAsMxfp4FusedMoE–Block-FP8 routed experts stored as MXFP4 (VLLM_FP8_MOE_REQUANT=mxfp4).
Fp8BlockExpertsAsMxfp4FusedMoE
¶
Bases: Mxfp4OnlineMoEMethod
Block-FP8 routed experts stored as MXFP4 (VLLM_FP8_MOE_REQUANT=mxfp4).
Weights are created and loaded by Fp8MoEMethod (fp8 values + block
weight_scale_inv), so the checkpoint loader is unchanged; the
re-quantization happens in process_weights_after_loading. Rounding the
values to the e2m1 grid with power-of-two block-32 scales is lossy: the
weight error is of the order of an MXFP4 quantization of the bf16 weights.