From f2eebd5533a932adfc66fb7525a6ba741a61f417 Mon Sep 17 00:00:00 2001 From: Byron Hsu Date: Wed, 23 Sep 2026 11:18:04 -0700 Subject: [PATCH] [RL] Fix Kimi K3 expert-count lookup for routed-expert capture (#40700) --- python/sglang/srt/configs/kimi_linear.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/sglang/srt/configs/kimi_linear.py b/python/sglang/srt/configs/kimi_linear.py index 45e4838c42..82f155c18d 100644 --- a/python/sglang/srt/configs/kimi_linear.py +++ b/python/sglang/srt/configs/kimi_linear.py @@ -9,6 +9,8 @@ from sglang.srt.runtime_context import get_parallel class KimiLinearConfig(PretrainedConfig): model_type = "kimi_linear" + # Shared MoE utilities use the abbreviated name; checkpoints keep the original. + attribute_map = {"num_experts_per_tok": "num_experts_per_token"} keys_to_ignore_at_inference = ["past_key_values"] def __init__(