Skip to content

Commit d43cabc

Browse files
Clorist33tanqingshan (A)
andauthored
[Bugfix] Fix precision issues in moe_mlp (vllm-ascend main) (#5025)
### What this PR does / why we need it? Use group_list[0] to replace group_diff[0] in function "cumsum_group_list" (moe_mlp.py). The purpose is to modify it to the correct logic of converting cumsum to count. ### Does this PR introduce _any_ user-facing change? No - vLLM version: v0.12.0 - vLLM main: vllm-project/vllm@ad32e3e Signed-off-by: tanqingshan (A) <[email protected]> Co-authored-by: tanqingshan (A) <[email protected]>
1 parent b662d91 commit d43cabc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm_ascend/ops/fused_moe/moe_mlp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def cumsum_group_list(group_list: torch.Tensor,
4646
return group_list.cumsum(dim=0)
4747
if src_list_type == 0 and dst_list_type == 1:
4848
group_diff = torch.diff(group_list)
49-
new_group = torch.cat([group_diff[0].unsqueeze(0), group_diff], dim=0)
49+
new_group = torch.cat([group_list[0].unsqueeze(0), group_diff], dim=0)
5050
return new_group
5151
if src_list_type == 2 and dst_list_type == 0:
5252
experts = pad(group_list[:, 0], (1, 0))

0 commit comments

Comments
 (0)