[Quantization] Remove dead `QuantizationConfig.is_mxfp4_quant` (#51793)

Signed-off-by: Felix Marty <Felix.Marty@amd.com>

fxmarty-amd committed Aug 13, 2026 at 19:58 UTC 48825acc232f06380f15124b9a1ea7076939e88c
4 files changed -41
vllm/model_executor/layers/quantization/base_config.py
-16
@@ -258,19 +258,3 @@ class QuantizationConfig(ABC):
258 # TODO: revision is never passed currently in vllm.py,
259 # but is used in subclasses, should we remove this parameter?
260 pass
261 -
262 - def is_mxfp4_quant(self, prefix: str, layer: torch.nn.Module) -> bool:
263 - """
264 - Determine if mxfp4 quantization will be used for this config.
265 -
266 - This allows hidden_size rounding to happen before moe_config creation
267 - without needing to instantiate quant_method first.
268 -
269 - Args:
270 - prefix: The layer prefix/name in the model
271 - layer: The layer module
272 -
273 - Returns:
274 - True if this config uses MXFP4 quantization, False otherwise
275 - """
276 - return False
vllm/model_executor/layers/quantization/mxfp4.py
-4
@@ -104,10 +104,6 @@ class Mxfp4Config(QuantizationConfig):
104 )
105 return None
106
107 - def is_mxfp4_quant(self, prefix: str, layer: torch.nn.Module) -> bool:
108 - """MXFP4 config always uses MXFP4 quantization."""
109 - return True
110 -
107
108 class GptOssMxfp4Config(Mxfp4Config):
109 """MXFP4 config for GPT-OSS checkpoints.
vllm/model_executor/layers/quantization/quark/quark.py
-16
@@ -576,22 +576,6 @@ class QuarkConfig(QuantizationConfig):
576
577 return True
578
579 - def is_mxfp4_quant(self, prefix: str, layer: torch.nn.Module) -> bool:
580 - """
581 - For Quark, determine if it's OCP MXFP4 by checking config directly.
582 - This allows hidden_size rounding to happen before moe_config creation.
583 - """
584 - layer_quant_config = self._find_matched_config(prefix, layer)
585 - weight_config = layer_quant_config.get("weight")
586 - input_config = layer_quant_config.get("input_tensors")
587 -
588 - return (
589 - self._is_w_ocp_mx_a_x(weight_config, input_config)
590 - and weight_config is not None
591 - and weight_config.get("dtype") == "fp4"
592 - and getattr(torch, "float4_e2m1fn_x2", None) is not None
593 - )
594 -
579 def _find_matched_config(
580 self, layer_name: str, module: torch.nn.Module
581 ) -> dict[str, Any]:
vllm/models/deepseek_v4/quant_config.py
-5
@@ -192,8 +192,3 @@ class DeepseekV4FP8Config(Fp8Config):
192 # expert_dtype == "fp8": fall through to Fp8Config which
193 # returns Fp8MoEMethod with block-wise float32 scales.
194 return super().get_quant_method(layer, prefix)
195 -
196 - def is_mxfp4_quant(self, prefix, layer):
197 - if not isinstance(layer, RoutedExperts) or self.expert_dtype != "fp4":
198 - return False
199 - return self.moe_quant_algo != "NVFP4"