From c674bf9c6b0af0d5eec89384cb2e7f5465b7a3a0 Mon Sep 17 00:00:00 2001 From: Cao E Date: Thu, 21 Aug 2025 10:18:48 +0800 Subject: [PATCH] Fix biased_grouped_topk_cpu (#9420) --- python/sglang/srt/layers/moe/topk.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/sglang/srt/layers/moe/topk.py b/python/sglang/srt/layers/moe/topk.py index bf8981c13..e3c7018bb 100644 --- a/python/sglang/srt/layers/moe/topk.py +++ b/python/sglang/srt/layers/moe/topk.py @@ -709,8 +709,10 @@ def biased_grouped_topk_cpu( routed_scaling_factor: Optional[float] = None, num_token_non_padded: Optional[torch.Tensor] = None, expert_location_dispatch_info: Optional[ExpertLocationDispatchInfo] = None, + apply_routed_scaling_factor_on_output: Optional[bool] = False, ): assert expert_location_dispatch_info is None + assert not apply_routed_scaling_factor_on_output, "Not implemented" return torch.ops.sgl_kernel.biased_grouped_topk_cpu( hidden_states, gating_output,