Fix tied parameters - #6164
Merged
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
wujingyue
force-pushed
the
codex/repro/mfsdp-tied-weights
branch
3 times, most recently
from
July 30, 2026 23:49
c135937 to
14fc287
Compare
wujingyue
force-pushed
the
codex/repro/mfsdp-tied-weights
branch
12 times, most recently
from
July 31, 2026 00:40
d988824 to
1dd1cc2
Compare
wujingyue
marked this pull request as ready for review
July 31, 2026 00:43
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/30681159582 |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 1, 2026
wujingyue
force-pushed
the
codex/repro/mfsdp-tied-weights
branch
from
August 1, 2026 04:55
6d0e97e to
f2c6df9
Compare
Signed-off-by: Jingyue Wu <jingyuew@nvidia.com>
Signed-off-by: Jingyue Wu <jingyuew@nvidia.com>
Signed-off-by: Jingyue Wu <jingyuew@nvidia.com>
wujingyue
force-pushed
the
codex/repro/mfsdp-tied-weights
branch
from
August 1, 2026 04:56
f2c6df9 to
bc3a713
Compare
wujingyue
enabled auto-merge
August 1, 2026 04:58
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/30688416365 |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 1, 2026
Signed-off-by: Jingyue Wu <wujingyue@gmail.com>
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/30720670220 |
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.
What changed
ParameteronceWhy
PyTorch's default parameter enumeration deduplicates tied parameters by object identity. MFSDP v2 instead collected registrations by FQN, so the same physical parameter could receive multiple buffer entries and replacement objects. That broke weight identity and prevented the ready-parameter set from reaching the duplicated trainable-parameter count during backward.
Impact
MFSDP v2 now preserves tied parameter aliases while allocating, sharding, reducing, and exposing only one physical optimizer parameter.
Validation
ruff checkon all changed Python filespython -m torch.distributed.run --nproc-per-node 2 -m pytest -q tests/unit_tests/distributed/mfsdp_v2Related issue
Related to #6139.