[Bugfix] Fix six quantization exception messages split across positional args (#50479)

Signed-off-by: ErenAta16 <erena6466@gmail.com>

ErenAta16 committed Aug 21, 2026 at 19:06 UTC fbb17e780b1b6e91b3eb9777eb44d3288c2c30b6
3 files changed +17 -17
vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py
+8 -8
@@ -384,17 +384,17 @@ class CompressedTensorsConfig(QuantizationConfig):
384 supported = capability == min_capability
385 if error and not supported:
386 raise RuntimeError(
387 - "Quantization scheme is not supported for ",
388 - "the current GPU. Required capability: ",
389 - f"{min_capability}. Current capability: {capability}.",
387 + "Quantization scheme is not supported for the current GPU. "
388 + f"Required capability: {min_capability}. "
389 + f"Current capability: {capability}."
390 )
391 else:
392 supported = capability >= min_capability
393 if error and not supported:
394 raise RuntimeError(
395 - "Quantization scheme is not supported for ",
396 - f"the current GPU. Min capability: {min_capability}. ",
397 - f"Current capability: {capability}.",
395 + "Quantization scheme is not supported for the current GPU. "
396 + f"Min capability: {min_capability}. "
397 + f"Current capability: {capability}."
398 )
399 return supported
400 else:
@@ -737,8 +737,8 @@ class CompressedTensorsConfig(QuantizationConfig):
737
738 if not self._is_nvfp4_format(input_quant):
739 raise ValueError(
740 - "For NVFP4 weights, input quantization must also be NVFP4 format, ",
741 - "None for NVFP4A16",
740 + "For NVFP4 weights, input quantization must also be NVFP4 "
741 + "format, None for NVFP4A16"
742 )
743 return CompressedTensorsW4A4Fp4()
744
vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe/compressed_tensors_moe.py
+6 -6
@@ -81,11 +81,11 @@ class CompressedTensorsMoEMethod(FusedMoEMethodBase):
81
82 if not valid_format_and_bits:
83 raise ValueError(
84 - "For Fused MoE layers, only format: ",
85 - f"{CompressionFormat.pack_quantized.value} ",
86 - f" and bits: {WNA16_SUPPORTED_BITS} is supported ",
84 + "For Fused MoE layers, only format: "
85 + f"{CompressionFormat.pack_quantized.value} "
86 + f"and bits: {WNA16_SUPPORTED_BITS} is supported "
87 f"but got format: {CompressionFormat.pack_quantized.value} "
88 - f" and bits: {weight_quant.num_bits}",
88 + f"and bits: {weight_quant.num_bits}"
89 )
90
91 # Native ROCm HIP kernels (RDNA3, etc.)
@@ -145,8 +145,8 @@ class CompressedTensorsMoEMethod(FusedMoEMethodBase):
145 )
146 if not _is_valid_nvfp4_activations:
147 raise ValueError(
148 - "For NVFP4 weights, input quantization must also be NVFP4 format ",
149 - f"or None for NVFP4A16, found {input_quant}",
148 + "For NVFP4 weights, input quantization must also be NVFP4 "
149 + f"format or None for NVFP4A16, found {input_quant}"
150 )
151 return CompressedTensorsW4A4Nvfp4MoEMethod(
152 layer.moe_config, layer_name, use_a16=(input_quant is None)
vllm/model_executor/layers/quantization/quark/quark.py
+3 -3
@@ -280,9 +280,9 @@ class QuarkConfig(QuantizationConfig):
280 supported = capability >= min_capability
281 if error and not supported:
282 raise RuntimeError(
283 - "Quantization scheme is not supported for ",
284 - f"the current GPU. Min capability: {min_capability}. ",
285 - f"Current capability: {capability}.",
283 + "Quantization scheme is not supported for the current GPU. "
284 + f"Min capability: {min_capability}. "
285 + f"Current capability: {capability}."
286 )
287 return supported
288 else: