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 HSDP with ShardDegree < 8 #3313

Merged
merged 8 commits into from
May 23, 2024
Merged

Fix HSDP with ShardDegree < 8 #3313

merged 8 commits into from
May 23, 2024

Conversation

bigning
Copy link
Contributor

@bigning bigning commented May 22, 2024

what

@j316chuck found HSDP with 1 node 2X4 device mesh run can't resume. rank 0 failed this checkpoint files broadcast . It's because rank 4 (which is in the same replica pg group as rank 0) doesn't join this collective call because of this if condition.
So the fix is to let all the first rank of shard pg group joins the broadcast , but only local rank 0 writes to file

test

1 node device mesh: 2 X 4

before:
[nccl timeout] mpt-125m-hybrid-resumption-1-node-tYv2bB
after:
mpt-125m-hybrid-resumption-1-node-pzWqX1
mpt-125m-hybrid-resumption-1-node-RV4ovO

2 node device mesh: 2 X 8 still works

mpt-125m-hybrid-resumption-1-node-NlOtP5

2 node device mesh: 4 x 4 works:

mpt-125m-hybrid-resumption-1-node-ajvSHb
checked the logging, rank 8 is not downloading any checkpoint files, but it got all files broadcast from rank 0
image

@bigning bigning marked this pull request as ready for review May 23, 2024 04:49
Copy link
Contributor

@j316chuck j316chuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with : mpt-125m-hybrid-resumption-1-node-7QStEE

@bigning bigning changed the title Fix HSDP with ShardDegress < 8 Fix HSDP with ShardDegree < 8 May 23, 2024
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
composer/utils/checkpoint.py Show resolved Hide resolved
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! sorry one more request before approval

composer/utils/checkpoint.py Outdated Show resolved Hide resolved
@bigning bigning requested a review from mvpatel2000 May 23, 2024 17:44
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big Ning stays WinNing

@bigning bigning enabled auto-merge (squash) May 23, 2024 17:51
Copy link
Contributor

@eracah eracah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! But why would anyone use HSDP with only one node?

@bigning
Copy link
Contributor Author

bigning commented May 23, 2024

Nice! But why would anyone use HSDP with only one node?

I guess at least unit test needs it ? lol

@bigning bigning merged commit 179d64f into dev May 23, 2024
15 checks passed
@bigning bigning deleted the fix_1_node_HSDP branch May 23, 2024 19:23
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

Successfully merging this pull request may close these issues.

4 participants