[CI] Upgrade to newest pta.(MLA and FusedMoE) (#189)

Upgrade to newest pta.(MLA and FusedMoE)

---------

Signed-off-by: SidaoY <1024863041@qq.com>
This commit is contained in:
HongtaoYang
2025-02-27 18:50:52 +08:00
committed by GitHub
parent c131e43e7d
commit 1715230867
2 changed files with 26 additions and 56 deletions

View File

@@ -50,10 +50,9 @@ def group_topk(hidden_states: torch.Tensor,
topk_group = 0 if topk_group is None else topk_group
num_expert_group = 0 if num_expert_group is None else num_expert_group
torch_npu.npu_group_topk(input=scores,
out=scores,
group_num=num_expert_group,
k=topk_group)
torch_npu._npu_group_topk(self=scores,
k=topk_group,
group_num=num_expert_group)
if e_score_correction_bias is not None:
topk_ids = torch.topk(scores, k=topk, dim=-1, sorted=False)[1]
# Use original unbiased scores for the routing weights