| A linear layer | |
|---|---|
| layer input, tokens by features | |
| weight, outputs by inputs | |
| layer output | |
| NVFP4 encodings used in the forward pass | |
| gradient of the loss , | |
| Number formats | |
| a high-precision value before encoding | |
| its 4-bit E2M1 code, in | |
| E4M3 scale of block (16 values) | |
| FP32 outer scale (per token or per expert here) | |
| decoded value | |
| round to nearest in a given format | |
| stochastic rounding onto a grid | |
| adjacent grid points around a value | |
| Communication | |
| peak compute (FLOPs/s), bandwidth (bytes/s) | |
| FLOPs computed and bytes sent per token | |
| 32 consecutive output values, rotated as a unit | |
| Hadamard matrix scaled to be orthogonal, entries | |
| diagonal matrix of random signs | |
| rotated values ; after encoding and decoding | |
| size of an outlier among the 32 | |
| Post's symbols | |
| what the post writes for , , | |
| what the post writes for , | |
Context. Matrix multiplications in fewer bits run faster. A 4-bit NVFP4 GEMMgeneral matrix multiplication, the product of two matrices; GEMMs account for most of the compute of training a transformer peaks at 15 PFLOPS on NVIDIA's GB300 GPU, compared with 5 in the 8-bit format MXFP8 and 2.5 in BF16bfloat16: a 16-bit floating-point format with 8 exponent bits and 7 mantissa bits, the default for large-model training. Fewer bits bring heavy rounding error. A 4-bit number holds only 15 distinct values, so each entry can shift by a large fraction of itself at every layer and step. Thinking Machines (Cook et al., 2026) trained Inkling 2 Small, a mixture-of-expertsMoE: a model whose feed-forward layers hold many expert networks, of which a learned router sends each token to a few; most of the parameters sit in the experts language model, using 4-bit matrix multiplications from the start of pretraining through the final RL rollout. Their post explains the numerics.
The recipe puts 4 bits in the forward pass of the expert layers, where speed pays off most and rounding error is manageable. The backward pass runs in MXFP8an 8-bit microscaling format: 8-bit floating-point values (E4M3, with 4 exponent bits and 3 mantissa bits, or E5M2) with one power-of-two scale per 32 values, 8.25 bits per value in all on tensors that match the forward tensors in expectation rather than bit for bit. Transposing a tensor for the backward pass regroups its scaling blocks. To keep fine 16-value blocks in the forward pass, the recipe decodes each 4-bit tensor, transposes it in higher precision, and re-encodes it in MXFP8 using unbiased stochastic roundingrounding a value to one of its two neighbors on the grid at random, the nearer one more often, with probabilities chosen so that the expected result equals the value. Once matrix multiplications speed up, inter-GPU traffic becomes the bottleneck. A 4-bit dispatch and an 8-bit combine after a random Hadamard rotation cut that traffic down. On the authors' largest jobs, this setup trains 8% faster in pretraining and 20% faster in RL than full MXFP8, while pretraining pays about a 2% cost in compute efficiencythe FLOPs a baseline would need to reach the same loss, as a fraction of the FLOPs used: a 2% cost means the MXFP8 model reaches this loss with about 2% fewer FLOPs. The same numerics run across pretraining, fine-tuning, and the RL sampler, so the model ships in its training precision without a calibration step.
Four bits go in the forward pass of the expert layers. In the authors' experience, expert layers are computationally expensive and tolerate quantization better than other layers. Running them fully in MXFP8 barely changed compute efficiency, while running them fully in NVFP4 cost more than the authors would accept. Between the two passes, putting 4 bits in the forward pass gave the better speed-accuracy tradeoff. Forward rounding error becomes part of the function being trained, so the loss sees it and the weights adapt. Backward weight gradients act differently. Summing over a batch averages out zero-mean rounding noise, while any directional bias compounds across layers, samples, and steps.
In RL, the 4-bit forward pass also drives the sampler. Generating tens of thousands of tokens per rollout requires reading every weight from memory on each token. Weights roughly half the size of 8-bit ones speed up every token, and the trainer evaluates the same function as the sampler. Composer 2 (Cursor, 2026) uses the same NVFP4 forward and MXFP8 backward split in its expert layers so its RL trainer matches its 4-bit sampler.
NVFP4 stores 4-bit values with one 8-bit scale per 16 values and a 32-bit outer scale. A 4-bit E2M1a 4-bit floating-point number with 1 sign bit, 2 exponent bits and 1 mantissa bit number holds a sign bit and a magnitudeso values past 6 need scaling. NVFP4 splits each row of a tensor into 16-value blocks. Each block carries one E4M3an 8-bit floating-point format with 4 exponent bits and 3 mantissa bits; its positive values run from to 448 scale the 8-bit E4M3 scale of block , shared by its 16 values, while one 32-bit outer scalea single FP32 number that multiplies a large group of values, such as a whole tensor, a token's activations or an expert's weights, and shifts the range that the block scales can reach is shared across a whole tensor, token, or expert. Entry of block decodes asThe encoder sets so the block's largest magnitude lands at 6, then rounds both the scale and the scaled values:Here a high-precision value before encoding; runs over the 16 values of its block is the input value and round to nearest: is the value of format F closest to rounds to the nearest value in the format. At , a block whose largest value is gets and stores exactly as . Rounding the scale itself adds error. A peak of 593.7 asks for 98.95, snaps to the nearest E4M3 value 96, and decodes as . At , reachable magnitudes span to , and shifts that window. Storage comes to bits per value, against for MXFP8.
Sharing a block scale makes small entries vulnerable to outliers. Halfway between 0 and 0.5 is 0.25, so an entry rounds to zero whenever . Because , any value below about of its block's largest magnitude is erased. One large entry in a 16-value block wipes out its small neighbors.
The backward pass needs the same tensors blocked along the other dimension. Take a linear layer with input the input of a linear layer: tokens by features ( tokens by features) and weight the weight of the linear layer: output features by input features ( outputs by inputs). Write the NVFP4-encoded input and weight used in the forward pass (decoded values in each entry) for their NVFP4 encodings, and the gradient of the loss with respect to the layer's output , a matrix that arrives from the layer above for the gradient of the loss arriving at the output. A training step runs three matrix products:The tensor coresthe GPU units that execute block-scaled matrix multiplications; they require both operands to be blocked along the dimension that the product sums over require both operands to be blocked along the summed dimension. The forward pass sums over the input features, so and use row blocks. The input gradient sums over the outputs and needs blocked down its columns. The weight gradient sums over the tokens and needs blocked across 16 tokens. Regrouping gives each value 15 new neighbors and a new scale, so it can round differently. When it does, the backward pass differentiates a function the forward pass never computed. In the post's example, a 16 by 16 tile with one row of large values keeps all 256 entries under row blocks. Under column blocks, every block gets a large entry, and the rule zeroes 221 of the 256 values.
NVIDIA's NVFP4 recipe (NVIDIA, 2025) eliminates the weight mismatch by assigning one scale to each 16 by 16 tile, so the encoding is identical in both orientations. DeepSeek-V3 used the same idea for FP8 weights with square 128 by 128 blocks. A tile has 256 members, so a single outlier sets the scale of all of them. In the post's tile with one outlier, row blocks keep 241 of 256 values, while the square tile keeps only the outlier. The authors found that tile scales cost more compute efficiency than they would accept.
Re-encoding with stochastic rounding gives the backward pass the forward tensors in expectation. Square tiles force forward and backward weights to match bit for bit. The backward pass only needs unbiased copies that match in expectation. The recipe decodes and exactly into higher precision, transposes them, and re-encodes them in MXFP8 with stochastic rounding. For a value between adjacent grid points ,In the post's example, 5.4 sits in a block of scale 9, encodes as , rounds to 0.5, and enters the forward pass as 4.5. After transposing into a block of scale 2, the value must be re-encoded. Round to nearest always gives 2, which decodes to 4. Stochastic rounding picks 3 a quarter of the time and 2 otherwise, giving expectation . That example uses the FP4 grid for illustration, while the recipe re-encodes onto MXFP8's finer grid.
The arriving BF16 gradient also gets encoded in MXFP8 with stochastic rounding in both orientations. Each backward product rounds its two operands independently, so the expected product is unbiased:and the same holds for . Following TetraJet-v2 (Chen et al., 2026) and Quartet II (Panferov et al., 2026), the recipe re-encodes the decoded 4-bit tensors rather than the original BF16 ones. The chain rule calls for the values and that the forward pass actually used. Decoding first also separates backward precision from the forward format, and MXFP8 GEMMs gave the authors the best accuracy-speed tradeoff. They eliminate the underflow problem. With E4M3 elements, the usual MXFP8 choice, a value rounds to zero only when it is more than 100,000 times smaller than its block's largest (computed here from the format).
Faster expert GEMMs make inter-GPU traffic the bottleneck. Under expert parallelismsplitting a mixture-of-experts layer's experts across GPUs: each token is sent to the GPUs holding its chosen experts (dispatch), and their outputs are sent back and summed with the router's weights (combine), each GPU holds a subset of experts. Tokens travel out to their routed experts (dispatch), and expert outputs return to be summed (combine). Within a GB300 NVL72 rack, NVLinkNVIDIA's direct GPU-to-GPU interconnect; within a GB300 NVL72 rack it carries 900 GB/s per GPU in each direction delivers 900 GB/s per GPU in each direction while NVFP4 GEMMs peak at 15 PFLOPS, or about 16,700 floating-point operations per arriving byte. DeepSeek-V4 (DeepSeek-AI, 2026) writes the condition for hiding communication behind compute asHere peak compute throughput of a GPU, in FLOPs per second is peak compute, interconnect bandwidth, in bytes per second is interconnect bandwidth, and and are the FLOPs computed and bytes sent per token. Moving from MXFP8 to NVFP4 triples at fixed . In the authors' runs, expert GEMMs stalled waiting for dispatched tokens, or the next layer, a short convolution in Inkling 2 Small, stalled waiting for combined ones. Dispatch drops cleanly to NVFP4 at 4.5 bits per value. The receiver needs no high-precision copy because the backward pass uses . Combine stayed in 16-bit BF16, making up 16 of the 20.5 round-trip bits per value, or 78% (computed here).
A random Hadamard rotation lets the combine travel in 8 bits. Sending combine outputs directly in MXFP8 hurt accuracy too much, which the authors attribute to outliers. Instead, the recipe rotates each block of 32 consecutive output values before encoding the rotated vector :Here the Hadamard matrix scaled by : entries with , and orthogonal rows is the orthogonal Hadamard matrix with entries (), and a diagonal matrix of independent random signs is a diagonal matrix of random signs . The rotated vector is encoded in block-scaled S2F6an 8-bit fixed-point format: a signed 8-bit integer read as , so 256 evenly spaced values from to ; used here with one scale per 32 values, an 8-bit fixed-point format with one scale per 32 values. Because is orthogonal, it preserves the norm, . Its equal-magnitude entries and random signs spread energy evenly across coordinates:An outlier of magnitude the magnitude of a single outlier among the 32 values adds only to each coordinate, cutting the block's largest value from about to a small multiple of its root mean square.
On a uniform grid with round to nearest, each coordinate's error is at most half the grid step, and the step scales with the block's largest value. Let be the encoded-and-decoded rotated block. Because the inverse rotation is orthogonal, it preserves the error norm:Rounding error therefore falls in proportion to the block's peak. Take 31 values of standard deviation 10 and one of 300. Under power-of-two scales and round to nearest, the rotation lowers the largest value from 300 to about 75 and cuts the error about fourfold (computed here). Rotated blocks have few outliers, so they suit S2F6's uniform grid, matching prior work where integer grids beat floating-point ones on rotated data. Blackwell GPUs convert block-scaled S2F6 in single instructions, and the rotation and encoding fuse into the expert's second GEMM. The receiver decodes and sums incoming vectors, then inverts the rotation once, which is exact by linearity. Combine traffic drops from 16 to 8.25 bits per value, cutting the round trip from 20.5 to 12.75 bits (38% less, computed here) with no measured loss in training accuracy. DeepSeek-V4-style wave scheduling overlaps each wave's GEMMs with the next wave's dispatch and the previous wave's combine. In the post's figure, the smaller combine shortens the tail of combine traffic left over after the final wave.
The remaining choices draw on published NVFP4 recipes. The final sixth of the layers stays in MXFP8, echoing NVIDIA's recommendation of about 15% higher-precision layers on a scaling ladder whose depth grows in multiples of 6. Activations use Four Over Six4/6 (Cook et al., 2025): each NVFP4 block is encoded twice, with its largest value mapped to 6 and to 4, and the version with the smaller error is kept (Cook et al., 2025). Because the FP4 grid has no point between 4 and 6, mapping a block's peak to 6 rounds values between two-thirds of the peak and the peak itself coarsely. Four Over Six also tries mapping the peak to 4 and keeps whichever encoding has smaller error. On , mapping 40 to 6 gives E4M3 scale 6.5 and sends 30 to , a 13% error. Mapping 40 to 4 sends 30 to 3 exactly. Weights skip 4/6. The post gives no reason, though the 4/6 paper's pretraining ablations found activations-only comparable to all-tensors at lower overhead.
Following Composer 2, the NVFP4 outer scales are per expert for weights and per token for activations. A per-tensor activation scale makes each token's encoding depend on other tokens in the batch, while a per-sequence scale lets later tokens alter earlier ones. Per-token scaling avoids both. Deterministic in-house kernels keep the tensor cores fed across arithmetic-heavy steps such as scale computation, re-encoding, and stochastic rounding, for instance by fusing the Hadamard rotation and S2F6 encoding into the second GEMM.
What it bought. On Inkling 2 Small, the recipe ran unchanged through pretraining, supervised fine-tuning, and RL, with no discernible difference in RL reward. If the 2% pretraining compute-efficiency cost and the 8% wall-clock speedup on the largest jobs held on the same run, reaching a fixed loss would take about of MXFP8's time (computed here). Inkling 2 Small was pretrained in 68 hours on GB300 NVL72 racks, a runtime the authors credit to many stack-wide changes alongside the numerics. Inkling 2 Mini (26.4B parameters, 3.4B active), released afterward, followed the same recipe and ships in its training precision. Its release specifies NVFP4 "in the expert layers on all forward passes from pretraining through RL" with the final 4 of 24 layers in MXFP8. The checkpoint's quantization config lists NVFP4 for expert weights in layers 0 to 19, MXFP8 in layers 20 to 23, and BF16 for attention, convolutions, router weights, and embeddings. That release reports strong benchmark scores, with no higher-precision twin to compare against.
Evidence and limits. The recipe rests on one production model family trained end to end, including what the authors call the largest model they know of trained with a native 4-bit forward pass. Internal comparisons backed each design choice. The authors tried and rejected tile scales and an MXFP8 combine for their cost in compute efficiency or accuracy, while the rotated 8-bit combine showed no measurable loss. The building blocks also draw on published recipes with fuller evaluations. NVIDIA trained a 12B model on 10 trillion tokens mostly in NVFP4 (forward and backward), reaching 62.58% on MMLU-Pro against 62.62% in FP8. Even so, the post reports quality only as the 2% pretraining compute-efficiency cost and no discernible difference in RL reward. It gives no loss curves, benchmark tables, ablation numbers, or size for Inkling 2 Small. Nor does it separate how much of the 8% pretraining and 20% RL speedups comes from 4-bit GEMMs, quantized communication, or custom kernels.
Terms
- NVFP4
- E2M1 values, an E4M3 scale per 16, an FP32 outer scale: , 4.5 bits per value
- MXFP8
- 8-bit float values (E4M3 or E5M2) with a power-of-two E8M0 scale per 32: 8.25 bits per value
- Underflow rule
- in NVFP4 a value below about of its block's largest rounds to zero
- Transpose problem
- backward GEMMs need blocks along the other dimension, so each value gets new neighbors and a new scale
- 16 by 16 tiles
- NVIDIA's transpose-proof weight scales; too coarse here, since one outlier sets 256 values' scale
- Stochastic rounding
- round up with probability ;
- Re-quantization
- decode the forward's 4-bit tensor, transpose, re-encode in MXFP8 with stochastic rounding
- RHT + S2F6 combine
- rotate 32 values by , encode in 8-bit fixed point; 16 to 8.25 bits per value
- Four Over Six
- encode each block with its largest value at 6 and at 4, keep the smaller error; activations only
- Outer scales
- per token for activations, per expert for weights: batch-invariant, no leak from later tokens
- Result
- about 2% compute-efficiency cost in pretraining; on the largest jobs 8% faster pretraining, 20% faster RL than full MXFP8
Sources
- Jack Cook and Thinking Machines Lab. End-to-End 4-Bit Training. Thinking Machines Lab: Connectionism (blog post), 2026.
- NVIDIA et al. Pretraining Large Language Models with NVFP4. arXiv preprint, 2025.
- NVIDIA. Introducing NVFP4 for Efficient and Accurate Low-Precision Inference. NVIDIA Technical Blog, 2025.
- Yuxiang Chen, Yifan Liu, Xiaoming Xu, Pengle Zhang, Michael Beyer, Martin Rapp, Jun Zhu, and Jianfei Chen. TetraJet-v2: Accurate NVFP4 Training for Large Language Models with Oscillation Suppression and Outlier Control. ICML, 2026.
- Andrei Panferov, Erik Schultheis, Soroush Tabesh, and Dan Alistarh. Quartet II: Accurate LLM Pre-Training in NVFP4 by Improved Unbiased Gradient Estimation. ICML, 2026.
- Jack Cook, Junxian Guo, Guangxuan Xiao, Yujun Lin, Keith Wyss, Mahdi Nazemi, Asit Mishra, Carlo del Mundo, Tijmen Blankevoort, and Song Han. Four Over Six: More Accurate NVFP4 Quantization with Adaptive Block Scaling. arXiv preprint, 2025.
- DeepSeek-AI. DeepSeek-V3 Technical Report. arXiv preprint, 2024.
- DeepSeek-AI. DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence. arXiv preprint, 2026.
- Cursor Research. Composer 2 Technical Report. arXiv preprint, 2026.
- Thinking Machines Lab. Inkling 2 Mini. Thinking Machines Lab news post, 2026.
- Thinking Machines Lab. Inkling 2 Mini model card. Thinking Machines Lab model card, 2026.
Connected notes
- Softmax attention as a sum of RNNsEfficient sequence models · Fixed scales for stable training
Dividing the numerator of softmax attention by its L2 norm, which fixes the output's length, follows the softmax loss curve, while dividing by the sequence length behind a gate, with scores clamped at 5 and gradients clipped, still gives loss spikes.
- PPO and RLOO for language modelsReinforcement learning for reasoning · Trust regions around the sampling policy
With two gradient steps per batch the PPO loss is clipped on fewer than 5% of tokens, and turning clipping off, then dropping the ratio as well, does not hurt, since the policy has little room to move far from the one that sampled the data.
- Maximal update parametrizationLazy training and feature learning · Fixed scales for stable training
In wide transformers trained with Adam, correlated queries and keys make attention logits grow like by the LLN rather than , so P rescales logits by and hidden learning rates by to keep scales bounded with width.
- Asynchronous RL at scaleRunning RL at scale · Trust regions around the sampling policy
Each token's clipped ratio corrects its probability given its prefix and ignores the change in the distribution of the prefix, so it is accurate only while the two policies are close, and Laminar relies on keeping each trajectory's staleness small, typically below 3 steps, instead of correcting it further.