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

Fix DDP with Zero1 #261

Open
NouamaneTazi opened this issue Dec 10, 2024 · 0 comments
Open

Fix DDP with Zero1 #261

NouamaneTazi opened this issue Dec 10, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@NouamaneTazi
Copy link
Member

NouamaneTazi commented Dec 10, 2024

Currently we have for a 1B model with

Zero0 (uses DDP)
image

Zero1 (DDP broken)
image

Which makes Zero1 slower, it would be great to fix it (or if not possible overlap the grads comms with compute)

Memory gains

for zero0

12/10/2024 16:19:16 [INFO|DP=0|PP=0|TP=0|ip-26-0-164-187]:  Memory usage: 19909.64MiB. Peak allocated 19909.69MiB. Peak reserved: 49104.00MiB
12/10/2024 16:19:16 [INFO|DP=0|PP=0|TP=0|ip-26-0-164-187]:  Memory usage: 19909.64MiB. Peak allocated 47208.43MiB. Peak reserved: 49104.00MiB

for zero1

12/10/2024 16:19:16 [INFO|DP=0|PP=0|TP=0|ip-26-0-168-238]:  Memory usage: 6517.47MiB. Peak allocated 8584.28MiB. Peak reserved: 34706.00MiB
12/10/2024 16:19:16 [INFO|DP=0|PP=0|TP=0|ip-26-0-168-238]:  Memory usage: 6517.47MiB. Peak allocated 33819.58MiB. Peak reserved: 34706.00MiB

12/10/2024 16:19:03 [INFO|DP=0|PP=0|TP=0|ip-26-0-168-238]: [ZeRO sharding] DP Rank 0 has 43.3M out of 1.04G (4.17%) params' optimizer states
12/10/2024 16:19:03 [INFO|DP=0|PP=0|TP=0|ip-26-0-168-238]: [ZeRO sharding] DP Rank 1 has 43.3M out of 1.04G (4.17%) params' optimizer states
...

@NouamaneTazi NouamaneTazi added the help wanted Extra attention is needed label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant