From bb962b0046ee366de624150b40b56c0d2bcb5a0a Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Thu, 23 Apr 2026 16:47:58 -0700 Subject: [PATCH] Fix MoE no_combine: skip router weight in down projection (#23545) --- .../sglang/srt/layers/moe/moe_runner/triton_utils/fused_moe.py | 2 +- python/sglang/srt/layers/moe/token_dispatcher/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/layers/moe/moe_runner/triton_utils/fused_moe.py b/python/sglang/srt/layers/moe/moe_runner/triton_utils/fused_moe.py index cd9b3ad68..a16f42fac 100644 --- a/python/sglang/srt/layers/moe/moe_runner/triton_utils/fused_moe.py +++ b/python/sglang/srt/layers/moe/moe_runner/triton_utils/fused_moe.py @@ -618,7 +618,7 @@ def _fused_moe_kernel_sequence( sorted_token_ids, expert_ids, num_tokens_post_padded, - not apply_router_weight_on_input, + not apply_router_weight_on_input and not no_combine, 1, down_config or config, compute_type=compute_type, diff --git a/python/sglang/srt/layers/moe/token_dispatcher/base.py b/python/sglang/srt/layers/moe/token_dispatcher/base.py index 8134a4dea..3e62d9566 100644 --- a/python/sglang/srt/layers/moe/token_dispatcher/base.py +++ b/python/sglang/srt/layers/moe/token_dispatcher/base.py @@ -262,7 +262,7 @@ class BaseDispatcher(ABC): """Base class for dispatchers.""" def __init__(self): - self.quant_config: Optional[dict] = None + self.quant_config: dict = {} # Overlap args self.overlap_args: Optional[CombineOverlapArgs] = None