Skip to content

Commit

Permalink
Merge branch 'master' into jomayeri/aio-locked-tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
tjruwase authored Oct 9, 2024
2 parents a008d4c + 474a328 commit 59d8dfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepspeed/module_inject/auto_tp.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ def _replace(self, child, name, conv_linear_layer):
weight_shape = child.weight.shape
mp_replace = ReplaceWithTensorSlicing(mp_group=self.mp_group)
# For mixtral-7x8b, need to skip MoE gate linear replace.
if name == "block_sparse_moe.gate":
if name == "block_sparse_moe.gate" or (('mlp.shared_expert_gate' == name or 'mlp.gate' == name)
and 'qwen2_moe' in str(type(self.module))):
return child
# For Yuan model
if 'Yuan' in str(self.module):
Expand Down
1 change: 1 addition & 0 deletions docs/_tutorials/automatic-tensor-parallelism.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ The following model families have been successfully tested with automatic tensor
- plbart
- qwen
- qwen2
- qwen2-moe
- reformer
- roberta
- roformer
Expand Down

0 comments on commit 59d8dfa

Please sign in to comment.