build(automodel): bump Automodel to r0.6.0 - #3498
Merged
Merged
Conversation
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
from
August 10, 2026 15:31
f3fefe7 to
4743058
Compare
4 tasks
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
from
August 19, 2026 10:04
28705e2 to
b5ed69c
Compare
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
2 times, most recently
from
August 24, 2026 10:28
22ea60a to
98c3f04
Compare
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
from
August 25, 2026 09:44
98c3f04 to
f68880b
Compare
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
2 times, most recently
from
August 26, 2026 12:32
5ae4753 to
bf22989
Compare
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
from
August 26, 2026 13:26
bf22989 to
186f945
Compare
jQizhang
marked this pull request as ready for review
August 26, 2026 13:28
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
model_forward now takes the Automodel-prepared model_batch dict, but five TestModelForward multimodal tests still passed a ProcessedInputs dataclass, so model(**model_batch) raised TypeError and aborted the file under -x. Route them through the existing _prepare_cp1 helper and assert on prepared.model_batch. filter_multimodal_kwargs_for_model now runs inside _build_model_batch, so the mixed-resolution guard is asserted around prepare_model_forward rather than model_forward; verified by mutation that disabling the guard fails the test. Also apply ruff import-sort and format fixes to the touched test files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
SGLang now uses Transformers 5.12.1, matching the ModelOpt, NVRx, and NeMo Gym environments. Remove the uv conflict pairs that were only needed while SGLang remained on Transformers 5.6.0. Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
jQizhang
force-pushed
the
bump-automodel-r0.6.0
branch
from
August 28, 2026 06:22
138c0f1 to
254ec1a
Compare
Contributor
Author
|
/ok to test 254ec1a |
terrykong
previously approved these changes
Aug 28, 2026
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Contributor
Author
|
/ok to test 30c26e4 |
sharonyu-115
previously approved these changes
Aug 28, 2026
sharonyu-115
left a comment
Contributor
There was a problem hiding this comment.
The test case change looks good. Approve.
Signed-off-by: larkzhang-nv <larkz@nvidia.com>
Contributor
Author
|
/ok to test f56b445 |
terrykong
approved these changes
Aug 29, 2026
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.
What does this PR do?
Upgrade the NeMo-RL DTensor v2 Automodel backend to Automodel r0.6.0, align compatible dependency forks on Transformers 5.12.1, and migrate context parallelism (CP) to Automodel's model-owned
ContextParallelSharder/ShardLayoutprotocol.For detailed API changes, support boundaries, before/after GRPO and x-token workflows, and experiment results, see
docs/design-docs/automodel-context-parallel.md.Full before/after results for all 10 workloads (pre-upgrade CP1 and post-upgrade CP1/CP2/CP4) are available in the W&B
nemorl-cpproject.Summary
Automodel r0.6.0 upgrade
24b47e85to7e9493d7and track ther0.6.0branch.MeshContext.build(...),ParallelismSizes, and oneDistributedSetuppassed tofrom_pretrained(); follow relocated imports and updated checkpoint APIs.tmp_step_N, preventing incomplete model or optimizer checkpoints.megatron-fsdpGit constraint, pin TileLang /apache-tvm-ffi0.1.11, and expose Z3 libraries to symlinked worker environments.Transformers 5.12.1 upgrade
Raise the shared Transformers resolution to 5.12.1 and add exact pins to compatible backend extras. TRT-LLM retains its backend-constrained version.
origin/maindeclarationorigin/mainlock>=5.5.0,<5.9.0>=5.5.0,<=5.12.15.5.45.12.1==5.12.15.5.45.12.1>=5.5.0,<5.6.0==5.12.15.5.05.12.1==5.12.15.8.15.12.1==5.12.15.8.15.12.1==5.12.1==5.12.15.12.15.12.1origin/main5.5.45.5.45.5.45.12.15.5.45.12.15.5.45.12.1uvconflicts isolate TRT-LLM from extras using Transformers 5.12.1, including SGLang. The SGLang fork also preserves non-CUDA tensor reductions.Context-parallel integration
CP=1path, and construct aContextParallelSharderonly forCP>1.ShardLayoutto shard next-token targets and restore logprobs, top-k/full logits, and loss inputs instead of reconstructing the legacy round-robin layout.loss × DP, while partitioned x-token KD/CE retainsloss × DP × CP; preserve x-token CUDA IPC, heterogeneous TP/CP, projection, alignment, and multi-teacher aggregation.The upstream CP API is described in Automodel #2937; the distributed setup migration follows Automodel #2266.
Tests and documentation
Issues
Closes #3319: Automodel bump up + Refactor to use the generic CP interface to be provided by Automodel.
Follow-up: #3842 — Track nightly OOMs after the Automodel r0.6.0 upgrade tracks fixes for the four affected nightly cases after this PR merges.
Usage
There is no new user-facing training API. Existing Automodel recipes continue to set
context_parallel_size; NeMo-RL now delegates model-side token layout to Automodel.Validation
Targeted CUDA/H100 and Ray validation completed during development (before the final rebase) covered CP migration, Automodel data/setup/train, loss, x-token, worker autocast, and distributed x-token TP2/CP1 and TP1/CP2 tests. Ruff and format checks also passed.
After the final rebase,
uv lock --checkwith uv 0.11.28,git diff --check origin/main...HEAD, andpython -m py_compile nemo_rl/models/automodel/train.pypassed. Current GitHub checks pass for submodule fast-forward, lockfile freshness, copyright, secret scanning, DCO, and PR-title validation.Short CP1/CP2/CP4 GRPO/DAPO runs show similar reward, generated-token, and generation-KL trends; these are functional and short-run numerical checks, not long-horizon convergence results. Full before/after results for all 10 workloads (pre-upgrade CP1 and post-upgrade CP1/CP2/CP4) are available in the W&B
nemorl-cpproject.Additional information
CP>1remains rejected. X-token distillation keeps contiguous CP loss/IPC windows and does not support sequence packing.