[NPU][1/N] NPU basic functions refactor and new modelslim quant type (#13359)
This commit is contained in:
@@ -39,7 +39,7 @@ from sglang.srt.layers.quantization.quark.quark import QuarkConfig
|
||||
from sglang.srt.layers.quantization.w4afp8 import W4AFp8Config
|
||||
from sglang.srt.layers.quantization.w8a8_fp8 import W8A8Fp8Config
|
||||
from sglang.srt.layers.quantization.w8a8_int8 import W8A8Int8Config
|
||||
from sglang.srt.utils import is_cuda, is_hip, mxfp_supported
|
||||
from sglang.srt.utils import is_cuda, is_hip, is_npu, mxfp_supported
|
||||
|
||||
_is_mxfp_supported = mxfp_supported()
|
||||
|
||||
@@ -78,6 +78,15 @@ if is_cuda() or (_is_mxfp_supported and is_hip()):
|
||||
}
|
||||
)
|
||||
|
||||
if is_npu():
|
||||
from sglang.srt.hardware_backend.npu.quantization.modelslim import ModelSlimConfig
|
||||
|
||||
BASE_QUANTIZATION_METHODS.update(
|
||||
{
|
||||
"modelslim": ModelSlimConfig,
|
||||
}
|
||||
)
|
||||
|
||||
QUANTIZATION_METHODS = {**BASE_QUANTIZATION_METHODS}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user