From c7adca99929c350ab27901b208abe79080e858cf Mon Sep 17 00:00:00 2001 From: Yuan Luo Date: Tue, 31 Mar 2026 21:07:08 +0800 Subject: [PATCH] Fix kimi-linear launch server error (#21752) Co-authored-by: luoyuan.luo --- python/sglang/srt/configs/model_config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/sglang/srt/configs/model_config.py b/python/sglang/srt/configs/model_config.py index 6a004c0ff..7142f56af 100644 --- a/python/sglang/srt/configs/model_config.py +++ b/python/sglang/srt/configs/model_config.py @@ -491,6 +491,11 @@ class ModelConfig: self.qk_rope_head_dim = self.hf_config.qk_rope_head_dim self.v_head_dim = self.hf_config.v_head_dim self.qk_nope_head_dim = self.hf_config.qk_nope_head_dim + self.scaling = 1 / math.sqrt(self.qk_nope_head_dim + self.qk_rope_head_dim) + if self.hf_config.rope_scaling: + self.scaling = compute_mla_mscale_scaling( + self.hf_config.rope_scaling, self.scaling + ) elif ( "BailingMoeV2_5ForCausalLM" in self.hf_config.architectures or "BailingMoeForCausalLMNextN" in self.hf_config.architectures