[Backport] Fix Qwen3.5 context parallel in core_dev_r0.16.0 - #4873
Open
mid2doubao wants to merge 1 commit into
Open
[Backport] Fix Qwen3.5 context parallel in core_dev_r0.16.0#4873mid2doubao wants to merge 1 commit into
mid2doubao wants to merge 1 commit into
Conversation
When integrating mcore with ms-swift/llamafactory for Qwen3.5 context parallel (CP), the core_dev_r0.16.0 branch encounters the same bug resolved in NVIDIA#3529. This commit backports the fix from main to core_dev_r0.16.0 to unblock Qwen3.5 CP training.
Author
|
@NVIDIA/mcore-oncall Hi team! This is a pure backport from main (#3529) to unblock Qwen3.5 Context Parallelism for downstream integrations (like ms-swift/llamafactory) on the latest dev branch. Could you please help approve the workflow run and take a look when you have a moment? Thanks! |
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.
When integrating mcore with ms-swift/llamafactory for Qwen3.5 context parallel (CP), the core_dev_r0.16.0 branch encounters the same bug resolved in #3529. This commit backports the fix from main to core_dev_r0.16.0 to unblock Qwen3.5 CP training.
What does this PR do ?
This PR backports the context parallel (CP) fix for Qwen3.5 from PR #3529 to the
core_dev_r0.16.0branch.Motivation & Context:
While integrating Megatron Core with downstream open-source frameworks (such as LLaMA-Factory and ms-swift) to support Qwen3.5 with Context Parallelism (CP), the ms-swift documentation explicitly points out that Qwen3.5 CP is currently ONLY supported in
mcoredev branches.Consequently, we are relying on the latest dev branch,
core_dev_r0.16.0. However, during Qwen3.5 training on this branch, we encountered the exact same bug that was previously resolved in themainbranch via PR #3529. This critical fix has not yet been synchronized tocore_dev_r0.16.0.To unblock Qwen3.5 CP training for the open-source community relying on this latest dev branch, this PR backports the specific changes from #3529 (commit
6c02944) tocore_dev_r0.16.0. I have verified locally that this synchronization successfully resolves the issue.Issue tracking
For PRs from open-source community contributors:
Linked issue: Related to #3529
(Reference Commit from main: 6c02944)
Contribution process
Pre-checks
(Note for reviewers: As this is a pure backport of the already approved and merged PR #3529, no new logic is introduced beyond what was previously tested and reviewed in
main.)Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.
For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either
eharper@nvidia.comorzijiey@nvidia.com.