From 5e0380fb89731a6225fdc4155ff18a7a2c9097ae Mon Sep 17 00:00:00 2001 From: "luoyuan.luo" Date: Tue, 31 Mar 2026 17:40:36 +0800 Subject: [PATCH] Fix kimi-linear launch server error --- 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 6a004c0ffc1f..7142f56afc06 100644 --- a/python/sglang/srt/configs/model_config.py +++ b/python/sglang/srt/configs/model_config.py @@ -491,6 +491,11 @@ def _derive_model_shapes(self): 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