From d2d19a4c3c75cd1742c82eb2974bf066ce86b738 Mon Sep 17 00:00:00 2001 From: Slightwind Date: Thu, 23 Oct 2025 21:26:50 +0800 Subject: [PATCH] [v0.11.0][bugfix] Add 'layer_type' param to get_pergroup_param() for compatibility (#3684) Resolves a `TypeError: got an unexpected keyword argument 'layer_type'`. A recent change (PR #3311) started passing the `layer_type` argument when calling `get_pergroup_param()`. This specific implementation does not use this parameter, causing the error. This patch adds `layer_type=None` to the method signature to maintain API compatibility and ignore the unused argument. Signed-off-by: SlightwindSec --- vllm_ascend/quantization/w4a4_flatquant_dynamic.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vllm_ascend/quantization/w4a4_flatquant_dynamic.py b/vllm_ascend/quantization/w4a4_flatquant_dynamic.py index efc643c..326980f 100644 --- a/vllm_ascend/quantization/w4a4_flatquant_dynamic.py +++ b/vllm_ascend/quantization/w4a4_flatquant_dynamic.py @@ -130,8 +130,11 @@ class AscendW4A4FlatQuantDynamicLinearMethod: dtype=torch.float32) return params_dict - def get_pergroup_param(self, input_size: int, output_size: int, - params_dtype: torch.dtype) -> Dict[str, Any]: + def get_pergroup_param(self, + input_size: int, + output_size: int, + params_dtype: torch.dtype, + layer_type: Optional[str] = None) -> Dict[str, Any]: return {} @staticmethod