Nemotron 3.5 Decision
A step-by-step guide to post-training Nemotron 3.5 Decision 8B with NeMo AutoModel. The model is an 8B decision model that uses a bidirectional Ministral 3 encoder to score the supplied options in one forward pass. The guide runs LoRA on a single GPU or backbone fine-tuning on one node on a fictional SOC alert-triage dataset, then exports the result and scores it with the checkpoint’s own code on Hugging Face Transformers.
What is Nemotron 3.5 Decision?
Nemotron 3.5 Decision 8B (architecture NemotronForDecision) answers typed decision questions about a
structured or free-text state. Each question is one of three types:
The model does not generate text. It reads the question once, bidirectionally, with a single mask token in the answer slot. Its decision head, restricted to the option codes, gives a probability for every option in one forward pass, with no sampling.
Key architectural details:
- Backbone: 34-layer Ministral 3 encoder read bidirectionally, hidden dim 4096, 32 attention heads (8 KV heads), head dim 128
- Vocabulary: 131,072 tokens; mask token id
100 - Context: YaRN RoPE scaling to 262,144 positions
- Attention: fully bidirectional (
is_causal: false); text only - Parameters: 8.49B in total, of which 7.42B are decoder layers; ~17 GB in bf16
Post-Train for SOC Alert Triage
This guide post-trains the model on a fictional SOC (security operations center) alert-triage dataset that ships with NeMo AutoModel. Every alert comes with five questions:
The labels follow a fictional tutorial policy. The base model answers from general knowledge: it gets 71% of the
held-out questions right, and only 38% of the severity questions. After 40 LoRA steps it follows the policy on
every held-out question. The same recipe runs on your own decisions (see
Bring Your Own Decisions).
The tutorial data and labels are fictional. Accuracy on them shows that post-training works; it does not measure operational security performance.
Guide Overview
Hardware Requirements
- LoRA: one GPU. Peak memory was ~18 GiB with this dataset’s short prompts (bf16 base, activation checkpointing); longer states need more.
- Backbone fine-tuning: one node of 8 GPUs (~26 GiB peak per GPU; fp32 weights and AdamW state for the decoder layers, sharded with FSDP2).
- Training time (measured on 8x B200): LoRA ~3.5 min on one GPU and backbone fine-tuning ~2.5 min on 8 GPUs. Both include model loading, validation, and test scoring. Scoring the base model takes ~1 min.
- Disk: ~17 GB for the base checkpoint, ~170 MB per LoRA stage (adapter only), ~48 GB per backbone fine-tuning stage (sharded and consolidated weights), and ~17 GB per exported checkpoint.
Step 0 — Set Up the Environment
Place the Nemotron 3.5 Decision 8B bf16 checkpoint in a local directory. This guide uses
checkpoints/nemotron-3.5-decision-8b.
Use the local directory, not a Hugging Face id, in every command below. Each saved stage records a fingerprint of the base checkpoint’s configuration and weights, and the export refuses to merge a stage into a base it was not trained on. The fingerprint is only recorded when the base is a local directory.
The recipe accepts Nemotron 3.5 Decision checkpoints as they ship: config.json lists
"architectures": ["NemotronForDecision"] (model_type: ministral3), and the directory holds the checkpoint’s
decision contract, decision.json and decision_template.jinja. NeMo AutoModel loads the model natively, so its
remote code is not needed. Vision and quantized (for example, NVFP4) variants stop at setup with an explicit error.
Post-train the bf16 checkpoint and quantize afterwards.
Step 1 — Prepare the SOC Triage Dataset
Generate the fictional alerts. The generator is deterministic for a given seed. It needs no model, API key, or GPU, and it refuses to overwrite an existing directory:
Expected output:
Each record holds one alert (state), its five questions, and the policy’s answers:
(Two of the five questions and some state fields are shown.)
The recipe reads these SystemOne records directly, as the CLM and Clef recipes do, so no conversion step is needed. The model is trained the way the checkpoint reads decisions: one question per read. Each alert gives five reads, so the splits hold 640 training, 160 validation, and 160 test questions. All five questions about one alert stay in the same split, so the validation and test alerts are never seen in training.
Decision Prompt Format
The checkpoint owns its prompt, and the recipe renders every question exactly as the checkpoint’s own code does:
decision_template.jinjawrites a fixed system message, then a JSON user turn{"state", "question", "options"};- options keep the question’s order (
choice: criteria order;noul:false,true;score: level 0 upwards), each with the codedecision.jsonassigns to its position (A,B, …); - control tokens inside the state or question are encoded as plain text, so they cannot act as control tokens;
- the template ends with the mask token.
The probability of each option is the decision head’s distribution at that mask, restricted to the option codes.
Bring Your Own Decisions
For your own data, write one decision per line:
soft_labels (a probability per option) is optional. Rows that share a group stay in the same split, which keeps
near-duplicates out of validation and test. Convert the lines to single-question SystemOne records with:
--split three-way writes group-disjoint train / validation / test files. Then point the data.* paths of
examples/decision/nemotron_decision_support_routing_lora.yaml (or the SOC config) at them. If your data is already in
SystemOne records, use them as they are. Soft labels there map each question to option weights:
"soft_labels": {"verdict": {"malicious": 0.8, "false_positive": 0.2}}.
Step 2 — Training Configuration
Config file: examples/decision/nemotron_decision_soc_triage_lora.yaml
What the recipe trains:
- Loss: the shared decision objective (
DecisionLoss) with label smoothing, Brier, and ranked-probability terms off, which is cross-entropy over the options: against the gold answer, or against a question’ssoft_labelswhen the record has them.loss.soft_label_kl_weight > 0switches to gold cross-entropy plus a weighted KL term to the soft labels. - Option shuffle: an explicit, training-only setting. With
canonical_fraction: 0.5, half of the training reads keep the checkpoint’s option order and the other half shuffle the options and re-code them by position, so the model learns what the options mean, not which letter they had. Evaluation always uses the checkpoint’s order, and the recipe’s default (1.0) never shuffles. - Frozen readout: the embeddings and decision head never train, and no new parameters are added. The exported checkpoint scores decisions exactly as the base checkpoint’s own code does.
- Long questions: questions longer than
data.max_tokensare skipped and counted, never truncated.
With rank 32 on the attention and MLP projections of all 34 layers, LoRA trains 89.1M parameters (1.04% of the model).
Backbone Fine-Tuning
Backbone fine-tuning trains the encoder blocks and final norm instead of LoRA adapters. Override four keys on the command line:
It trains 7.42B parameters: all 34 encoder blocks and the final norm. The input embeddings and the output projection (the decision head) stay frozen. The head’s rows for the option codes are the readout, so keeping them fixed keeps every code’s meaning identical to the base checkpoint, so the exported model reads its decision contract exactly as the base does. It keeps fp32 weights and AdamW state for the trained parameters, so it uses one node of 8 GPUs (see Hardware Requirements).
Step 3 — Launch Post-Training
Score the Base Model
Run the same config in eval mode to get the before numbers on the validation and test splits:
LoRA
One epoch of the 640 training questions at 16 questions per step is 40 optimizer steps. Validation runs on the starting checkpoint (step 0) and on the final step.
Backbone Fine-Tuning
Training Log for LoRA
Each step takes ~3.6 s on one B200 (16 questions, activation checkpointing).
Training Log for Backbone Fine-Tuning
The parameter summary printed when the model is built counts all 8.49B parameters. The recipe then freezes the embeddings and the decision head, so 7.42B parameters train.
With a 100x lower learning rate, backbone fine-tuning reaches the same accuracy with less confident probabilities (cross-entropy 0.023 against 0.001 for LoRA).
How a Stage Is Selected
Validation publishes the best stage as LOWEST_VAL: most correct validation questions first, then lowest
cross-entropy (NLL). For LoRA the starting checkpoint (step 0) is a saved, selectable stage, so a run that does not help
publishes the base unchanged. Backbone fine-tuning selects among its trained stages. The test split is scored once, on
the selected stage, and is never used for selection.
Checkpoints Saved
A backbone fine-tuning stage holds model/consolidated/ (a Hugging Face export of the trained weights) instead of the
adapter.
Step 4 — Export and Run Inference
Export the Selected Stage
Merge the selected LoRA stage into the base weights (W += (alpha / r) * B @ A, computed in fp32). The export writes
a complete, standalone checkpoint:
The same command exports a backbone fine-tuning stage (--stage runs/soc/backbone/LOWEST_VAL), cast to the base dtypes. The
export first checks the stage’s base fingerprint and refuses a base the stage was not trained on. It copies the base
configuration, tokenizer, and model code unchanged, so the output loads anywhere the base loads. Each export takes
~45 s.
Score Decisions with the Checkpoint’s Own Code
The export is a complete Nemotron 3.5 Decision checkpoint: it keeps the base’s model code, decision contract, and tokenizer, so you serve it exactly like the base. Its own interface needs Transformers 5.23 or later. NeMo AutoModel pins an earlier version, so use a separate environment for inference:
system_one answers named questions about a state. prepare_decisions and decide give the probability of every
option. The example below is a held-out test alert:
Output of the post-trained export (CKPT = "exports/soc_lora"):
The base model on the same alert (CKPT = "checkpoints/nemotron-3.5-decision-8b"):
The evidence is ambiguous and the asset is critical, so the tutorial policy escalates. The base model closes the
alert with 90% probability; the post-trained model escalates. system_one returns each answer with its probabilities
(choice and score) or the probability of true (noul); score options are their positions ("0" for
Informational through "4" for Critical).
Evaluate the Test Split
Score every question of the test records with the same interface:
The checkpoint’s own code reproduces the recipe’s test predictions (predictions_test.jsonl): the same decision on
all 160 test questions, with a maximum absolute probability difference of 0.0008 for the LoRA export and 0.0024 for the
backbone fine-tuning export. On the base checkpoint the same loop gives 0.7125 (114/160), also matching the recipe
decision for decision.
Resources: one GPU with ~16 GiB for the bf16 weights. Runtime: ~119 ms per question on 1x B200, one question at a time; the 160 test questions take ~19 s.
Step 5 — Results
Evaluation on the 160 Test Questions (32 Held-Out Alerts)
Accuracy by Question
The base model already identifies the behavior behind an alert (attack_tactic). Its mistakes are the policy’s
choices, which it has no way to know: what a controlled test artifact means, when an ambiguous alert on a critical
asset is escalated, and where the severity thresholds sit. Post-training teaches those rules. Both methods reach
100% here because the fictional policy is deterministic. On your own data, compare the two methods on your held-out
split.