[DSD] Correctly handle shared parameters for optimizer state_dict (#1…#129252
Merged
atalman merged 1 commit intorelease/2.4from Jun 26, 2024
Merged
[DSD] Correctly handle shared parameters for optimizer state_dict (#1…#129252atalman merged 1 commit intorelease/2.4from
atalman merged 1 commit intorelease/2.4from
Conversation
…28685) * Fixes #128011 See the discussion in #128076 Current implementation of `set_optimizer_state_dict()` assumes that all the fqns returned by `_get_fqns()` must exist in the optimizer state_dict. This is not true if the model has shared parameters. In such a case, only one fqn of the shared parameters will appear in the optimizer state_dict. This PR addresses the issue. Differential Revision: [D58573487](https://our.internmc.facebook.com/intern/diff/D58573487/) Pull Request resolved: #128685 Approved by: https://github.com/LucasLLC (cherry picked from commit 1a52791)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/129252
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit 743931d with merge base b66e3f0 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
atalman
approved these changes
Jun 26, 2024
4 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
[DSD] Correctly handle shared parameters for optimizer state_dict (#128685)
Fixes #128011
See the discussion in #128076
Current implementation of
set_optimizer_state_dict()assumes that all the fqns returned by_get_fqns()must exist in the optimizer state_dict. This is not true if the model has shared parameters. In such a case, only one fqn of the shared parameters will appear in the optimizer state_dict. This PR addresses the issue.Differential Revision: D58573487
Pull Request resolved: #128685
Approved by: https://github.com/LucasLLC
(cherry picked from commit 1a52791)
Fixes #ISSUE_NUMBER
cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k @LucasLLC @MeetVadakkanchery @mhorowitz