From 30e956fad3b4f3d79420321d608aaba262d3cebe Mon Sep 17 00:00:00 2001 From: Rajeev Warrier Date: Fri, 2 Oct 2026 18:51:43 +0530 Subject: [PATCH] [Docs] Fix stale W4A16 NVFP4 default kernel in ModelOpt docs (#59135) Signed-off-by: Rajeev Warrier Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/features/quantization/modelopt.md | 4 +--- vllm/model_executor/layers/quantization/modelopt.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/features/quantization/modelopt.md b/docs/features/quantization/modelopt.md index c93e7e15df..a624261527 100644 --- a/docs/features/quantization/modelopt.md +++ b/docs/features/quantization/modelopt.md @@ -33,9 +33,7 @@ following `quantization.quant_algo` values: `flashinfer_cutlass`, `flashinfer_cutedsl`, `flashinfer_trtllm`, `flashinfer_cudnn`, and `marlin`; see `KernelConfig` on the [Engine Arguments](../../configuration/engine_args.md) page and shown by - `vllm serve --help=KernelConfig`. For `W4A16_NVFP4`, `auto` currently - selects Marlin. Models with BF16 activations can explicitly select the - FlashInfer CuTe-DSL backend with `--linear-backend flashinfer_cutedsl`. + `vllm serve --help=KernelConfig`. !!! note For models quantized to MXFP8 with BF16 activations on SM100-family GPUs, diff --git a/vllm/model_executor/layers/quantization/modelopt.py b/vllm/model_executor/layers/quantization/modelopt.py index 90ac2b8c79..ae6ab3d50f 100644 --- a/vllm/model_executor/layers/quantization/modelopt.py +++ b/vllm/model_executor/layers/quantization/modelopt.py @@ -2314,9 +2314,9 @@ def select_linear_kernel( w = spec.weight assert isinstance(w, QuantKey), f"resolve() must supply a weight key, got {w!r}" if w.dtype == FP4_DTYPE: - # W4A16 (activation is None) → use_a16=True defaults to Marlin *and* - # honors --linear-backend (matches upstream ModelOptNvFp4W4A16LinearMethod - # after #50273); W4A4 → use_a16=False. + # W4A16 (activation is None) → use_a16=True, auto prefers FlashInfer + # CuTe-DSL backend on SM100/103 when available and Marlin otherwise, + # and honors --linear-backend (#50273); W4A4 → use_a16=False. return init_nvfp4_linear_kernel(use_a16=spec.activation is None) if w.scale.dtype == MXFP8_SCALE_DTYPE: return init_mxfp8_linear_kernel(