forked from microsoft/Megatron-DeepSpeed
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support MoE for GPTModelPipe (microsoft#373)
* MOE: Support MoE layers creation for GPTModelPipe Signed-off-by: Moshe Island <[email protected]> * MOE: Support MoE aux loss for GPTModelPipe Propagate aux loss along GPTModelPipe layers by forwarding the aggregated loss from each transformer layer to the next transformer layer. In addition, add a layer to GPTModelPipe, after the last transformer layer, to catch the final aggregated aux loss and cache it for use in the loss function. Signed-off-by: Moshe Island <[email protected]> * MOE: Support display of MoE loss for GPTModelPipe Signed-off-by: Moshe Island <[email protected]> * MOE: Verify MoE with no pipe/grad partitioned Currently PipelineEngine supports only a single tensor partitioning with grad. MoE model requires to forward with grad both the activations and the aux_loss. Therefore, until PilelineEngine limitation is removed, verify no partitioning when using MoE. Signed-off-by: Moshe Island <[email protected]> --------- Signed-off-by: Moshe Island <[email protected]> Co-authored-by: Moshe Island <[email protected]>
- Loading branch information
1 parent
3c5f475
commit bcedecd
Showing
3 changed files
with
121 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters