Add Nemotron 3.5 Lightning support and testing - #6736
Merged
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
albertvillanova
approved these changes
Aug 17, 2026
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.
Released 2026-08-11: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 — 30B/3B-active hybrid Mamba-2 + MoE, 1M context, open weights published as an SFT/RL/distillation starting point.
nemotron_3_5_lightning_for_causal_lm.py(NemotronHForCausalLM), mirroring the Ultra script — Mamba weights are bf16 in the checkpoint, so no fp32 restore.nemotron_3_5_lightning.jinja+_training.jinja(Ultra's template minus themedium_efforthint) and registered both inchat_template_utils.py(reusesqwen3_5_schema/nemotron_3_template).test_chat_template_utils.py(4 lists) andtest_data_utils.py. Trainer tests keep Nano as the single NemotronH representative.trl-internal-testing/tiny-NemotronHForCausalLM-3.5-lightningwithtransformers==5.3.0before merging.Note
Low Risk
Additive model-family support (templates, registration, tests, docs) with no changes to existing Nemotron or training paths; merge depends on publishing the tiny Hub model first.
Overview
Adds Nemotron 3.5 Lightning to TRL’s supported chat-template families so SFT/GRPO can auto-swap training templates and tool/response parsing works like other Nemotron-H models.
Vendored
nemotron_3_5_lightning.jinja(Ultra-style template withoutmedium_effort) andnemotron_3_5_lightning_training.jinja(assistant{% generation %}wrappers only).chat_template_utils.pyloads both, maps Lightning toqwen3_5_schema/nemotron_3_template, and returns the training template fromget_training_chat_template.A new tiny-model script
nemotron_3_5_lightning_for_causal_lm.pybuilds/pushestrl-internal-testing/tiny-NemotronHForCausalLM-3.5-lightningfrom the NVIDIA checkpoint (transformers ≥ 5.3.0). Docs and README catalog the family; tests add the tiny fixture to chat-template and data-utils parametrizations alongside existing Nemotron Ultra cases.Reviewed by Cursor Bugbot for commit 1360c7b. Bugbot is set up for automated code reviews on this repo. Configure here.