Maps to: UC Berkeley EE 290/194 Scalable AI, Spring 2026 Lecture 16, Case Study: Post-Training of Nemotron Nano v3 and NeMo RL (guest lecture, NVIDIA; first part, A Brief Look Into Nano: Post-Training Recipe and Model — Deep Dive on Data, Chat Template, RLVR, and GenRM-based RLHF; slides
lecture_16_1.pdf; its second part is in Lecture 19). The Fall 2026 offering’s Lecture 17 covers the same case study; its slides were not public when these notes were written. Recommended reading:
- NVIDIA, Nemotron 3 Nano: Open, Efficient Mixture-of-Experts Hybrid Mamba-Transformer Model for Agentic Reasoning (arXiv:2512.20848), §3 (post-training), §4 (quantization), Appendices C–E; the model card of
nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B; the released SFT data and RL environments.- Wang et al., HelpSteer3-Preference (GenRM training data and method); Toshniwal et al., GenSelect (2025); Lambert et al., Tülu 3 (IF data methodology, arXiv:2411.15124). Code:
code/lecture20/contains:nano_post.py: the report’s numbers and equations;- four demos (SFT, RLVR, RLHF, and DPO, FP8 and evaluation).
Reading time: ~1.5 hours for the prose; ~10 seconds to run all demos.
0. How to read this lecture
0.1 Learning goals
After this lecture you should be able to:
- Lay out Nemotron 3 Nano’s post-training pipeline (SFT → RLVR → RLHF → RLVR → quantization), saying what each stage is for and why the order matters.
- Explain the chat template as the model’s API contract: reasoning modes, retention rules across steps and turns, the tool-call format.
- Describe the SFT data factory: the common seed → synthesise → verify → mix recipe, the domains, the filters, the blend, reasoning control.
- Explain multi-environment RLVR: the environments, profiling and the Gaussian curriculum, why all environments are trained together, the algorithm settings.
- Explain GenRM-based RLHF: how the judge is trained, circular comparisons and the tiebreak, why length grows and how Group Relative Length Control stops it.
- Read the endgame: a DPO experiment against tool hallucination, selective FP8 quantization, and the evaluation with error bars.
0.2 Prerequisites and scope
- Prerequisites: Lecture 15 (Nano’s architecture and pre-training); Lectures 16–19 (formats, data, RL algorithms, RL systems).
- Scope: what Nano’s post-training ran, and the decisions behind it, as reported.
- Not in scope: re-deriving the RL algorithms (Lecture 18) or the systems (Lecture 19), which this lecture refers back to.
0.3 Section → code map
| Section | Idea | Code in code/lecture20/ |
|---|---|---|
| §1 | the pipeline | nano_post.py |
| §2 | template, SFT data, blend, reasoning control | 01_sft_stage.py |
| §3 | multi-environment RLVR, curriculum | 02_rlvr_stage.py |
| §4 | GenRM, circular comparisons, GRLC | 03_rlhf_stage.py |
| §5–§7 | DPO, FP8, evaluation, compute | 04_dpo_quant_eval.py |
0.4 Where the numbers come from
Every recipe number below is from the technical report (arXiv:2512.20848) or the guest lecture. The demos re-run its equations and decisions on the small toys of Lectures 15–19. Where a toy disagrees with the report, the notes say so and explain why: usually the toy lacks something a 30B model has, such as transfer between skills or a strong prior.
1. The pipeline
Nemotron 3 Nano is the 31.6B-total, 3.6B-active hybrid Mamba-2 / attention MoE of Lecture 15, pre-trained on 25T tokens. Compared with Nemotron Nano 2, NVIDIA “significantly scaled up” post-training compute; it is NVIDIA’s first effort to scale up RL. The stages:
| stage | purpose |
|---|---|
| SFT | install the interface: template, tools, reasoning control |
| RLVR I | push capability on many environments with mechanical or judge-able rewards |
| RLHF | helpfulness: a large generative reward model judges chat responses |
| RLVR II | recover reasoning ability after RLHF |
| FP8 PTQ | serving: selective post-training quantization |
The guest lecture’s reading of it: building the best model “often requires many iterations and stages to ensure all the capabilities are improved without interference”. The second RLVR pass exists because RLHF on chat helpfulness can swallow reasoning gains.
2. The interface and the SFT stage
2.1 The chat template is the model’s API contract
Nano starts from the Qwen3-Coder chat template and adds:
<think>/</think>tags;- reasoning truncation rules;
- a no-thinking mode;
- reasoning-budget support (in Super, not Nano).
Reasoning on or off is set by the prefill:
- thinking mode opens
<think>and the model writes its reasoning and</think>before acting; - no-thinking mode prefills
<think></think>and the model answers directly.
Tools become a rigid XML schema in the system message (<tools><function><name>…<parameters>…). Calls are XML-style too: <tool_call><function=get_weather><parameter=location>New York, NY</parameter>…</function></tool_call>. That follows GLM-4.5 and Qwen3-Coder, to reduce character escaping (Lecture 16 §1.5). The system message also fixes a rule: natural-language reasoning may come before a <tool_call>, never after.
Reasoning retention differs between steps and turns:
- Within one user turn, across several assistant steps (tool call → result → next step), the thinking tokens of earlier steps are kept, which helps the model stick to its plan.
- When a new user message arrives, all earlier reasoning is dropped. Each user turn is treated as a different but related task, and the context does not fill with old chains of thought.
Demo 01 Part B renders a synthetic agent session with Lecture 16’s template and tokenizer (3 tool steps per turn, 60-word reasoning):
| user turns | keep all reasoning | Nano’s rule | drop all reasoning |
|---|---|---|---|
| 1 | 537 | 537 | 171 |
| 4 | 2,082 | 984 | 618 |
| 8 | 4,142 | 1,580 | 1,214 |
The rule is a context budget: 62% less than keeping everything at 8 turns, while the current turn’s plan stays visible. The template materialises SFT data, RLVR rollouts and inference requests alike. “Not following it breaks the model”: wrong framing, missing tags or wrong prefills give unpredictable behaviour, and every downstream system (API servers, agent frameworks, evaluation harnesses) must respect it.
2.2 The SFT data factory
SFT “installs the interface” before RL: reasoning vs non-reasoning modes, tool formatting and tool-integrated reasoning, multi-step and multi-turn structure, and truncated thinking when the budget runs out. Every domain follows the same loop: seed → synthesise → verify → mix (Lecture 17). The domains:
- Math.
- Competition math: Nano 2’s prompts with responses refreshed by GPT-OSS-120B, plus tool-integrated (Python) traces.
- Formal proofs: 580K natural-language theorems autoformalised into 550K Lean 4 statements. Goedel-Prover-V2-32B then made up to 4 attempts and 8 self-correction rounds per statement, giving 920K compiler-verified traces, of which 300K were kept.
- Code and software engineering.
- Competition code: prompts with DeepSeek-R1-0528 traces.
- Software engineering: real GitHub issues and containers from SWE-Gym and R2E-Gym. Trajectories were distilled from three agent harnesses (OpenHands, SWE-Agent, Mini-SWE-Agent) with Qwen3-Coder-480B, and filtered by whether the code works.
- Terminal use: verifiable tasks adapted to Terminal Bench, plus SWE-Smith. Trajectories came from Qwen3-Coder-480B and Kimi-K2 driving the Terminus agents.
- CUDA: 21K PyTorch → CUDA C pairs, kept only if the CUDA compiles and matches the reference numerically.
- Agents and chat.
- Conversational tool use: three LLM agents in a loop (a user simulator with a scenario and a domain policy, the assistant, and an environment simulator that returns tool results). The domains include ticketing, health care, hospitality, ride sharing and banking. A judge drops trajectories in which any agent acted against its goal.
- General chat: LMSYS and WildChat prompts answered by GPT-OSS-120B and Qwen3-235B, extended to multi-turn by letting the model simulate the user.
- Instruction following and safety.
- Instruction following: Tülu-3-style simulated users seeded with Nemotron-Personas and IFEval/IFBench constraints. Turns that fail the constraint checkers are dropped, and a judge removes trivially compliant answers.
- Safety: unsafe prompts wrapped with safe-response templates (self-harm prompts point to helplines), balanced with safe prompts so the model does not over-refuse, and filtered by a content-safety classifier.
- Science, multilingual and long context.
- Science: seed questions plus graduate-level passages retrieved from a vector database of pre-training articles. They become multiple-choice and open QA, paraphrased and format-varied by NeMo Data Designer, with GPT-OSS-120B tool-integrated traces and judge filtering.
- Multilingual: English post-training data translated line by line into French, Spanish, Italian, German and Japanese, skipping code, XML and URLs and filtered by language ID; plus 1.62M translation samples.
- Long context: synthetic samples with a mean of 128K tokens and a maximum of 256K, validated on RULER subsets.
- GenSelect: “pick the best of several solutions” tasks, which train the model as a generative reward model itself.
Filtering after every pipeline:
- structural checks, such as tool calls present without tool definitions;
- aggressive filtering of pathological repetition, repeated n-grams within a sliding window or a trajectory, “a strong indicator of malformed or low-quality reasoning”;
- keyword and regex filters against teacher outputs with political or nationalistic slant, found by internal audits.
Demo 01 Part D shows the repetition idea on synthetic traces. A 4-gram repeating six or more times in a 64-word window flags every looping trace with no false alarms there; real traces repeat more subtly.
2.3 The blend, the budget, reasoning control
| domain | share |
|---|---|
| chat | 28.6% |
| code | 20.7% |
| science | 12.8% |
| math | 9.9% |
| multilingual | 7.4% |
| math with tools | 4.9% |
| GenSelect | 3.0% |
| SWE | 3.0% |
| conversational agent / formal proofs / long context | 2.0% each |
| terminal use | 1.5% |
| datasets under 1% each | 2.2% |
The point is breadth: to install “a broad agentic interface layer before RL begins”. There are 18M samples in all. For each dataset the amount is set by what it needs in single-task experiments, and with dynamic sampling small datasets are repeated for many epochs and large ones for few: Lecture 17 §5.4’s share-versus-epochs trade-off.
The training settings:
- 13,000 steps at batch 64;
- sequences packed to 256K tokens;
- learning rate 5 × 10⁻⁵ with 800 warm-up steps;
- a sequence-level MoE load-balancing loss at 10⁻⁴.
That is 218B token slots, about 12K per sample if each were seen once (Demo 01 Part A).
Reasoning control is taught by data views:
- a random 10% of samples have their reasoning stripped (reasoning-off control);
- a random 3% have it truncated to a sampled budget, followed by the original answer, not regenerated (budget control).
The model learns “even with less visible reasoning, land in the same answer format and target”. Demo 01 Part C applies it to 10,000 traces: 1,025 stripped, 287 truncated, 88% of reasoning steps kept overall.
3. Multi-environment RLVR
3.1 Train on all environments at once
The report’s central RL claim is that training on all environments simultaneously “results in stable gains across all benchmarks throughout training, while single environment training often results in un-recoverable degradation of other benchmarks.” RLVR runs twice: right after SFT and again after RLHF.
| environment | tasks | graded by |
|---|---|---|
| competition math (DAPO 17K + SkyWorks 104K) | 121,000 | answer check |
| competition coding | 22,000 | unit tests, capped at 50 per problem to bound verification time |
| STEM multiple-choice QA (generated from reference documents) | 135,000 | answer key |
| structured outputs: (JSON schema, document) pairs from Data Designer | 9,000 | exact schema adherence only, no content reward |
| instruction following (IFBench-style constraints) | 46,000 | constraint checkers |
| multi-turn instruction following (Multi-Challenge-style) | 3,000 | LLM judge |
| long context (≥ 5 documents, ≤ 32K input) | 12,000 | LLM judge (Qwen3-235B) |
| Workplace Assistant (5 databases, 26 tools) | 690 | final database state |
| conversational agent (banking: disputes, card unblocks) | ~1,000 | final database state |
The structured-outputs environment is the slide’s “good example of the pattern”: synthesise tasks from documents and schemas, give them an exact verifier, and you have an RL environment. Its reward is format only, which Lecture 17 §8.1 would call low precision on content. It works because SFT already taught content.
Demo 02 Part C shows why the report trains all environments at once. It uses three environments of 30 problems on a policy whose weights are shared, as a real model’s are:
| training | env 1 | env 2 | env 3 |
|---|---|---|---|
| start | 10.0% | 10.0% | 10.0% |
| environment 1 alone (to 90%) | 90.0% | 13.6% | 6.0% |
| then environment 2 alone (600 steps) | 33.7% | 69.9% | 13.0% |
| then environment 3 alone (600 steps) | 20.7% | 38.1% | 63.3% |
| all three together (600 steps) | 72.8% | 73.1% | 69.3% |
Each single-environment phase erodes the others. Joint training is better on every environment and uses fewer steps (600 vs 1,339).
3.2 Profiling and the Gaussian curriculum
The model does not train on the raw environment distribution. The curriculum works in four steps:
- Profile every RL task with the SFT checkpoint.
- Drop tasks it already solves 100% of the time.
- Keep a fixed domain ratio in every batch.
- Within each domain, sample by a Gaussian over pass rates whose target mean decreases linearly during training, from high pass rate (easy) to low (hard).
When progress plateaus, the tasks are re-profiled with the best RL checkpoint and a new curriculum is built. In the report, batch pass rates fall from ~0.7 to ~0.4 over 600 steps (Fig. 6). In a comparison from an intermediate SFT checkpoint with identical domain ratios, random sampling “biases the model toward easier tasks”, while the curriculum learns the hard ones (Fig. 7: GPQA, LiveCodeBench, AIME25, IFBench).
Demo 02 Part B tries it on three synthetic domains (tabular policies, so problems do not transfer to each other):
| sampling | groups with no signal | hard domain at step 40 | step 120 |
|---|---|---|---|
| random within domain | 44.7% | 74.1% | 96.3% |
| Gaussian curriculum (0.7 → 0.2) | 29.6% | 54.4% | 96.3% |
- The curriculum wastes a third fewer rollouts.
- In this toy it learns the hard domain more slowly early on. Practising easy tasks cannot help hard ones when nothing transfers.
The report’s gain therefore comes from transfer: skills learned on easier tasks carry over in a real model. The rollout savings are what survive even without it.
3.3 The algorithm
RLVR uses synchronous GRPO, colocated and fully on-policy (Lecture 19 §2.3). The settings:
- masked importance sampling against training–inference mismatch (Lecture 19 §4.4);
- 128 prompts per step × 16 generations, a batch of 2,048, so the updates remain on-policy;
- a maximum generation length of 49K, with overlong filtering (Lecture 18 §3.5), which the report found helps reasoning-heavy benchmarks;
- frozen MoE router weights, with aux-loss-free load balancing and expert-bias updates continuing.
One step generates up to 103M tokens. At an assumed mean of 8K tokens it is 16.4M tokens: 1.2 × 10¹⁷ FLOPs of generation and 4.7 × 10¹⁷ of training (Demo 02 Part A). Generation dominates GPU time, since it runs at decode efficiency.
RLVR beat a heavily fine-tuned SFT model. The report compared RLVR against two SFT checkpoints: SFT1, the RLVR starting point at ~3 epochs, and SFT2, trained to convergence at ~5 epochs. Even with relatively short training, RLVR matched or exceeded SFT2 on every evaluated domain.
4. RLHF with a generative reward model
4.1 Why RLHF after RLVR
RLVR broadens the model on tasks that can be scored mechanically:
- exact answers;
- schema adherence;
- executed database state;
- constraints a judge can check.
RLHF targets the key chat benchmarks: helpfulness, where reward is not exact or mechanical. The second RLVR pass keeps chat alignment from swallowing everything else.
4.2 Training the GenRM with RL
A Bradley–Terry reward model (Lecture 16 §4) predicts a scalar preference. It is compact, but easier to overfit or hack. Recent work cited by the report argues that generative reward models (GenRMs) generalise better. NVIDIA bets that a stronger judge reduces reward-hacking risk enough to pay for itself.
The GenRM is Qwen3-235B-A22B-Thinking-2507 trained with GRPO (128 prompts × 8 generations per batch, one gradient step per batch). Its input is the conversation, the new request and two candidate responses. It reasons about both, then emits:
- a helpfulness score for each response (1–5);
- a ranking score (1–6), where 1 means response 1 is far better and 6 means response 2 is.
Its reward, Eq. (1):
| GenRM prediction (truth: 4, 2, ranking 2) | reward |
|---|---|
| exactly right | 0 |
| one score off by 1 | −1 |
| ranking off by 2 | −2 |
| malformed output | −10 |
The training data:
- HelpSteer3;
- a commercially friendly subset of arena-human-preference-140k;
- a synthetic safety blend. Its harmful prompts pair a safe response (chosen) against an unsafe one (rejected); its safe prompts pair a helpful answer against an over-refusal, so the judge learns that unnecessary refusal is a failure too.
Every sample is duplicated with the two responses swapped, against position bias. The GenRM improves on RM-Bench, JudgeBench and an internal validation set as its RL scales (Fig. 10).
4.3 Sixteen comparisons, not 120
RLHF uses the same 128 prompts × 16 responses. Comparing all pairs would take 120 GenRM calls per prompt, and the judge has 235B parameters. Instead, each response is compared with its successor in a ring: . That is exactly 16 comparisons, the comparison graph stays connected, and each response is judged twice, once in each position. A tied pair of helpfulness scores is broken with the ranking score: , . A response’s base reward is the average of its two scores.
Demo 03 Part B simulates a noisy judge with a 0.4-point preference for position 1, over 2,000 groups of 16:
| comparison graph | judge calls per prompt | rank correlation with true quality |
|---|---|---|
| all pairs, both orders | 240 | 0.977 |
| all pairs, one order | 120 | 0.957 |
| circular (each response in both positions), with tiebreak | 16 | 0.833 |
| circular, without tiebreak | 16 | 0.823 |
- The ring costs ranking accuracy and saves 7.5× the calls to a 235B judge.
- It keeps position bias out. A fixed order inflates a gap by 0.21 points; the ring puts each response once in each position.
- The tiebreak helps a little, when the judge’s ranking is finer than its integer scores (our assumption).
GRPO only needs a ranking within the group, and a 0.83 correlation is still a strong signal.
4.4 Group Relative Length Control
Under the base reward, response length grows fast during RLHF, and most of the growth is in the reasoning trace. Only the final answer is judged. The report notes this is not reward hacking: as in DeepSeek-R1, the model spends more inference-time compute to earn more reward. But chat prompts rarely need long reasoning, so the reasoning grows because the reward cannot see its cost.
GRLC (Eqs. 4–6) splits each response into reasoning and answer lengths. Within the prompt’s group it normalises each length to (1 = shortest), centres it to zero mean, and adds it to the reward:
On top, a quality-gated conciseness bonus (0.5 each) goes to the response with the shortest reasoning and to the one with the shortest answer, but only if its base reward is at least the group’s 80th percentile. Two properties follow:
- the penalty is relative within the prompt, so inherently complex problems are not penalised for needing long answers;
- short but bad responses cannot earn the bonus.
The report saw verbosity fall 30% “without sacrificing accuracy”.
Demo 03 Part D tests it on the toy. The judge sees only the answer, and accuracy grows slowly with reasoning (40% → 59% over 8 positions); the reward is on the GenRM’s 1–5 scale:
| reward | mean length after 300 steps | accuracy |
|---|---|---|
| base only | 3.33 (from 2.00) | 54.3% |
| GRLC, λ = 0.2 | 3.00 (−10%) | 53.2% |
| GRLC, λ = 0.5 | 2.54 (−24%) | 51.2% |
Length control removes the growth the reward cannot see. In this toy the extra reasoning was worth a few points, so cutting it cost them. How much of the reasoning is redundant decides what length control costs. (A first version applied λ = 0.5 to a 0/1 reward, a scale four times smaller than the report’s, and collapsed the policy; scale matters.)
5. DPO against tool hallucination: tried, not shipped
The report counts as tool hallucination any attempt to call a tool when none is declared in the system message. It ran a small DPO experiment:
- data: 1,000 math and 1,000 STEM multiple-choice tasks, 32 on-policy samples each, giving ~50K preference pairs (10K or fewer gave similar benefits). The pairs fall into three categories: No-Tools (correctness), With-Tools (correctness) and Hallucination-Penalty (any undeclared tool call is rejected);
- training: a light configuration (lr 3 × 10⁻⁶, batch 128, 50 steps, SFT loss 0.2, DPO loss 1.0, KL 0.05).
| accuracy | hallucination rate | |
|---|---|---|
| AIME25 | 80.88 → 84.58 | 1.25% → 0% |
| GPQA | 65.15 → 69.19 | 8.33% → 0.70% |
The released model does not use DPO, because RL already achieved comparable performance. Demo 04 Part A builds the same experiment on a toy:
- hallucination without declared tools falls from 10.4% to 0.4%;
- prompts that declare tools keep using them;
- but a table of logits also jumps 40 points in accuracy (KL 0.47 from the start), where the report’s lightly trained 30B model moved ~4.
DPO removes what it labels as rejected. How far everything else moves depends on how much holds the model in place.
6. Selective FP8 quantization
After BF16 post-training, Nano is quantised to FP8 with ModelOpt and Megatron-LM (post-training quantization, PTQ).
- Calibration: 1K samples from the post-training SFT data. These recovered slightly more accuracy than cnn_dailymail, and on-policy generations from the BF16 model gave no further benefit.
- Selective precision: a sensitivity analysis found the 6 self-attention layers most sensitive, and the Mamba layers that feed them sensitive too. Those 6 + 6 layers stay in BF16. Everything else (weights, activations, KV cache) goes to FP8, except the Mamba conv1d, which stays in BF16.
- Result: ~99% median accuracy recovery. Quantising the KV cache to FP8 raises throughput most, through larger batches, and the selective scheme keeps accuracy even with it (Fig. 11, one H100 at 8K in / 16K out).
Demo 04 Part B uses Lecture 15’s checkpoint-verified accounting:
| configuration | weights | cache per 24K-token sequence | sequences on one H100 (90% of 80 GB) |
|---|---|---|---|
| BF16 everything | 63.2 GB | 200 MB | 44 |
| FP8 weights, BF16 KV | 32.4 GB | 200 MB | 197 |
| selective FP8 + FP8 KV | 32.7 GB | 125 MB | 315 |
Only the 6 attention layers keep a KV cache, and the Mamba state is unchanged, so FP8 KV shrinks the cache from 200 to 125 MB. Table 4’s median FP8/BF16 accuracy is 99.0% across 14 benchmarks. Lecture 21 develops quantization in general.
7. The evaluation, and what the pipeline cost
7.1 The final comparison, read with error bars
All results were collected with NeMo Evaluator (most benchmarks via the NeMo Skills harness), with official implementations for Terminal Bench, SWE-Bench and Multi-Challenge. Competitor numbers are officially reported where available, otherwise from Artificial Analysis, otherwise computed. Selected rows (Table 3):
| benchmark | Nano | Qwen3-30B-A3B-Thinking | GPT-OSS-20B |
|---|---|---|---|
| MMLU-Pro | 78.30 | 80.90 | 75.00 |
| AIME25 (no tools / with tools) | 89.06 / 99.17 | 85.00 / – | 91.70 / 98.7 |
| GPQA (no tools) | 73.04 | 73.40 | 71.50 |
| LiveCodeBench v6 | 68.25 | 66.00 | 61.00 |
| SWE-Bench (OpenHands) | 38.76 | 22.00 | 34.00 |
| TauBench V2 average | 49.04 | 47.70 | 47.50 |
| IFBench (prompt) | 71.51 | 51.00 | 65.00 |
| Arena-Hard-V2 average | 67.65 | 57.80 | 48.55 |
| AA-LCR | 35.85 | 59.00 | 34.00 |
| RULER-100 @ 1M | 86.34 | 77.50 | – |
| MMLU-ProX (multilingual) | 59.50 | 77.60 | 69.10 |
Demo 04 Part C applies Lecture 16 §6.2’s error bars to the rows whose benchmark size is well known (one sample per item, binomial):
- beyond 2 standard errors: Nano’s IFBench lead (+20.5 over Qwen3, 300 prompts) and SWE-Bench lead (+16.8, 500 tasks); its deficits on AA-LCR (−23.1, 100 questions) and MMLU-Pro (−2.6, small but on 12,032 items);
- within noise: GPQA (−0.4, 198 questions), AIME25 (+4.1, 30 problems), SciCode, TauBench.
So Nano’s clear wins are agentic and instruction following; its clear losses are AA-LCR long-context reasoning and multilingual MMLU-ProX. Prompt sensitivity, the standard deviation across prompt variants (Lecture 17 §5.5), is below 1 point on all its datasets (Appendix E).
7.2 Where the post-training compute went
Demo 04 Part D estimates FLOPs. The step counts and lengths are assumptions, labelled: two RLVR stages of ~500 steps, RLHF ~300 steps, 8K-token mean responses.
| stage | FLOPs | share of pre-training (5.4 × 10²³) |
|---|---|---|
| SFT (218B token slots) | 4.7 × 10²¹ | 0.9% |
| RLVR + RLHF rollouts and updates | 7.6 × 10²⁰ | 0.1% |
| GenRM judging during RLHF | 2.2 × 10²⁰ | 0.04% |
| training the GenRM (GRPO on 235B-A22B) | 1.1 × 10²¹ | 0.2% |
Under these assumptions, post-training is ~1.3% of pre-training in FLOPs. It is far more in GPU time:
- RL rollouts run at decode efficiency (Lecture 19);
- a 235B judge is trained and queried for a 3.6B-active student.
At the frontier, RL’s share keeps growing (Lecture 19 §1).
8. Summary
- Nano’s post-training runs SFT → RLVR → RLHF → RLVR → FP8, each stage with a stated purpose; the second RLVR protects reasoning after RLHF.
- The chat template is the API contract. Reasoning modes are set by prefill; reasoning is kept within a user turn and dropped across turns (62% less context at 8 turns in our session); tools are rigid XML to avoid escaping.
- SFT is a data factory: seed → synthesise → verify → mix across ~a dozen domains, with structural, repetition and slant filters. The 18M samples get 218B token slots, with small datasets repeated. Reasoning on/off and budget control are taught by data views (10% stripped, 3% truncated).
- RLVR trains all environments together, because one at a time erodes the others (on shared weights: 90% → 21%). Tasks are profiled, solved ones dropped, and sampled by a Gaussian pass-rate curriculum. The algorithm is synchronous GRPO with masked importance sampling, a frozen router, 49K maximum length and overlong filtering.
- RLHF uses a 235B GenRM trained with RL, queried 16 times per prompt in a ring (each response in both positions) instead of 120. GRLC stops reasoning from growing where the reward cannot see it, relative within each group and with a quality-gated bonus.
- Endgame: DPO removed tool hallucination in 50 steps but was not needed. Selective FP8 keeps the 12 sensitive layers in BF16 and recovers ~99%. Read with error bars, the evaluation shows clear agentic and instruction-following wins and clear long-context and multilingual losses.
9. Common pitfalls
- Serving with a template whose reasoning-retention rule differs from training’s.
- One environment at a time in RLVR.
- A curriculum judged only by its rollout savings, without checking it still reaches the hard tasks.
- A comparison graph where responses always appear in the same position.
- A length penalty on a different reward scale than it was tuned for.
- Brevity bonuses without a quality gate.
- Quantising the most sensitive layers because “FP8 works on average”.
- Ranking models by gaps smaller than the benchmark’s error bar.
10. Exercises
- SFT budget. With 13,000 steps × 64 × 256K packed tokens and 18M samples, how many tokens per sample if each is seen once? If the long-context slice (2% of samples, 128K tokens each) were seen once, what share of the budget would it take?
Answer
218.1B / 18M ≈ 12.1K tokens per sample. Long context: 0.02 × 18M = 360K samples × 128K = 46.1B tokens, about 21% of the budget for 2% of the samples. Packing and repetition decide what “2% of the blend” means in tokens.
- Comparisons. For G = 16, how many GenRM calls does the ring need per prompt, and how many all pairs? With both orders of every pair? In how many comparisons does each response appear in the ring, and in which positions?
Answer
16 vs 120 vs 240. In the ring each response appears in 2 comparisons: once in position 1 (as in ) and once in position 2 (as in ), so a constant position bias adds to everyone equally and cancels in the ranking.
- GRLC. A group has reasoning lengths 1,000, 3,000 and 5,000 tokens, all with base reward 4 (on 1–5), and equal answer lengths. With λ_think = 0.5 and no bonus, what are the final rewards? What changes if the 1,000-token response has base reward 2?
Answer
w = 1, 0.5, 0, centred: +0.5, 0, −0.5; rewards 4.25, 4, 3.75. With base 2 for the shortest: 2.25, 4, 3.75. The length term cannot rescue a poor response, and the bonus (if enabled) would not apply, because 2 is below the group’s 80th percentile.
- Error bars. IFBench has 300 prompts. Nano 71.51%, Qwen3 51.00%. Compute the standard error of the difference (independent, binomial) and decide whether the gap is significant. Repeat for GPQA (198 questions): 73.04% vs 73.40%.
Answer
IFBench: √((0.715 × 0.285 + 0.51 × 0.49)/300) = 3.9 points; the 20.5-point gap is ~5 SE, so significant. GPQA: √((0.730 × 0.270 + 0.734 × 0.266)/198) = 4.5 points; a −0.4 gap is noise.
- FP8 capacity. One 24K-token sequence needs 200 MB of cache in BF16 and 125 MB with FP8 KV; weights take 63.2 GB (BF16) or 32.7 GB (selective FP8). With 72 GB usable, how many sequences fit in each case? Why is the gain much larger than 2×?
Answer
BF16: (72 − 63.2) / 0.200 ≈ 44. Selective FP8: (72 − 32.7) / 0.125 ≈ 315. The weights take most of the memory in BF16, leaving little for cache; halving them frees far more cache room than halving the cache itself. Decode throughput then grows with the batch until it becomes compute-bound.
11. The related assignment (concepts only)
The post-training assignment can follow the same staging at small scale:
- render SFT data with the template you will serve with;
- keep a fixed domain ratio in RL batches;
- profile tasks before RL and drop the solved ones;
- train on several environments together;
- report scores with error bars.
The released Nemotron SFT data and NeMo Gym environments are usable starting points. No solutions are given here.
12. Research directions
The guest lecture’s open questions:
- asynchrony: how far asynchronous RL can push N-step off-policy training without accuracy loss;
- reward models: whether GenRMs can replace Bradley–Terry models entirely;
- environment portfolios: how to scale beyond 8–20 environments;
- SFT vs RL: what the right balance between SFT breadth and RL depth is.
Also from this lecture:
- curricula that use transfer: when easy-first helps and when it only delays hard tasks;
- cheap comparison graphs with known ranking error;
- length control that knows which reasoning is redundant.
13. Further reading
- NVIDIA, Nemotron 3 Nano (arXiv:2512.20848); Nemotron 3 White Paper (arXiv:2512.20856); Nemotron 3 Super technical report; Nemotron Nano 2 (2025).
- NeMo RL, NeMo Gym, NeMo Data Designer, NeMo Evaluator, ModelOpt (github.com/NVIDIA-NeMo, github.com/NVIDIA/Model-Optimizer).
- Wang et al., HelpSteer3 (2025); Toshniwal et al., GenSelect (2025); Lambert et al., Tülu 3 (arXiv:2411.15124); Pyatkin et al., IFBench (arXiv:2507.02833); Deshpande et al., Multi-Challenge (2025); Styles et al., WorkBench (2024).
14. Next lecture
Lecture 21 · Deployment Preparation: Speculative Decoding, Quantization, Pruning, NAS. Part III ends with a post-trained model. Part IV makes it cheap to serve:
- speculative decoding with draft models and MTP heads, and its exact acceptance math;
- number formats and quantization paradigms (weight-only, W8A8, KV), with calibration;
- pruning and distillation (Minitron), and neural architecture search (Puzzle).
术语表 (Glossary, English → 中文)
| English | 中文 |
|---|---|
| post-training pipeline / stage | 后训练流程 / 阶段 |
| chat template / prefill / reasoning mode | 对话模板 / 预填充 / 推理模式 |
| multi-step vs multi-turn reasoning retention | 多步内保留推理 / 跨轮丢弃推理 |
| tool-integrated reasoning / XML tool call | 工具融合推理 / XML 格式工具调用 |
| synthetic data factory / seed → synthesise → verify → mix | 合成数据工厂 / 种子-合成-校验-混合 |
| autoformalisation / compiler-verified proof | 自动形式化 / 编译器验证的证明 |
| user simulator / environment simulator | 用户模拟器 / 环境模拟器 |
| repetition filter / political-slant filter | 重复过滤 / 政治倾向过滤 |
| data blend / dynamic sampling / packing | 数据配比 / 动态采样 / 序列打包 |
| reasoning on/off control / budget control | 推理开关控制 / 推理预算控制 |
| multi-environment RLVR / interference | 多环境 RLVR / 环境间干扰 |
| profiling / Gaussian curriculum / pass rate | 能力画像 / 高斯课程 / 通过率 |
| masked importance sampling / frozen router / overlong filtering | 掩码重要性采样 / 冻结路由器 / 超长过滤 |
| generative reward model (GenRM) / Bradley–Terry RM | 生成式奖励模型 / Bradley-Terry 奖励模型 |
| circular comparison / tiebreak / position bias | 环形比较 / 平局打破 / 位置偏差 |
| Group Relative Length Control (GRLC) / quality-gated bonus | 组相对长度控制 / 质量门控奖励 |
| tool hallucination / DPO | 工具幻觉 / 直接偏好优化 |
| post-training quantization (PTQ) / calibration / selective precision | 训练后量化 / 校准 / 选择性精度 |
| accuracy recovery / prompt sensitivity | 精度恢复率 / 提示敏感度 |