From eef44ec916fe24119e68117b2deeea3b03e7a88f Mon Sep 17 00:00:00 2001 From: KnightLTC <56717110+KnightLTC@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:36:38 +0800 Subject: [PATCH] [NPU]kimi k2 thinking bugfix (#19387) Co-authored-by: sglang-npu-bot --- python/sglang/srt/layers/moe/fused_moe_triton/layer.py | 1 + .../compressed_tensors/schemes/compressed_tensors_wNa16_moe.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/moe/fused_moe_triton/layer.py b/python/sglang/srt/layers/moe/fused_moe_triton/layer.py index 61b919270..da7157c8a 100644 --- a/python/sglang/srt/layers/moe/fused_moe_triton/layer.py +++ b/python/sglang/srt/layers/moe/fused_moe_triton/layer.py @@ -292,6 +292,7 @@ class FusedMoE(torch.nn.Module): else self.weight_loader_fused ), with_bias=with_bias, + moe_intermediate_size=intermediate_size, ) self.quant_method.create_moe_runner(self, self.moe_runner_config) diff --git a/python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16_moe.py b/python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16_moe.py index 6264f36d0..7a8fb6542 100644 --- a/python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16_moe.py +++ b/python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16_moe.py @@ -503,7 +503,7 @@ class NPUCompressedTensorsW4A16Int4DynamicMoE(CompressedTensorsMoEScheme): self.num_experts = num_experts if ( extra_weight_attrs.get( - "intermediate_size_full", intermediate_size_per_partition + "moe_intermediate_size", intermediate_size_per_partition ) // intermediate_size_per_partition > 1