Repository navigation
feat(speechlm): support native RL checkpoints and frozen CTC export - #16387
Conversation
Signed-off-by: Valentin Mendelev <[email protected]>
…-main-20261015 Signed-off-by: Valentin Mendelev <[email protected]> # Conflicts: # nemo/collections/speechlm2/models/salm_automodel.py # nemo/collections/speechlm2/parts/hf_hub.py
Signed-off-by: Valentin Mendelev <[email protected]>
|
/ok to test 1a996c5 |
Set parameter_config on the bare SALMAutomodel used by the MTP tests, and compare checkpoint round-trips against CPU copies of the source tensors, since other speechlm2 modules make CUDA the default device on GPU runners. Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
|
/ok to test a8165e7 |
…ed link Signed-off-by: Valentin Mendelev <[email protected]>
|
[🤖]: Hi @vmendelev 👋, 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. |
|
/ok to test 8a1b217 |
|
/review |
Signed-off-by: Valentin Mendelev <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
Follow-up review complete. Accounted for all 22 changed files, verified the five prior findings, and checked subsequent changes and directly affected paths.
The earlier findings are resolved:
- FP32 perception precision is preserved under the replacement FreezeConfig/storage contract, with exact-value regression assertions.
- Lightning export now restores the CTC artifact’s original storage after casting.
- Native MTP retention no longer requests head creation or replacement.
- Nullable export blocks are normalized, with null-handling and nonmutation checks.
- The FP8 fixture initializes the loader flag, retaining its byte-preservation assertions.
No unresolved prior finding or new regression meeting the follow-up impact threshold was established. Updated tests and documentation were assessed within that scope.
Static inspection only: no tests, GPU jobs, or distributed export/refit runs were executed. Automodel internals were unavailable in the mounted trees; exact-selector tests explicitly skip on older Automodel versions.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
|
/ok to test b3567d0 |
Signed-off-by: Piotr Żelasko <[email protected]>
|
/ok to test 5bc0c79 |
|
[🤖]: Hi @vmendelev 👋, 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. |
What does this PR do?
Enable native SpeechLM RL loading, selected refits and canonical HF export while preserving optional frozen CTC timestamp artifacts and model-declared parameter precision.
Collection: SpeechLM2.
Changelog
FreezeConfigpolicies for the backbone (automodel_freeze_config) and perception (perception_freeze_config), applied before checkpoint loading and perception activation-checkpoint wrapping.torch_dtypesets trainable storage; FSDP2 mixed precision sets compute. An explicit backbone policy keeps MoE routers frozen unless selected. Frozen frontend and native MTP state are retained.checkpoint_format=nemo_rl, intrinsic-dtype preservation and atomic publication. Omit training-only freeze policies from exported configs. Write Nemotron-H layer types with their original names (mamba,attention) so exports load in serving runtimes on either side of the Transformers 5.15 rename. Add a helper that derives the export configuration from the original HF seed.Usage
Prepare the export configuration from the original full HF seed:
Then run the canonical converter in an eight-GPU allocation with the prepared environment:
Validation and GitHub Actions CI
5bc0c79e15): exact BF16 safetensors round trips with the test's assertion passed on CPU and CUDA; the original assertion reproduced the CPU/CUDA mismatch.pre-commit runandpre-commit run --from-ref origin/main --to-ref HEADpassed;git diff --checkpassed; all 19 published commits have author-matching DCO sign-offs. Localpython -m pytest --cpu tests/collections/speechlm2/test_native_export.py -qcould not run because the available environment lacks required dependencies (fails in pytest setup on missinghydra; Automodel is also absent). No documentation update is needed for this test-only assertion correction.pytest --cpu tests/collections/speechlm2): 48 passed for theFreezeConfigmigration, plus the 5 export tests after the export fix. Branch pre-commit and diff checks passed.nvidia/Nemotron-3.5-Transcribe-30B-A4Bpolicy on 8 GPUs, one controlled update compared with the previous revision: identical initial parameters and response log-probabilities; the same 269 FP32 trainable tensors update; frozen parameters and CTC weights are unchanged; DCP save and reload is exact.Before your PR is "Ready for review"
PR Type: New feature, bugfix, documentation.
Additional Information
Depends on the
FreezeConfigexact parameter selectors merged in NVIDIA-NeMo/Automodel#4377; tests that need them skip on the currently pinned Automodel. The companion NeMo-RL recipe consumes these loading/refit/export APIs. No existing issue is closed.Companion PRs