Skip to content

Commit

Permalink
fix moe op for dlinfer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinerzhou committed Dec 18, 2024
1 parent 1efed79 commit 4c1be55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/pytorch/backends/dlinfer/moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def forward(self,
expert_list: List[int] = None):
"""forward."""
return fused_moe(hidden_states, self.top_k, topk_ids, topk_weights,
gate_up_weights, down_weights)
gate_up_weights, down_weights, self.renormalize)


class DlinferFusedMoEBuilder(FusedMoEBuilder):
Expand Down
1 change: 1 addition & 0 deletions lmdeploy/pytorch/kernels/dlinfer/fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def fused_moe(
topk_weights: Tensor,
gate_up_weights: Tensor,
down_weights: Tensor,
renormalize: bool = False,
):
"""ascend fused moe."""
return ext_ops.fused_moe(hidden_states, top_k, topk_ids, topk_weights,
Expand Down

0 comments on commit 4c1be55

Please sign in to comment.