Skip to content

[PoC][MoE & EP] model code and various parallelisms - #725

Closed
tianyu-l wants to merge 3 commits into
gh/tianyu-l/22/basefrom
gh/tianyu-l/22/head
Closed

tianyu-l wants to merge 3 commits into
gh/tianyu-l/22/basefrom
gh/tianyu-l/22/head

Conversation

@tianyu-l

@tianyu-l tianyu-l commented Dec 9, 2024 •

Copy link
Copy Markdown
Contributor

tianyu-l added a commit that referenced this pull request Dec 9, 2024
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 9, 2024
tianyu-l added a commit that referenced this pull request Dec 9, 2024
@tianyu-l tianyu-l mentioned this pull request Dec 9, 2024
6 tasks
@tianyu-l tianyu-l changed the title remove Router Parallel, set use_local_output=True by default [PoC][MoE & EP] model code and various parallelisms Dec 9, 2024
@tianyu-l
tianyu-l marked this pull request as draft December 9, 2024 21:45
The expert-choice MoE implementation is mostly from torchtune: meta-pytorch/torchtune#1902

Temporary changes to unblock exploration
- [pytorch] comment out the check at https://github.com/pytorch/pytorch/blob/main/torch/distributed/tensor/parallel/api.py#L66
- [torchtitan] for dp2ep, turn optimizers `foreach` and `clip_grad_norm_` off, as not all parameters are DTensors on the same meshes (e.g. in dp2ep `moe.router.gate` is a replicate torch.Tensor)
- [torchtitan] for dp2ep, comment out `apply_fsdp` which would leave the non-expert parameters replicate

Todo
- FSDP / CP integration

Haven't worked on
- softmax scoring when Router Parallel is used (currently only sigmoid)
- token-choice MoE
- shared expert overlapping

[ghstack-poisoned]
tianyu-l added a commit that referenced this pull request Dec 10, 2024
ghstack-source-id: f2ffdba
Pull Request resolved: #725
@tianyu-l

Copy link
Copy Markdown
Contributor Author

closing as this is reorganized in #732

@tianyu-l tianyu-l closed this Dec 12, 2024
@tianyu-l
tianyu-l deleted the gh/tianyu-l/22/head branch December 18, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants