From 2b0ddf89f52ae1ec8553b89a992c9b0acb5b09e8 Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Thu, 18 Dec 2025 13:45:26 -0800 Subject: [PATCH] [Tiny]Add warning for deepgemm on Blackwell (#15352) --- python/sglang/srt/configs/model_config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/sglang/srt/configs/model_config.py b/python/sglang/srt/configs/model_config.py index 26bb2b6fc..c749dfdaa 100644 --- a/python/sglang/srt/configs/model_config.py +++ b/python/sglang/srt/configs/model_config.py @@ -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(