From e90fec48684f479ce9d721caff42edf9e13fcddd Mon Sep 17 00:00:00 2001 From: Polisetty V R K Jyothendra Varma Date: Fri, 3 Jul 2026 13:29:12 +0530 Subject: [PATCH] [Intel GPU] DeepSeek V4 10/N : Add sqrtsoftplus support to fused_topk_torch_native (#28048) Signed-off-by: Rahul Vijayaraghavan Signed-off-by: P V R K Jyothendra Varma Co-authored-by: Rahul Vijayaraghavan Co-authored-by: Ma Mingfei --- 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 1b23554f7..a355707be 100644 --- a/python/sglang/srt/layers/moe/topk.py +++ b/python/sglang/srt/layers/moe/topk.py @@ -652,6 +652,8 @@ def fused_topk_torch_native( return gating_output.softmax(dim=-1) elif scoring_func == "sigmoid": return gating_output.sigmoid() + elif scoring_func == "sqrtsoftplus": + return F.softplus(gating_output).sqrt() else: raise ValueError(f"Invalid scoring function: {scoring_func}")