Skip to content

Commit

Permalink
Update moe_layer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmosZhou authored Dec 22, 2024
1 parent 011e96d commit 8150c02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions megatron_patch/model/qwen2/moe/moe_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def __init__(
)
self.shared_expert = MLP(self.config, mlpSubmodules, is_expert=False, is_shared_expert=True)
self.shared_expert_gate = torch.nn.Linear(config.hidden_size, 1, bias=False)
self.shared_expert_gate.weight.sequence_parallel = config.sequence_parallel

if self.config.moe_grouped_gemm:
if isinstance(self.submodules, MLPSubmodules):
Expand Down

0 comments on commit 8150c02

Please sign in to comment.