Orivael · NVFP4 precision lab · Public results

4-bit Nemotron matches BF16 on code — until it starts reasoning

NVFP4 is NVIDIA's 4-bit floating-point format, decoded natively by Blackwell tensor cores. We quantized Llama-3.1-Nemotron-Nano-4B-v1.1 with one standard ModelOpt recipe and scored it against its own BF16 weights on 542 HumanEval+ and MBPP+ tasks, using hidden test cases, not perplexity. We tested three modes: thinking off, thinking on, and sampled.

Download the full write-up PDF · 6 pages

Thinking off

−0.5 pt

NVFP4 − BF16, 95% CI ±4.5

Batch-1 speed

1.90×

268 vs 141 tok/s in vLLM

Checkpoint

3.7 GB

vs ~9 GB BF16

Best-of-8, reasoning

−0.4 pt

pooled, 3 runs, CI −2.1 to +1.4

Headline

Three results

With thinking off, NVFP4 matches BF16 on HumanEval+/MBPP+ hidden tests and runs 1.9× faster at batch 1 from a 3.7 GB checkpoint. With reasoning on, it loses 4–6 points. Best-of-8, with a selector that sees only the examples in the prompt, closes that gap: −0.4 pt pooled over three independent sampling runs on two providers.

Setup. ModelOpt 0.47.0 PTQ, NVFP4_DEFAULT_CFG, group 16, 128 wikitext calibration samples; lm_head, embeddings and KV cache kept in BF16. Hardware: an RTX PRO 6000 Blackwell (sm_120), served with vLLM 0.32.0 on modelopt_fp4 kernels. Scoring: EvalPlus 0.3.1 plus tests. Statistics are paired per task: a bootstrap 95% CI and an exact McNemar p.

Thinking off: indistinguishable from BF16

Greedy, up to 1,024 new tokens, plus tests across all 542 tasks.

Pairingb − a95% CIOnly aOnly bp
BF16 r1 vs BF16 r2−0.7[−3.1, +1.8]26220.67
BF16 r1 vs NVFP4 r1−0.5[−5.0, +3.9]75720.87

Same pass rate, not the same model. 147 of 542 tasks flip between the two, in near-equal numbers each way. In a later session where two BF16 runs were byte-identical, NVFP4 still flipped 135, so those flips come from precision, not scheduling noise. The 1.9× speedup is at batch 1. Fully batched, it shrinks to 1.28×.

Thinking on: a 4–6 point gap

detailed thinking on, greedy, up to 8,192 new tokens. A trace that never closes counts as no answer.

RunHumanEval+MBPP+AllUnclosedMedian tokens
BF16 think r10.8290.6450.701722,022
BF16 think r20.8350.6610.714632,041
NVFP4 think r10.7800.6060.659802,431
NVFP4 think r20.7870.5950.653772,409

All four cross pairings favour BF16: −4.2, −4.8, −5.5 and −6.1 points, p ≤ 0.018 each. The same session's thinking-off pair landed within noise again. NVFP4 traces run about 20% longer and close less often, yet most of the tasks it loses are traces that closed with the wrong answer.

The equivalence holds for direct answers only

That is still no case against reasoning. Thinking is worth +21 to +23 points to both models, and NVFP4 with thinking on (0.65) beats BF16 with it off (0.47).

Best-of-8 closes it

Model-card sampling (T 0.6, top-p 0.95) with the same seeds for both models, 8 samples per task.

A selector runs each sample against the examples written in the prompt: HumanEval docstring lines and MBPP's visible assert. The sample that passes the most examples wins. No hidden test reaches the selector. NVFP4's oracle@8 is as high as BF16's (0.832 vs 0.825): a correct answer is in its sample set just as often, it only comes up less often per sample.

mean gap independent replicate −3 pt non-inferiority margin
+2 0 −2 −4 −5 parity with BF16 −3 pt margin −3.5 −2.0 +0.1 −0.4 1 sample 2 4 8 samples

NVFP4 − BF16 in points, on hidden plus tests across all 542 tasks. Replicates are disjoint best-of-k groups from sampling run 1, and at k = 8 the three independent runs; the line at k = 8 is their pooled mean.

RunBF16 sel@8NVFP4 sel@8NVFP4 − BF1695% CI
1 (Colab G4)0.7750.788+1.3[−1.1, +3.7]
2 (Brev)0.7900.779−1.1[−3.7, +1.3]
3 (Brev)0.7920.779−1.3[−4.1, +1.1]
Pooled−0.4[−2.1, +1.4]

Non-inferiority holds

Every run sits above the −3 margin, and the pooled lower bound is −2.1. Run 1's +1.3 was the favourable draw, so the number to quote is −0.4.

What didn't close it

InterventionWhat it didGap after
Chat-template calibrationMagicoder + UltraChat instead of wikitext−5.2 (worse)
Quantization-aware distillationHeld-out KL −37%, yet 136 flips vs 135+1.1, n.s.
16k reasoning budgetBoth models slightly better−3.7
Forced answer at the cap+4.5 to both models−3.7 to −6.8
Triad loop (rule-based critic)+6.6 (BF16) and +7.0 (NVFP4) at the same token budget−3.9

Distillation worked at what it optimises and missed what we measure. At 86% per-token agreement over ~400-token answers, almost every answer still diverges from BF16 somewhere, so the set of passing tasks just gets re-drawn. The Triad is the best single-sample method we tested. BF16 Triad best-of-4 (0.795) beats plain best-of-8 (0.785) at half the tokens. But it lifts both precisions alike, so the gap under it remains.

What we're honest about

The open problem

Why does 4-bit precision cost accuracy only when the model reasons, and is there a fix cheaper than eight samples?