diff --git a/vllm/model_executor/layers/quantization/awq_sm70_moe.py b/vllm/model_executor/layers/quantization/awq_sm70_moe.py index 55c04916ee..1d04f5f3ca 100644 --- a/vllm/model_executor/layers/quantization/awq_sm70_moe.py +++ b/vllm/model_executor/layers/quantization/awq_sm70_moe.py @@ -503,7 +503,14 @@ def _set_parameter( name: str, value: torch.Tensor, ) -> None: - param = value if isinstance(value, Parameter) else Parameter(value) + # Required by int32 torch.empty(int32) buffers: the Parameter ctor itself + # refuses or warns when an int tensor is registered with requires_grad=True + # (the default). Pass the flag in directly so the constructor sees it from + # line one. The trailing param.requires_grad_(False) stays as a no-op + # idempotent guard for the already-Parameter path. + param = ( + value if isinstance(value, Parameter) else Parameter(value, requires_grad=False) + ) param.requires_grad_(False) setattr(layer, name, param)