[XPU] Support apply_router_weight_on_input for Llama4 for fused_experts (#22654)
merge this one as it is xpu only change.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user