-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix the universal checkpoint issue for stage3 when there are multiple subgroups. #7585
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
Merged
+117
−57
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4fd8dbd
Fix the universal checkpoint issue for stage3 when there are multiple…
zhengchenyu 1e2eed4
update
zhengchenyu 813fd4f
Merge branch 'master' into fix.universal
sfc-gh-truwase ac14d7c
update
zhengchenyu c69299f
Merge branch 'master' into fix.universal
sfc-gh-truwase ccbcc26
Merge branch 'master' into fix.universal
sfc-gh-truwase File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeepSpeed/deepspeed/runtime/zero/stage3.py
Lines 2868 to 2872 in 17d80ce
In earlier versions we passed
param_shapes
to supply parameter names for each subgroup. Could we reuseparam_shapes
here instead of introducing a newparam_names
argument, which seems redundant? Or is there a strong reason to replaceparam_shapes
withparam_names
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a critical question!
But No, we can not use
param_shapes
! Because theparam_shapes
is from checkpoint,param_shapes
comes from the checkpoint, that is from the last distributed environment, that is thesub group
(orfp16_group
) is used in last distributed environment.If the world size is changed, the
sub group
(orfp16_group
) will changed. Here we set optimizer parameter for currentsub group
(orfp16_group
).In fact, I also used
param_shapes
at first. But I found this problem when my new unit test (which sub_group_size is set to 100) failed to run.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhengchenyu Make sense to me. Could you remove the
param_shapes
to clean up the codebase a bit? Since we’re usingparam_names
,param_shapes
is no longer needed..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I have remove
param_shapes
.