Support running FP4 Deepseek on SM120. (#11708)

This commit is contained in:
weiliang
2025-10-28 08:37:49 +08:00
committed by GitHub
parent a6ea3add76
commit 88596739a4
9 changed files with 33 additions and 35 deletions

View File

@@ -39,6 +39,7 @@ from sglang.srt.utils.common import (
get_device,
get_device_memory_capacity,
get_device_sm,
is_blackwell_supported,
is_cuda,
is_fa3_default_architecture,
is_flashinfer_available,
@@ -913,7 +914,7 @@ class ServerArgs:
f"- Decode: {decode_attn_backend}\n"
)
if is_sm100_supported():
if is_blackwell_supported():
if not self.enable_dp_attention:
self.enable_flashinfer_allreduce_fusion = True
logger.info(
@@ -925,7 +926,7 @@ class ServerArgs:
and quantization_config.get("quant_method") == "mxfp4"
)
if is_sm100_supported() and is_mxfp4_quant_format:
if is_blackwell_supported() and is_mxfp4_quant_format:
self.moe_runner_backend = "flashinfer_mxfp4"
logger.warning(
"Detected SM100 and MXFP4 quantization format for GPT-OSS model, enabling FlashInfer MXFP4 MOE kernel."
@@ -1145,7 +1146,7 @@ class ServerArgs:
self.attention_backend == "trtllm_mla"
or self.decode_attention_backend == "trtllm_mla"
):
if not is_sm100_supported():
if not is_blackwell_supported():
raise ValueError(
"TRTLLM MLA backend is only supported on Blackwell GPUs (SM100). Please use a different backend."
)