Skip to content

[speechlm2] Temporarily support native Nemotron-V3 with Automodel 0.4 - #15980

Merged
blisc merged 1 commit into
mainfrom
codex/hotfix-salm-automodel-nemotron-layers
Jul 29, 2026
Merged

[speechlm2] Temporarily support native Nemotron-V3 with Automodel 0.4#15980
blisc merged 1 commit into
mainfrom
codex/hotfix-salm-automodel-nemotron-layers

Conversation

@DongjiGao

Copy link
Copy Markdown
Contributor

What changed

  • Install a temporary compatibility wrapper before SpeechLM2 constructs an Automodel LLM.
  • For the native Nemotron-V3 layout only, adapt model.model.layers to the legacy Automodel 0.4 model.backbone.layers access while its parallelizer runs.
  • Preserve the Hugging Face layout unchanged and make installation best-effort.
  • Skip the wrapper when the upstream _nemotronh_decoder_blocks helper from Automodel PR failed to inference on single input #2638 is present.
  • Add focused coverage for native and Hugging Face layouts, fixed Automodel builds, and moved/missing Automodel internals.

Why

The Automodel version pinned by the Speech release predates Automodel PR #2638. Its NemotronHParallelizationStrategy hard-codes model.backbone.layers, while the native Nemotron-V3 model exposes decoder blocks at model.model.layers. FSDP2 therefore fails during model parallelization with AttributeError before training starts.

Temporary limitation and removal plan

This is deliberately a narrow release-unblocking shim coupled to the exact layer access used by Automodel 0.4. It is not intended to become a general model adapter and does not add TP, PP, or HSDP support for Nemotron-V3.

The shim contains a TODO(Dongji) and should be removed after the Speech image updates its Automodel dependency to a build containing PR #2638. Until removal, feature detection makes it a no-op on such a fixed build.

Validation

  • Exact image: nvcr.io/nvidian/nemo-speech:26.06.rc3, digest sha256:7da43274...
  • Unpatched two-rank control reproduced AttributeError: 'NemotronHForCausalLM' object has no attribute 'backbone' in the pinned parallelizer.
  • Patched two-rank native Nemotron-V3 FSDP2 smoke test completed model construction, forward, backward, and an AdamW optimizer step.
  • Compatibility tests: 5 passed.
  • Black 24.10 and isort checks passed.

Full-size validation on the original 8x H200 PCIe QA system is still required before release sign-off.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@DongjiGao
DongjiGao requested a review from blisc July 28, 2026 21:51
@blisc

blisc commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

/ok to test 6cfdb0b

@blisc
blisc marked this pull request as ready for review July 29, 2026 00:10
@blisc
blisc enabled auto-merge (squash) July 29, 2026 00:10
@blisc blisc added the r3.0.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge. label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

[🤖]: Hi @DongjiGao 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

@blisc
blisc merged commit 2c63055 into main Jul 29, 2026
179 checks passed
@blisc
blisc deleted the codex/hotfix-salm-automodel-nemotron-layers branch July 29, 2026 00:57
blisc pushed a commit that referenced this pull request Jul 29, 2026
Signed-off-by: Dongji Gao <dongjig@nvidia.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
Co-authored-by: Dongji Gao <dongjig@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r3.0.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.

2 participants