Repository navigation
Conversation
8143949 to
79b2934
Compare
| Expert parallelism degree. 1 means disabled. No effect for non-MoE models. | ||
| Currently, it is supported with the following constraints: | ||
| - when etp = tp: cp * tp <= ep <= dp_shard * cp * tp | ||
| - when etp = 1: cp * tp <= ep <= dp_shard * cp * tp |
There was a problem hiding this comment.
Can we also add some comments about the divisibility constraints? For instance, we require ep % cp = 0 and dp_shard * cp % ep == 0. Or do you think since people usually use powers of 2 this is not needed?
There was a problem hiding this comment.
Sounds good, I can add something. Fwiw I used to use | symbol to denote mod x == 0 but people don't seem to understand what it means.
There was a problem hiding this comment.
Yeah, I think the % symbol is more common?
|
|
||
|
|
||
| class TokenChoiceTopKRouter(nn.Module): | ||
| class TokenRouter(nn.Module): |
There was a problem hiding this comment.
I feel the earlier name was more descriptive, since we are doing the torch.topk operation in this module. TokenRouter seems more like just the routing part of token choice.
|
I added a couple of nit comments. The loss curves look consistent. LGTM! |
|
@tianyu-l this is very cool. Could you help clarify what's the difference between ETP and EP + TP on a high-level? Do you have an example config to run it, please? |
fixes bug introduced in #1555
…tants (#160805) Used in pytorch/torchtitan#1555 Pull Request resolved: #160805 Approved by: https://github.com/StrongerXi, https://github.com/mlazos
This is a followup of original EP support pytorch#1324 ### PR summary [TBA] description + figure ### numerics verification setup - optimizer Adam - steps 100, warmup_steps 20 - seed 42 comparison set - FSDP 2 - FSDP 2, CP 2, TP 2, EP 8, ETP 1 - FSDP 2 (EP 2), PP 2, TP 2 (ETP 2) <img width="1316" height="392" alt="image" src="https://github.com/user-attachments/assets/2aa63714-a31e-4152-b904-cc889f8434a1" />
fixes bug introduced in pytorch#1555
This is a followup of original EP support pytorch#1324 ### PR summary [TBA] description + figure ### numerics verification setup - optimizer Adam - steps 100, warmup_steps 20 - seed 42 comparison set - FSDP 2 - FSDP 2, CP 2, TP 2, EP 8, ETP 1 - FSDP 2 (EP 2), PP 2, TP 2 (ETP 2) <img width="1316" height="392" alt="image" src="https://github.com/user-attachments/assets/2aa63714-a31e-4152-b904-cc889f8434a1" />
fixes bug introduced in pytorch#1555
This is a followup of original EP support #1324
PR summary
[TBA] description + figure
numerics verification
setup
comparison set