From 66989a76425280fb099c77cf00073db0fd54e497 Mon Sep 17 00:00:00 2001 From: YanbingJiang Date: Thu, 11 Jun 2026 09:16:16 +0800 Subject: [PATCH] Fix gpt-oss-20b with mxfp4 support for Xeon (#27782) --- python/sglang/srt/layers/quantization/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/quantization/__init__.py b/python/sglang/srt/layers/quantization/__init__.py index d104c8f4f..612a016d7 100644 --- a/python/sglang/srt/layers/quantization/__init__.py +++ b/python/sglang/srt/layers/quantization/__init__.py @@ -55,6 +55,7 @@ from sglang.srt.layers.quantization.w8a8_int8 import W8A8Int8Config from sglang.srt.platforms import current_platform from sglang.srt.utils import ( cpu_has_amx_support, + is_cpu, is_cuda, is_hip, is_mps, @@ -99,7 +100,7 @@ BASE_QUANTIZATION_METHODS: Dict[str, Type[QuantizationConfig]] = { } -if is_cuda() or (_is_mxfp_supported and is_hip()): +if is_cpu() or is_cuda() or (_is_mxfp_supported and is_hip()): BASE_QUANTIZATION_METHODS.update( { "mxfp4": Mxfp4Config, @@ -130,6 +131,7 @@ CPU_QUANTIZATION_METHODS = { "compressed-tensors": CompressedTensorsConfig, "awq": AWQCPUConfig, "gptq": CPUGPTQConfig, + "mxfp4": Mxfp4Config, } QUANTIZATION_METHODS = {**BASE_QUANTIZATION_METHODS}