diff --git a/python/sglang/srt/layers/quantization/unquant.py b/python/sglang/srt/layers/quantization/unquant.py index 1ade4ed9e..6bc946f71 100644 --- a/python/sglang/srt/layers/quantization/unquant.py +++ b/python/sglang/srt/layers/quantization/unquant.py @@ -584,6 +584,9 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, MultiPlatformOp): from sgl_kernel import fused_experts topk_weights, topk_ids, _ = topk_output + if moe_runner_config.apply_router_weight_on_input: + x = x * topk_weights.to(x.dtype) + topk_weights = torch.ones_like(topk_weights) output = fused_experts( x, layer.w13_weight,