Repository navigation
Conversation
Signed-off-by: LiRunGuo <li19107254665@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73165a4a04
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| with GatheredParameters(non_active_params): | ||
| # Persist the QKV layout mutation when ZeRO-3 repartitions the | ||
| # gathered parameters on context exit. | ||
| with GatheredParameters(non_active_params, modifier_rank=0): |
There was a problem hiding this comment.
Add the mandatory commit sign-off
This is a non-merge commit, but its commit message has no Signed-off-by trailer, so it violates the repository's mandatory contribution and CI requirement. Recreate the commit with --signoff using the configured Git identity.
AGENTS.md reference: AGENTS.md:L8-L8
Useful? React with 👍 / 👎.
|
Hi @tohtana @hwchen2017, a gentle ping on this PR when you have a moment. It's a small fix (+58/−2) for #8391. The ZeRO-3 DCO and the modal-torch-latest CI pass. The commit does carry a Happy to adjust anything. Thanks! |
|
Gentle bump with fresh validation. I rebased this onto current
The change is still just two
|
73165a4 to
cc74480
Compare
|
Review ping after a rebase. Rebased onto current Independent corroboration from our side (8x H200, DeepSpeed OPSD with GPT-NeoX/Pythia hybrid engine): without @delock — since you own the OPSD direction, could you take a look when you have a slot? (As the fork author I cannot add reviewers on this repo, hence the ping.) This closes #8391. |
Summary
GatheredParametersneedsmodifier_rankwhen a gathered full parameter is modified. Without it, the transformed QKV tensor is not reliably broadcast before repartitioning, and the inference operator can interpret the original head-interleaved GPT-NeoX layout as contiguous Q/K/V.Closes #8391.
Validation
1 passedmax_abs=0; native and HE first token both187Scope
This PR intentionally contains only the ZeRO-3 QKV mutation-persistence fix. A separate compatibility issue in recent Transformers (
GPTNeoXAttention.hidden_sizeremoval) can prevent current master from reaching injection in that environment and is not bundled here.Exact head:
cc74480ea(rebased onto3b809329f;pytest tests/unit/module_inject-> 162 passed, 43 subtests passed, including the newtest_hybrid_megatron.py).Independent reproduction on 8x H200 (DeepSpeed OPSD with GPT-NeoX/Pythia HE): without this change the HE rollout silently collapses to one repeated token (the job still exits 0), while with it the HE first-step output matches the non-HE baseline and the 20-step runs are reproducible on 2x and 8x H200. The same environment also hit the separate
GPTNeoXAttention.hidden_sizeremoval noted under Scope below.