Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How the experts' gradients are handled under data parallelism? #192

Open
yzs981130 opened this issue Dec 26, 2022 · 1 comment
Open

How the experts' gradients are handled under data parallelism? #192

yzs981130 opened this issue Dec 26, 2022 · 1 comment

Comments

@yzs981130
Copy link

When count_per_node is set to negative, one expert should be paralleled on multiple GPUs like ZERO, with each GPU holding a slice of the expert's parameters. There are also all_gathers performed within the ffn_zero_group in the forward of the expert.

My question is how these gradients and parameter update of the expert is handled in Tutel under DP. Examples seem to indicate that there are no extra efforts for users to manually handle it. However, I cannot find the corresponding implementation in either moe_layer or TutelDistributedOptimizer.

Any help will be appreciated!

@ghostplant
Copy link
Contributor

You can reference the implementation here: https://github.com/microsoft/tutel/blob/main/tutel/experts/ffn.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants