Fix How It Acts, Not How It Thinks: Surgical Fine-Tuning of Frontier LLMs
Abstract
Open-weight LLMs are competent software engineers, but they sometimes fail at tasks they are otherwise able to do. Often it is not a failure of reasoning. It is a few small missteps over a long trajectory (repeating a step that has already failed, or declaring the task done while a requirement is still unmet) that make the difference. Correcting this calls for a surgical weight update that steers the model toward the right actions without interfering with its reasoning. Such updates, typically learned with LoRA adapters, are often too small to survive merging into a released checkpoint. In our BF16 release, the median weight change is only 1.5% of a single rounding step, and merging loses roughly two thirds of the update's norm. When the same adapter is merged into the mixed FP8/NVFP4 release of the same model, 93% of the update disappears. Instead of increasing the size of the update, we directly train on the surviving part. We introduce merge-aware fine-tuning. Standard LoRA rounds the merged weights to the storage format only at export, so the loss never sees the rounded weights. We instead round the sum of base weights and adapter update to the release format at every training step, keeping the vendor's quantization scales, and compute the loss on these weights. The forward pass matches the serving engine numerics, and the gradient passes straight through the rounding, so the model we train is the model we ship. The loss optimizes only the model's actions and keeps its reasoning close to the base model. Applied to Nemotron-3.5, the recipe improves agentic coding in both the BF16 and the NVFP4 release, by up to 8.4 points on Terminal-Bench 2.1, and we publicly release both models.
Figures & tables
| Release format | Module group (storage) | update | served change | retained | lost |
|---|---|---|---|---|---|
| BF16 | attention (BF16) | 0.0293 | 0.0100 | 0.340 | 66% |
| Mamba in_proj (BF16) | 0.0937 | 0.0301 | 0.321 | 68% | |
| shared experts (BF16) | 0.0742 | 0.0274 | 0.369 | 63% | |
| all | 0.1231 | 0.0419 | 0.341 | 66% | |
| NVFP4 | attention (FP8) | 0.0293 | 0.0036 | 0.124 | 88% |
| Pool | trajectories | distinct tasks | share of the gradient |
|---|---|---|---|
| lb-syn (synthetic, public repos) | 969 | 293 | 26.8% |
| lb-real (LiveBench 1.0, retired) | 225 | 54 | 5.1% |
| swe (synthetic SWE-style tasks) | 188 | 33 | 51.3% |
| term (synthetic terminal tasks) | 208 | 109 | 16.8% |
| total | 1,590 | 489 | 100% |
| 120B BF16 | 120B NVFP4 | |||||
| Benchmark | Smaug | base | Smaug | base | ||
| Agentic coding | ||||||
| Terminal-Bench 2.1 | 69.1 | 60.7 | 64.0 | 62.8 | ||
| SWE-bench Verified | 72.3 | 71.1 | 71.8 | 71.1 | ||
| SWE-bench Multilingual | 68.9 | 67.7 | 69.0 | 67.0 | ||
| DeepSWE [offline] | 27.4 | 24.7 | 21.2 | 18.2 | ||
| LiveBench 2.0 board | Smaug-Nemotron-3.5-NVFP4 | NVFP4 base | |
|---|---|---|---|
| Long Agentic | 8.4 | 7.3 | |
| Reasoning | 75.1 | 71.7 | |
| Coding | 72.2 | 61.3 | |
| Browser | 25.6 | 18.0 | |
| Data Analysis | 65.1 | 65.7 | |
| Research | 67.8 | 70.9 |
| Model | TB 2.1 | SWE-V | cos | ||
|---|---|---|---|---|---|
| base (NVIDIA) | 60.7 | 71.1 | – | – | 0 |
| base, our harness (3 runs) | 63.3 | – | – | – | 0 |
| plain LoRA, merged | 63.5 | 70.5 | 0.34 | 0.26 | |
| merge-aware release | 69.1 | 72.3 | 0.34 | 0.26 |
| base | plain LoRA | release | |
| How the 89 tasks ended (mean tasks per run) | |||
| passed (higher is better) | 56.3 | 56.5 | 61.5 |
| declared complete, scored as failed (lower is better) | 23.7 | 25.3 | 19.8 |
| ended without a completion claim (lower is better) | 1.3 | 1.0 | 0.5 |
| hit the three-hour limit (lower is better) | 7.7 | 6.3 | 7.3 |
| precision of completion claims (%, higher is better) | 69.7 | 68.5 | 75.5 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Smaug-Nemotron-3.5 (BF16) | Smaug-Nemotron-3.5-NVFP4 | |
| adapted modules | (32), in_proj (40), shared up/down (80) | (32), in_proj (40), latent fc1/fc2 (80) |
| storage of adapted modules | BF16 (152) | FP8 (72), BF16 (80) |
| trainable parameters | 59.7M (0.049%) | 48.5M (0.040%) |
| LoRA | rank 32, (scale ), dropout 0 | |
| objective | likelihood on action tokens only; sequence-level drift penalty on thinking, | |
| optimizer | AdamW, weight decay 0, gradient clipping at 1.0 | |
| Smaug-Nemotron-3.5 (BF16) | Smaug-Nemotron-3.5-NVFP4 | |||
|---|---|---|---|---|
| step | TB 2.1 (of 67) | step | ||
| 75 | 46 (69%) | 80 | ||
| 100 | 52.5 (78%) | 100 | ||
| 125 | 51 (76%) | 110 | ||
| 158 | 49 (73%) | 130 | ||
| 155 | ||||
| base | plain LoRA | release | |
| coherence class, any (lower is better) | 27.6 (25.9–31.0) | 28.9 (22.8–34.5) | 25.9 (24.1–27.6) |
| context loss | 21.3 (19.0–24.1) | 20.2 (15.8–24.1) | 19.0 (17.2–20.7) |
| reasoning-action mismatch | 14.4 (13.8–15.5) | 13.9 (8.8–22.4) | 13.2 (10.3–15.5) |
| task derailment | 0.6 (0.0–1.7) | 0.0 (0.0–0.0) | 0.0 (0.0–0.0) |
| execution class, any (lower is better) | 51.1 (50.0–53.4) | 45.7 (43.1–50.0) | 44.8 (41.4–48.3) |
| step repetition | 45.4 (41.4–50.0) | 37.6 (31.6–43.1) | 36.8 (32.8–39.7) |