[Tiny]Add warning for deepgemm on Blackwell (#15352)

This commit is contained in:
Baizhou Zhang
2025-12-18 13:45:26 -08:00
committed by GitHub
parent 17e81c750a
commit 2b0ddf89f5

View File

@@ -753,6 +753,15 @@ class ModelConfig:
f"({self.quantization})."
)
# Check if the scale_fmt is ue8m0, and warn user if deepgemm is enabled for non-ue8m0 models on blackwell
self.use_scale_ue8m0 = quant_cfg.get("scale_fmt", None) == "ue8m0"
from sglang.srt.layers import deep_gemm_wrapper
if not self.use_scale_ue8m0 and deep_gemm_wrapper.DEEPGEMM_SCALE_UE8M0:
logger.warning(
"DeepGemm is enabled but the scale_fmt of checkpoint is not ue8m0. This might cause accuracy degradation on Blackwell."
)
if self.quantization is not None:
if self.quantization not in supported_quantization:
raise ValueError(