Skip to content

cp: backport Nemotron 3 Ultra PRs into r0.5.0 - #4473

Merged
ko3n1g merged 5 commits into
r0.5.0from
chcui/r050-nemotron-ultra-backport
Jun 25, 2026
Merged

cp: backport Nemotron 3 Ultra PRs into r0.5.0#4473
ko3n1g merged 5 commits into
r0.5.0from
chcui/r050-nemotron-ultra-backport

Conversation

@cuichenx

@cuichenx cuichenx commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Backports the Nemotron Ultra stack requested for r0.5.0 as one draft PR.

Included cherry-picks:

Excluded after correction:

Validation

  • git diff --check origin/r0.5.0...HEAD
  • bash -n for the Ultra example shell scripts
  • uv run --no-sync python -m py_compile for touched Python scripts, recipe, and tests
  • pre-commit run --all-files

Notes:

  • uv run pre-commit run --all-files could not resolve the release branch env on this host because nvidia-resiliency-ext==0.6.0 has no compatible wheel for this platform; direct pre-commit passed.
  • Focused pytest did not run because the no-sync env lacks torch during unit-test conftest import.
  • No HSG/cw-dfw validation was attempted because those clusters are unavailable per Rowan.

@copy-pr-bot

copy-pr-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

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.

cuichenx added 4 commits June 23, 2026 12:50
Signed-off-by: Chen Cui <chcui@nvidia.com>
(cherry picked from commit 9bfa760)
Signed-off-by: Chen Cui <chcui@nvidia.com>
(cherry picked from commit 0917258)
Signed-off-by: Chen Cui <chcui@nvidia.com>
(cherry picked from commit 1d0dab6)
Signed-off-by: Chen Cui <chcui@nvidia.com>
(cherry picked from commit b35a97b)
@cuichenx
cuichenx force-pushed the chcui/r050-nemotron-ultra-backport branch from a41bc8c to 461fff5 Compare June 23, 2026 19:51
@cuichenx
cuichenx marked this pull request as ready for review June 23, 2026 22:43
@cuichenx

Copy link
Copy Markdown
Contributor Author

/ok to test 461fff5

Comment thread src/megatron/bridge/peft/utils.py Outdated
@claude

claude Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Light Code Review

Critical Bug

PackedPerExpertLinear.sharded_state_dict missing required pg_collection kwarg (src/megatron/bridge/peft/utils.py:2261-2263)

_make_grouped_expert_sharded_tensor now requires pg_collection as a keyword argument (it has no default value), but PackedPerExpertLinear.sharded_state_dict() does not pass it. This will raise TypeError at runtime when checkpointing any SharedOuterGroupedExpertAdapter. The fix is to either pass pg_collection=None (falls back to size-1 defaults) or thread the real collection from the owning adapter. See inline comment for a minimal fix suggestion.

Missing Test Coverage

  • SharedOuterGroupedExpertAdapter and PackedPerExpertLinear are entirely new classes with no unit tests. At minimum, sharded_state_dict and forward paths for both fc1 (shared-in, per-expert-out) and fc2 (per-expert-in, shared-out) variants should be covered, especially since the sharded_state_dict bug above would have been caught.
  • _make_cross_ep_replicated has no direct test. Its broadcast + grad-hook behavior is safety-critical for shared-outer adapters staying in sync across EP ranks.

Suggested test cases

No perf tests impacted.

@yaoyu-33 yaoyu-33 added area:recipe Training recipes and launch configs feature New capabilities, enhancements, or enablement work needs-more-tests Requires additional L0 and L1 test coverage before merge needs-review PR is ready for code review and waiting on a reviewer r0.5.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge. labels Jun 23, 2026
Signed-off-by: Chen Cui <chcui@nvidia.com>
@ko3n1g
ko3n1g merged commit 03e316f into r0.5.0 Jun 25, 2026
358 of 364 checks passed
@ko3n1g
ko3n1g deleted the chcui/r050-nemotron-ultra-backport branch June 25, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:recipe Training recipes and launch configs feature New capabilities, enhancements, or enablement work needs-more-tests Requires additional L0 and L1 test coverage before merge needs-review PR is ready for code review and waiting on a reviewer r0.5.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants