TL;DR
Frontier LLMs often fail at long software engineering tasks not because they can’t reason, but because they stumble on simple actions—like repeating a failed bash command or declaring victory prematurely. Fixing this without triggering catastrophic forgetting requires a tiny, "surgical" weight update, yet standard export rounding silently erases up to 93% of such small updates. By introducing merge-aware fine-tuning, the authors train directly through the rounded weights and exact serving-engine numerics—meaning the model you train is, bit for bit, the model you ship.
What Problem Does This Paper Address?
Picture a brilliant software architect who solves complex algorithmic puzzles in their head, sits down at a terminal, and forgets to run the test suite before submitting a broken patch. Open-weight LLMs face this exact dichotomy: their reasoning is strong, but their action habits over multi-turn agentic loops can be brittle.
To fix how a model acts without altering how it thinks (and risking capability loss elsewhere), you want a tiny, targeted modification using Low-Rank Adaptation (LoRA). Normally, you train a LoRA adapter in high precision (FP32) and merge it back into the base weights for deployment—storing the result in lower-precision formats like 16-bit BF16, 8-bit FP8, or 4-bit NVFP4 to save memory and speed up inference.
Here lies the trap: discrete number grids are surprisingly coarse relative to surgical updates. In the authors' 120B BF16 model, the median weight change is just 1.5% of a single rounding step! When merged at export, plain rounding wipes out 66% of the update’s norm in BF16 and 93% in a mixed FP8/NVFP4 checkpoint (where 4-bit weights don't budge at all). Making the update larger would survive the rounding, but it ruins the surgical precision and degrades general capabilities.
Methods
Instead of fighting the rounding by inflating the update, the authors embrace it with merge-aware fine-tuning, ensuring training sees the exact deployed model:
- Train Through the Served Weights: Rather than rounding only at export, the sum of the frozen base weights and high-precision LoRA update is quantized into the exact release format ($W' = Q_{\text{fmt}}(W + sBA)$) at every training step, keeping the vendor's quantization scales frozen. Using a straight-through estimator (STE), the forward pass uses the rounded weights while gradients flow unrounded back to the FP32 LoRA factors.
- Match Serving-Engine Numerics: Training libraries and inference engines (like vLLM) round and clamp operations differently. Because a single mismatched operation alters the loss more than a tiny surgical update does, the authors emulate vLLM's exact runtime quirks during training (such as FP8 KV-cache rounding and Mamba time-step clamping).
- Action-Only Loss, Anchored Thinking: Training trajectories are split into context (masked), thinking (reasoning blocks), and action (tool calls and end-of-turn tokens). Only action tokens get a standard negative log-likelihood loss. Thinking tokens are held near the frozen base model using a sequence-level drift penalty ($k_3$ KL-style estimator).
- Target Served Change & Format-Aware Learning Rates: The authors track the relative change in actual rounded weights ($\rho \approx 3 \times 10^{-5}$) to select checkpoints, and apply a $4\times$ learning-rate multiplier to coarser FP8 layers so they move at pace with BF16 layers (leaving ultra-coarse 4-bit layers frozen in favor of adapting BF16 latent projections).
Datasets
- Training Data: 3,767 rows sampled from 1,590 successful multi-turn trajectories across four pools: retired LiveBench 1.0 repository tasks (
lb-real), newly written synthetic GitHub-style repo issues (lb-syn), synthetic DeepSWE-style tasks (swe), and synthetic Terminal-Bench tasks (term). No evaluation benchmark questions appear in training. - Evaluation Benchmarks: Evaluated on agentic coding (Terminal-Bench 2.1, SWE-bench Verified & Multilingual, DeepSWE, NL2Repo-Bench, LiveBench 2.0) and general capabilities to verify zero forgetting (GPQA Diamond, LiveCodeBench v6, SciCode, IFBench, AA-LCR for long context, and V* for vision).
Key Insights and Ideas
- Rounding isn't unbiased noise—it warps direction: Whether a weight crosses a rounding threshold depends on the base weight's magnitude, not its importance to the loss. Consequently, the surviving rounded update has a cosine similarity of just 0.26 (BF16) and 0.12 (NVFP4) to the learned high-precision update. Standard LoRA optimizes a vector that gets bent out of recognition at export.
- Silent failure of standard LoRA: In a controlled 120B BF16 test using identical data and objectives, standard LoRA retained the exact same 34% norm share upon merging as merge-aware LoRA, yet lost almost all its benchmark gains because its loss function never saw which 34% survived.
- The "dormant delta" in low precision: On coarse grids like FP8 or NVFP4, uniform low learning rates leave weights stuck inside rounding buckets for dozens of steps, starving the optimizer of feedback until format-aware learning rates are applied.
Key Results
Applied to NVIDIA's 120B hybrid Mamba/MoE Nemotron-3.5-Super-VL models, the authors publicly released Smaug-Nemotron-3.5 (BF16) and Smaug-Nemotron-3.5-NVFP4:
- Agentic Coding Gains: The BF16 release boosts Terminal-Bench 2.1 by +8.4 points (69.1 vs. 60.7 reported base; 61.5 vs. 56.3 tasks passed on the exact same harness, whereas merged standard LoRA scored 63.5 / 56.5 tasks). It also improves DeepSWE (+2.7), NL2Repo-Bench (+2.0), and SWE-bench (+1.2). The NVFP4 release improves across all agentic suites, including +3.8 overall on LiveBench 2.0 (+10.9 on Coding).
- Preserved General Capabilities: Modifying fewer than 3% of adapted weights ($\rho \approx 3.1 \times 10^{-5}$) kept reasoning, vision, and long-context scores intact (no benchmark dropped by more than 0.8 points).
- Cleaner Trajectories: Median reasoning tokens per step stayed virtually unchanged (~2,055 vs. 2,144), while step repetition dropped from 45.4% to 36.8% and precision on task-completion claims rose from 69.7% to 75.5%.
Limitations and Future Work
- Compute Constraints on Ablations: Evaluating 120B agentic models is expensive (~5 hours on two B300 GPUs per Terminal-Bench run), preventing full-suite evaluations on non-released ablation checkpoints or exhaustive comparisons against stochastic rounding.
- Deployment Coupling: Because training emulates specific serving-engine numerics, changing the inference engine or kernel implementations breaks bit-for-bit equivalence and requires updating the numerical switches and retraining.
- 4-Bit Expressivity Limits: Because 4-bit NVFP4 grids require ~100x larger updates to flip codes—which would violate surgical bounds—4-bit shared experts had to stay frozen, limiting NVFP4 gains relative to BF16.
- Future Directions: Extending the "train what you ship" paradigm to safety patches, machine unlearning, personalization, and quantized on-device models.
Summary updated