Skip to content

Commit

Permalink
enable phi2 autotp (#5436)
Browse files Browse the repository at this point in the history
This PR aims to enable phi2 model autotp.

---------

Co-authored-by: Logan Adams <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
  • Loading branch information
3 people authored May 13, 2024
1 parent 4696afd commit 3a7f3aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deepspeed/module_inject/auto_tp.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ def tp_parser(model):
# Mixtral-7x8b used w2*act(w1*w3) linear. need to replace w2 to linearallreduce.
elif 'w2' in layer and 'Mixtral' in str(type(module)):
gem_list = gem_list + [layer]
elif "self_attn.dense" in layer and "Phi" in str(type(module)):
gem_list = gem_list + [layer]

layer_list = []
if gem_list != []:
Expand Down

0 comments on commit 3a7f3aa

Please sign in to comment.