[Main][Refactor]Change ASCEND_QUATIZATION_METHOD to ASCEND_QUANTIZATION_METHOD (#2517)

### What this PR does / why we need it?
The constant ASCEND_QUATIZATION_METHOD in vllm_ascend/utils.py is
misspelled and should be corrected to ASCEND_QUANTIZATION_METHOD.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
CI passed with new added/existing test.

- vLLM version: v0.10.1.1
- vLLM main:
c9abb10489

Signed-off-by: zhanghaiwen <zhanghaiwen@cmss.chinamobile.com>
Co-authored-by: zhanghaiwen <zhanghaiwen@cmss.chinamobile.com>
This commit is contained in:
zhanghw0354
2025-08-26 09:06:16 +08:00
committed by GitHub
parent 21b5727f9a
commit b3fdd78a6b
5 changed files with 16 additions and 17 deletions

View File

@@ -36,12 +36,12 @@ from vllm.model_executor.parameter import PerTensorScaleParameter
from vllm.model_executor.utils import set_weight_attrs
from vllm_ascend.ops.fused_moe import AscendUnquantizedFusedMoEMethod
from vllm_ascend.utils import ASCEND_QUATIZATION_METHOD
from vllm_ascend.utils import ASCEND_QUANTIZATION_METHOD
from .quantizer import AscendQuantizer
@register_quantization_config(ASCEND_QUATIZATION_METHOD)
@register_quantization_config(ASCEND_QUANTIZATION_METHOD)
class AscendQuantConfig(QuantizationConfig):
"""Config class for Ascend
@@ -57,7 +57,7 @@ class AscendQuantConfig(QuantizationConfig):
@classmethod
def get_name(cls) -> str:
return ASCEND_QUATIZATION_METHOD
return ASCEND_QUANTIZATION_METHOD
@classmethod
def get_supported_act_dtypes(cls) -> List[torch.dtype]:
@@ -80,7 +80,7 @@ class AscendQuantConfig(QuantizationConfig):
def override_quantization_method(cls, hf_quant_cfg,
user_quant) -> Optional[str]:
if torch.npu.is_available():
return ASCEND_QUATIZATION_METHOD
return ASCEND_QUANTIZATION_METHOD
return None
def get_quant_method(self, layer: torch.nn.Module,