@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f284d7bd0c
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 11, 07:30 UTC

[Bug] Fix AttributeError: 'ColumnParallelLinear' object has no attribute `weight_scale_inv` (#30823)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Dec 17, 2025 at 05:00 UTC f284d7bd0c55f929fa7912936b1d247089679191
1 file changed +5 -2
vllm/model_executor/layers/quantization/utils/fp8_utils.py
+5 -2
@@ -1437,14 +1437,17 @@ def maybe_post_process_fp8_weight_block(layer: torch.nn.Module):
1437 layer.orig_dtype, layer.weight
1438 )
1439 if should_use_deepgemm:
1440 + scale_attr = (
1441 + "weight_scale_inv" if hasattr(layer, "weight_scale_inv") else "weight_scale"
1442 + )
1443 dg_weight, dg_weight_scale = deepgemm_post_process_fp8_weight_block(
1444 wq=layer.weight.data,
1442 - ws=layer.weight_scale_inv.data,
1445 + ws=getattr(layer, scale_attr).data,
1446 quant_block_shape=tuple(layer.weight_block_size),
1447 use_e8m0=is_deep_gemm_e8m0_used(),
1448 )
1449 replace_parameter(layer, "weight", dg_weight)
1447 - replace_parameter(layer, "weight_scale_inv", dg_weight_scale)
1450 + replace_parameter(layer, scale_attr, dg_weight_scale)
1451
1452
1453 def expert_weight_is_col_major(x: torch.Tensor) -> bool: