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(