End-to-End 4‑bit Training

FP4 has only 8 sizes of number, from 0 to 6. A shared scale per block of 16 or 32 values stretches that grid over real data. Inkling 2 trained and ships its expert weights this way, so nothing changes between training and use.

Learn the FP4 grid, the two block formats (MXFP4 and NVFP4), how a 4-bit forward pass and an 8-bit backward pass fit together, and why a model trained in its shipping precision loses nothing at shipping time.

Drag any bar up or down, or drag the outlier slider. Switch between MXFP4 and NVFP4 and watch the grid, the scale and the error. Then we build, piece by piece, the number line, the block scale, the training recipe and the shipped model.

You need a rough idea of a neural network layer (a matrix multiply) and a little Python. We build the rest from zero.

Based on Thinking Machines’ post End-to-End 4-Bit Training (Jack Cook and Thinking Machines Lab, November 2026), the Inkling 2 Mini and Inkling 2 Small releases and model cards, NVIDIA’s Pretraining Large Language Models with NVFP4, and the OCP Microscaling Formats (MX) specification v1.0.

Quantize one block to 4 bits

3.0

The 32 values are illustrative, drawn once from a bell curve. The rules are real: the FP4 grid ±{0, 0.5, 1, 1.5, 2, 3, 4, 6}; MXFP4 with one power-of-two scale for 32 values (OCP MX spec, Table 1); NVFP4 with one E4M3 scale per 16 values and an FP32 tensor scale (Thinking Machines; NVIDIA). The MX spec leaves the scale rule open, so this page rounds the MX scale up to the next power of two and nothing clips.

Chapter 0

Fewer Bits, Faster Math, More Error

Weigh what 4 bits buy against what they cost, for one real model

You want to store the number 3.2. Your format can hold 3 and 4, and nothing between. You round to 3. The stored value is off by 0.2. That gap is the quantization error: the stored value minus the true value.

One error is small. Training rounds billions of numbers, at every layer, at every step. The errors add up and can steer learning wrong. So why would anyone train with fewer bits? Because the hardware pays well for it.

Pick a format, see the bill

Each format stores numbers with a different number of bits. Pick one and read three bars: bits per value, speed on a GB300, and the memory for Inkling 2 Mini’s 26.4B weights.

Bits per value and GB300 PFLOPS are from Thinking Machines’ numerical formats table. The memory bar is our arithmetic: 26.4B parameters (Inkling 2 Mini model card) times bits per value. The shipped model is about 20 GB because it mixes NVFP4 and MXFP8.

How much memory do the weights take? Count the parameters and call that N. Call the bits each value costs b, scales included.

Say it aloud

M equals N times b, divided by eight.

M
M the memory for the weights, in bytes.
N
N the number of weights. Inkling 2 Mini has 26.4 billion.
b
b the bits each value costs, with its share of the scales: 16 for BF16, 8.25 for MXFP8, 4.5 for NVFP4.
In plain words

Multiply the count of weights N by the bits per weight b. Divide by 8 to turn bits into bytes. That is M.

With numbers

N = 26.4 billion. In BF16, M = 26.4 × 16 ⁄ 8 = 52.8 GB. In NVFP4, M = 26.4 × 4.5 ⁄ 8 = 14.85 GB. The 4-bit copy fits on a laptop; the 16-bit copy does not.

Speed matters most where volume is high. Pretraining runs on trillions of tokens. Reinforcement learning (RL) samples tens of thousands of tokens in each rollout, and every sampled token reads all the weights from memory. Fewer bits mean fewer bytes to read.

The failure

Symptom: Thinking Machines tried full NVFP4 training first, with both passes in 4 bits. The loss suffered far more than they would accept. Measure: they track compute efficiency (CE), how much extra compute a change costs to reach the same loss. Fix: spend 4 bits only where error hurts least. The rest of this lesson is that placement.

The road

  1. The FP4 number line: the 8 magnitudes of E2M1 and why the gaps grow.
  2. The block scale: one shared number that stretches the grid over real data.
  3. MX against NVFP4: blocks of 32 with power-of-two scales, or blocks of 16 with finer scales.
  4. The 4-bit forward pass: which tensors go to NVFP4, and why the experts.
  5. The transpose problem: why the backward pass cannot reuse the forward blocks.
  6. Stochastic rounding: how an 8-bit backward pass keeps gradients unbiased.
  7. The last layers stay MXFP8: the layers that cannot live in 4 bits.
  8. Moving tokens: dispatch in NVFP4, combine in 8 bits after a Hadamard spin.
  9. Train in the shipping precision: no quantization step, so no quantization loss.
  10. The field guide: the numbers, the terms and the code.
Why did Thinking Machines not put both the forward and the backward pass in NVFP4?

Chapter 1

The FP4 Number Line

Read the 16 codes of E2M1 and see where its 8 magnitudes sit

Four bits give 16 codes. FP4 E2M1 spends them like a tiny float: 1 sign bit, 2 exponent bits and 1 mantissa bit. The 16 codes give 8 magnitudes, each with a plus and a minus sign: 0, 0.5, 1, 1.5, 2, 3, 4 and 6. Zero appears twice, as +0 and −0.

Round a number to FP4

The orange ticks are every value FP4 can hold. Drag the value and watch where it lands. Turn on the gaps to see the spacing double.

3.20

The values and bit layout follow the OCP MX specification, Table 5 (FP4 E2M1: exponent bias 1, max normal 6.0, min subnormal 0.5). Rounding is to the nearest value, ties to the even code. Values past 6 saturate to 6.

How do 3 bits of magnitude turn into those 8 numbers? Name the fields. Call the sign bit S, the 2-bit exponent field E, and the mantissa bit M.

Say it aloud

v equals minus one to the S, times two to the E minus one, times one plus M over two.

v
v the value the code stands for.
S
S the sign bit: 0 for plus, 1 for minus.
E
E the exponent field, 1 to 3 for these normal numbers. The bias is 1, so the power is E minus 1.
M
M the mantissa bit, 0 or 1. It adds half a step.
In plain words

The exponent E picks a power of two. The mantissa M picks the low end or the middle of that octave. The sign S flips it. When E is 0 the rule changes: the value is M times 0.5, which gives 0 and 0.5.

With numbers

S = 0, E = 3, M = 1: v = 22 × 1.5 = 6, the largest value. S = 0, E = 2, M = 0: v = 21 × 1 = 2. Each step of E doubles the value.

Look at the gaps. From 0 to 2 the step is 0.5. From 2 to 4 it is 1. From 4 to 6 it is 2. A float keeps relative error even, so big values get coarse steps. A value of 5 must round to 4 or 6: an error of 1, which is 20%.

The failure

Symptom: a weight of 40 has no FP4 code; it saturates to 6. A weight of 0.2 rounds to 0. Measure: count the values that clip and the values that flush to zero. Fix: do not feed raw numbers to FP4. Divide them by a scale first, so the largest one lands near 6. That is the next chapter.

The value 2.6 is quantized to FP4 with round to nearest. What is stored, and what is the error?

Chapter 2

The Block Scale

Stretch the FP4 grid over a block of real values with one shared number

Real activations run from tiny to large. The fix is block scaling: cut the tensor into blocks of consecutive values, and store one scale per block. Each value becomes an FP4 code times its block’s scale.

Which scale? Pick it so the block’s largest magnitude lands on 6, the top of the grid. Call the largest absolute value in the block amax.

Say it aloud

s equals amax divided by six.

s
s the block scale, one number shared by the whole block.
amax
a-max the largest absolute value in the block.
6
six the largest FP4 magnitude.
In plain words

Find the biggest value in the block, amax. Divide it by 6. That is s. Then divide every value by s, round it to the FP4 grid, and multiply back by s.

With numbers

From the Thinking Machines post: a block whose largest value is −54 gets s = 54 ⁄ 6 = 9. The value −54 becomes code −6 with scale 9. A value of 5.4 gives 5.4 ⁄ 9 = 0.6, which rounds to 0.5, so it comes back as 4.5.

Set the scale by hand

Blue bars are 16 true values. Orange dots are what FP4 stores. Make the scale too small and big values clip; too big and small values flush to zero. Press amax / 6 for the rule.

0.45

The 16 values are illustrative. The scale here is exact (not rounded to a scale format); Chapter 3 shows what the scale format does to it.

The block is the trade. A small block fits its scale tightly, so small values survive. But every block costs one more scale to store. A block of 16 FP4 values plus one 8-bit scale costs (4 × 16 + 8) ⁄ 16 = 4.5 bits per value.

The failure

Symptom: one outlier in a block, say a value 20 times the others. Measure: count the zeros after quantization. The outlier sets amax, so the scale grows and the small values round to 0. Fix: smaller blocks, so one outlier spoils fewer neighbours. Go back to the hero, push the outlier, and switch to NVFP4.

A block has the values 12, 3 and 0.4. With s = amax / 6, what is stored for 0.4?

Chapter 3

MX Formats Against NVFP4

Compare blocks of 32 with power-of-two scales and blocks of 16 with finer scales

The scale needs a format of its own. That choice splits the two families on Blackwell GPUs.

FormatElementBlockBlock scaleOuter scale
MXFP4FP4 E2M132E8M0none in the spec
MXFP8FP8 E4M3 or E5M232E8M0none in the spec
NVFP4FP4 E2M116FP8 E4M3FP32, per tensor

E8M0 has 8 exponent bits and no mantissa and no sign. It can only hold powers of two, from 2−127 to 2127. E4M3 has a sign bit, 4 exponent bits and 3 mantissa bits. Its largest value is 448. So E8M0 has huge range and coarse steps; E4M3 has fine steps and a narrow range.

Fit one block with each scale

Each row is the FP4 grid stretched by a scale. The pink line is the block’s largest value. Slide it and see how much of the grid each scale wastes.

5.40

E8M0 and E4M3 limits are from the OCP MX spec (Tables 2 and 7). The power-of-two scale here is rounded up so the block never clips; the spec leaves the rule open. The 593.7 preset is the Thinking Machines example (stored as 96 × 6 = 576). Block values here are illustrative.

A power-of-two scale can miss by up to a factor of 2, so the block max lands between 3 and 6 and the top of the grid goes unused. An E4M3 scale lands it close to 6. On LLM data, Thinking Machines found NVFP4 gives less quantization error than MXFP4.

The cost is range. E4M3 tops out at 448, so FP4 times E4M3 covers magnitudes from 2−10 to 6 × 448 = 2688. A second scale, in FP32, slides that window for a whole tensor.

Say it aloud

x-i equals x-i FP4, times x FP8 of block i floor-divided by sixteen, times x FP32.

xi
x-i the value at position i, rebuilt from storage.
xiFP4
x-i FP4 its 4-bit code, one of ±{0, 0.5, 1, 1.5, 2, 3, 4, 6}.
xi//16FP8
x FP8 of i floor-divided by 16 the E4M3 scale of its block. Positions 0 to 15 share scale 0, 16 to 31 share scale 1.
xFP32
x FP32 the outer scale for the whole tensor (or, in Inkling’s recipe, per expert or per token).
In plain words

Take the 4-bit code of value i. Multiply by the 8-bit scale of its block of 16. Multiply by the one 32-bit scale. The product is the value the matrix multiply uses.

With numbers

From the Thinking Machines post: 593.7 becomes code 6 with block scale 96, so x = 6 × 96 × 1 = 576, an error of −17.7. Setting xFP32 to 2 moves the covered range from [2−10, 2688] to [2−9, 5376].

Bits per value: NVFP4 (4 × 16 + 8) ⁄ 16 = 4.5; MXFP4 (4 × 32 + 8) ⁄ 32 = 4.25; MXFP8 (8 × 32 + 8) ⁄ 32 = 8.25. NVFP4 pays a quarter bit more for a tighter fit.

The failure

Symptom: a block max of 5.4 with a power-of-two scale. Measure: 5.4 ⁄ 6 = 0.9, which rounds up to a scale of 1, so the max lands at 5.4 on the grid and 6 is never used. At 3.1 the scale is 1 too, and the codes 4 and 6 sit empty. Fix: a scale with mantissa bits, like E4M3.

Why does an E8M0 block scale often leave part of the FP4 grid unused?

Chapter 4

The 4-bit Forward Pass

Follow one expert layer through an NVFP4 matrix multiply and see why the experts get the 4 bits

A Mixture of Experts (MoE) layer holds many small feed-forward networks, the experts. A router sends each token to a few of them (the MoE lesson builds this). In Inkling 2 Small each token goes to 8 of 384 experts. The expert matrix multiplies are most of the compute, and in Thinking Machines’ tests they lose the least accuracy when quantized. So the experts get the 4 bits.

One expert matrix multiply, a GEMM, takes the routed tokens x: tokens × d_in and the weights w: d_out × d_in.

Say it aloud

y equals x-q times w-q transposed.

y
y the output, tokens × d_out, kept in BF16.
xq
x-q the input activations quantized to NVFP4, with 1×16 blocks along each row and one FP32 scale per token.
wqT
w-q transposed the expert’s weights in NVFP4, with 1×16 blocks and one FP32 scale per expert.
In plain words

For each output, take 16 values from a row of x-q and 16 from a column of w-q transposed. Multiply the pairs and add them. Multiply that sum by both blocks’ scales. Repeat for every block along the row and add.

With numbers

With made-up sizes: 4,096 tokens, d_in = 1,024, d_out = 2,048. The GEMM runs 4,096 × 2,048 × 1,024 multiply-adds, and each output adds 1,024 ⁄ 16 = 64 scaled block sums.

Step through one quantized layer

Orange is NVFP4, teal is MXFP8, blue is BF16. Press Step to move the highlight. The forward row comes first, then the backward row.

The flow follows Figure 4 of the Thinking Machines post (NVFP4 forward, MXFP8 backward, stochastic rounding on re-quantized saved tensors). The tensor sizes are made up; Inkling’s hidden sizes are not disclosed.

The backward pass needs two more GEMMs. The data gradient (dgrad) is dx = g wq; it carries the error signal to the layer below. The weight gradient (wgrad) is dw = gT xq; it updates the weights. Here g is the gradient arriving from above. Both use the quantized forward tensors, so the gradients match the network that ran in the forward pass.

The backward pass is sensitive to bias: values that round the same way every time. Random errors average out over a batch. A bias does not; it builds up across layers and steps. So the backward pass stays in MXFP8, as Chapters 5 and 6 explain.

The failure

Symptom: with NVFP4 GEMMs the MoE forward pass should be about 3 times faster than in MXFP8, but it was not. Measure: a timeline showed GPUs waiting on network transfers. Fix: quantize the transfers too (Chapter 8).

Why do the backward GEMMs use the quantized forward tensors x-q and w-q, not the original BF16 ones?

Chapter 5

The Transpose Problem

See why the backward pass cannot reuse the forward pass’s blocks

In the forward GEMM, each block of 16 runs along a row of xq. The backward GEMMs multiply the transposed tensors. Now the 16 values that share a scale run down a column. Each value sits with 15 different neighbours, so it gets a different scale and a different code.

Group one tile three ways

A 16×16 tile of values. Pick how the scales group the values, and pick the data. Red cells round to zero.

The two data shapes mirror Figures 2 and 3 of the Thinking Machines post; the values here are our own illustrative draw, so the counts differ from theirs. Exact scales, FP4 round to nearest.

So the forward pass and the backward pass see different numbers for the same weight. The gradient then belongs to a slightly different network. That mismatch can make the gradient wrong.

Two ways out

ApproachHowCost
16×16 tiles (NVIDIA)One scale per 16×16 square of weights, so the transpose has the same scalesOne outlier among 256 values sets the scale; many values underflow. Thinking Machines found it too coarse.
Re-quantize (Thinking Machines)Keep 1×16 blocks. Dequantize, transpose in high precision, quantize again with stochastic roundingExtra arithmetic work, which their kernel hides

Re-quantizing does not give bit-identical tensors. It does not need to. The backward pass needs the tensors to be equal on average: E[wq] = E[(wqT)T]. Here E[·] is the average over many roundings. Equal on average means no bias. Chapter 6 shows how a rounding rule gives that.

Thinking Machines then picked the precision for the second quantization: MXFP8. Saved activations and weights are re-quantized to MXFP8, and both backward GEMMs run in MXFP8. That was their best trade between accuracy and speed.

The failure

Symptom: in the “row of large values” tile, column blocks wipe out most small values. Measure: count the survivors with 1×16 and 16×1 grouping. Fix: never reuse a row-blocked tensor as a column-blocked one; rebuild the blocks after the transpose.

Why did Thinking Machines reject NVIDIA’s 16×16 weight tiles?

Chapter 6

Stochastic Rounding

Round up or down at random so that the average is exact

Round to nearest (RTN) always picks the closer grid value. The same input always rounds the same way. Across a million roundings that is a bias. Stochastic rounding (SR) rounds up or down at random, with odds set by the distance to each neighbour.

Name the parts. Call the value to round x, the grid value below it lo, and the grid value above it hi.

Say it aloud

P of up equals x minus lo, divided by hi minus lo.

P(up)
P of up the chance of rounding up to hi.
x
x the value to round, already divided by its block scale.
lo
lo the nearest grid value below x.
hi
hi the nearest grid value above x.
hi − lo
hi minus lo the size of the gap x sits in.
In plain words

Measure how far x has climbed from lo toward hi, as a share of the gap. Round up with that chance; otherwise round down. The average of many roundings is x.

With numbers

From the Thinking Machines post: a forward value of 4.5 lands in a new block with scale 2, so x = 2.25, lo = 2, hi = 3. P(up) = 0.25. The average is 2 × (0.75 × 2 + 0.25 × 3) = 4.5. RTN would give 2 × 2 = 4 every time.

Round the same value 2,000 times

Left: where each rounding lands. Right: the running average of everything rounded so far. Press Round and compare the two rules against the true value.

2.25

The value 2.25 between the FP4 values 2 and 3 is the post’s example. The random draws are real, from your browser. Blackwell GPUs do stochastic rounding in hardware.

SR trades bias for noise. Each SR result is further from x than RTN’s, on average. But the weight gradient sums over thousands of tokens, and noise averages out in a sum. Bias does not. That is why SR goes into the backward pass, not the forward pass.

Thinking Machines borrowed the re-quantize idea from two earlier recipes, TetraJet-v2 and Quartet II. Applying SR to dequantized values lets them pick any target precision; they chose MXFP8.

The failure

Symptom: slow drift in training that no single step explains. Measure: average the re-quantized tensor over many draws and compare it with the forward tensor; a gap is bias. Fix: stochastic rounding on every re-quantization in the backward pass.

With stochastic rounding, x = 2.75 between 2 and 3. How often does it round up?

Chapter 7

Why the Last Layers Stay MXFP8

Protect the few layers that cannot live in 4 bits, and size the share

NVIDIA trained a 12B model on 10 trillion tokens in NVFP4. With every linear layer in FP4, training diverged. The cause was the final few layers. NVIDIA’s words: they “require more dynamic range and mantissa than FP4 provides.” Keeping the last four blocks in BF16 was enough for the loss to converge.

Why the end of the network? NVIDIA observed that the last layers have larger quantization errors in their weight gradients. Keeping the first few blocks in high precision did not help unless the last blocks were kept too. Their advice: leave a small share of the final layers, under 15%, in BF16 or MXFP8.

Protect the end of the stack

A 24-layer stack, like Inkling 2 Mini. Each bar is a layer’s gradient error in FP4 (illustrative shape). Slide how many final layers run in MXFP8.

4

The rising error shape is illustrative, drawn to match NVIDIA’s observation that the last layers have larger weight-gradient errors. Facts: 24 layers, last 4 in MXFP8 (Inkling 2 Mini); “fewer than 15%” (NVIDIA, arXiv 2509.25149); “the last 16.6% of layers” (Thinking Machines).

Thinking Machines keeps the last 16.6% of layers in higher precision. Their scaling ladder grows the layer count in steps of 6, so one sixth fits every rung. Inkling 2 Mini has 24 layers: 24 ⁄ 6 = 4 layers in MXFP8 and 20 in NVFP4. They chose MXFP8 for these layers, not BF16, which keeps them fast.

The rest of the recipe

ChoiceWhat it does
Per-expert outer scaleEach expert’s weights get their own FP32 scale.
Per-token outer scaleEach token’s activations get their own FP32 scale. One token never changes another’s numbers, so results do not depend on the batch, and nothing leaks across positions.
Four Over Six (4/6)For activations, try two scales: block max to 6, or block max to 4. Keep the one with lower squared error. Not used on weights.
Same numerics throughoutOne recipe from the first pretraining step to the last RL rollout.

Why would mapping the max to 4 help? The grid gap from 4 to 6 is 2, the widest one. Scaled so the max sits at 4, the top values use the steps 2, 3, 4, which are finer relative to the max.

The failure

Symptom: loss that converges for a while and then blows up with an all-FP4 model. Measure: compare quantization error per layer; NVIDIA suggests such metrics could pick which layers to protect. Fix: keep the final sixth or so in 8 bits.

Inkling 2 Mini has 24 layers. With the last one sixth in MXFP8, how many layers run in NVFP4?

Chapter 8

Moving Tokens Between GPUs

Quantize the network traffic once the math gets fast, and smooth outliers with a Hadamard spin

A large MoE layer spreads its experts over many GPUs. This is expert parallelism. The router dispatches each token to the GPUs that hold its experts. Those GPUs send the expert outputs back, where they are combined. Faster GEMMs leave the GPUs waiting for the network.

How much math must each byte bring with it? Call the GPU’s speed F and the link bandwidth B.

Say it aloud

r equals F divided by B.

r
r the operations the GPU can do while one byte arrives.
F
F the GEMM speed: up to 15 PFLOPS for NVFP4 on a GB300.
B
B the NVLink bandwidth on a GB300 NVL72: 900 GB/s each way.
In plain words

Divide the operations per second F by the bytes per second B. If a byte brings less work than r, the Tensor Cores sit idle waiting for data.

With numbers

r = 15 × 1015 ⁄ 900 × 109 ≈ 16,700 operations per byte. Thinking Machines rounds this to “as many as 16,000”. Every bit removed from the traffic matters.

Dispatch was easy: send the tokens in NVFP4, which the GEMM wants anyway. Combine was harder. Expert outputs must stay in high precision (BF16 by default) or the model suffers. Plain MXFP8 hurt, because it handles outliers poorly.

Spin out the outliers

32 expert outputs, two of them outliers. Turn on the Hadamard transform and watch the energy spread out, the scale shrink and the 8-bit error fall.

20

The vector is illustrative. The transform is a real 32-point Hadamard matrix with random signs, scaled to keep length. The 8-bit format is S2F6 as the post defines it (values from −128/64 to 127/64 in steps of 1/64) with one power-of-two scale per 32 values.

The random Hadamard transform (RHT) is a rotation. It mixes every value into every output, so one big value spreads thin across all 32. The total energy stays the same, and the rotation can be undone exactly. After it, a smaller scale fits the block, and the grid steps shrink.

Thinking Machines quantizes the rotated outputs to S2F6, an 8-bit fixed-point format with 2 signed integer bits and 6 fraction bits. One scale covers 32 values. The receiving GPU dequantizes, adds, and undoes the rotation. Combine traffic drops from 16 to 8.25 bits per value, with no measurable accuracy loss.

The failure

Symptom: MXFP8 combine hurt the model. Measure: look at the blocks with outliers; one value sets a large scale and the others lose resolution. Fix: rotate first, then quantize to an evenly spaced format.

Why does a random Hadamard transform help 8-bit quantization of the combine traffic?

Chapter 9

Train in the Precision You Ship

Remove the quantization step, and with it the quantization loss

The usual path trains in BF16, then squeezes the finished weights to 4 bits for shipping. That squeeze is post-training quantization (PTQ). Every weight moves a little, and the model never saw those new numbers. Some accuracy is lost, and teams spend time on calibration to pick good scales.

End-to-end 4-bit training removes the step. Every forward pass, from the first pretraining token to the last RL rollout, used the NVFP4 weights. The checkpoint stores those same numbers. There is nothing to convert.

Ship one weight row two ways

Top row: the weights the forward pass used in training. Bottom row: the weights you ship. The yellow bars are the change at shipping time.

The 16 weights are illustrative; the shipping change is computed with the NVFP4 rules from Chapter 3. Sizes: Inkling 2 Mini about 20 GB (model card); BF16 and all-NVFP4 bars use M = N × b ⁄ 8 with N = 26.4B.

The two Inkling 2 models

FactInkling 2 MiniInkling 2 Small
Size26.4B total, 3.4B active, 24 layers594B total, 17B active, 48 layers
Training numericsNVFP4 expert forward passes from pretraining through RL; last 4 layers MXFP8Pretrained, midtrained and post-trained in NVFP4
Shipped weights20 layers NVFP4, 4 MXFP8, about 20 GBNVFP4 checkpoint (at least 500 GB of VRAM); MXFP8 option (at least 800 GB)
Conversion loss“no conversion loss from quantization”MXFP8 gains 1 to 2 points on evals, which TML calls not meaningful
KV cachenot disclosedAn NVFP4 KV cache variant, which “minimally” lowers evals

Inkling 2 Small’s first pretraining phase covered 8.4 trillion tokens in 68 hours on GB300 NVL72 racks, natively in NVFP4. The KV cache holds each past token’s attention keys and values. In long agent runs it can outgrow the weights, so a 4-bit cache cuts serving cost.

What it cost, what it bought

In pretraining Inkling 2 Small, the recipe cost about 2% in compute efficiency: the MXFP8 run would reach the same loss with about 2% fewer FLOPs. In exchange, wall-clock time fell 8% in pretraining and 20% in RL, against full MXFP8. In RL they saw no difference in reward.

The failure

Symptom: a PTQ checkpoint scores a few points below the BF16 model it came from. Measure: evaluate both on the same suite. Fix: train in the shipping format, so the evaluated model and the shipped model are the same object.

Why does Inkling 2 Mini have no post-training quantization loss?

Chapter 10

The Field Guide

Keep the numbers, the terms, a checklist and the core code on one page

FP4 has 8 magnitudes, so it needs a scale per block. MX formats share a power-of-two scale over 32 values; NVFP4 shares an E4M3 scale over 16 and adds an FP32 outer scale. Inkling 2 runs its expert forward GEMMs in NVFP4, its backward GEMMs in MXFP8 with stochastic rounding, and its last sixth of layers in MXFP8. It ships in those numerics, so it has no quantization step.

The numbers that matter

WhatNumberSource
FP4 E2M1 magnitudes0, 0.5, 1, 1.5, 2, 3, 4, 6OCP MX spec, Table 5
Block sizesMX: 32; NVFP4: 16OCP MX spec, Table 1; Thinking Machines
Scale formatsMX: E8M0; NVFP4: E4M3 + FP32OCP MX spec; NVIDIA; Thinking Machines
Bits per valueNVFP4 4.5; MXFP4 4.25; MXFP8 8.25; BF16 16(d × k + 8) ⁄ k
GB300 speedNVFP4 15, MXFP8 5, BF16 2.5 PFLOPSThinking Machines
NVFP4 range, one block2−10 to 2688Thinking Machines
Higher-precision shareTML 16.6% (MXFP8); NVIDIA under 15%Thinking Machines; arXiv 2509.25149
Combine traffic16 to 8.25 bits per valueThinking Machines
Cost and gain2% CE; 8% faster pretraining, 20% faster RLThinking Machines
Inkling 2 Mini20 NVFP4 + 4 MXFP8 layers, about 20 GBInkling 2 Mini post and model card
Inkling 2 Small8.4T tokens in 68 hours, NVFP4; NVFP4 KV cache variantInkling 2 Small post

The terms, in one line each

TermMeaning
E2M1The FP4 element: 1 sign, 2 exponent and 1 mantissa bit.
Block scaleOne number shared by a block of 16 or 32 values.
E8M0An 8-bit scale that holds only powers of two.
E4M3An 8-bit float with 3 mantissa bits, largest value 448.
Outer scaleAn FP32 scale over a tensor, an expert or a token.
dgrad, wgradThe backward GEMMs for the input gradient and the weight gradient.
Stochastic roundingRound up or down at random so the average is exact.
RHTA random Hadamard rotation that spreads outliers.
PTQQuantizing a model after training.
Compute efficiencyThe extra compute a change costs to reach the same loss.

The checklist

  1. Put 4 bits where the compute is and the harm is least: the expert forward GEMMs.
  2. Use small blocks (1×16) with fine scales (E4M3) and an outer FP32 scale per expert or token.
  3. After a transpose, rebuild the blocks: dequantize, transpose, re-quantize.
  4. Re-quantize with stochastic rounding, so the backward pass has no bias.
  5. Keep the final sixth of layers in MXFP8.
  6. Quantize the network traffic once the GEMMs outrun the links; rotate before 8-bit combine.
  7. Keep one recipe from pretraining to the last RL rollout, and ship it.

The core as code

pythonimport numpy as np
FP4 = np.array([0, .5, 1, 1.5, 2, 3, 4, 6])

def e4m3(v):                                  # round a positive scale to FP8 E4M3
    v = np.clip(v, 2.0**-9, 448.0)
    step = 2.0 ** (np.maximum(np.floor(np.log2(v)), -6) - 3)
    return np.round(v / step) * step

def to_fp4(y, stochastic=False, rng=np.random):  # y already divided by its scale
    a = np.minimum(np.abs(y), 6)
    hi = np.searchsorted(FP4, a).clip(1, 7); lo = hi - 1
    p_up = (a - FP4[lo]) / (FP4[hi] - FP4[lo])        # P(up) from Chapter 6
    up = rng.random(a.shape) < p_up if stochastic else p_up > .5
    return np.sign(y) * np.where(up, FP4[hi], FP4[lo])

def nvfp4(x):                                  # x: (rows, cols), cols divisible by 16
    t = 6 * 448 / np.abs(x).max()                  # FP32 outer scale (encode)
    b = x.reshape(x.shape[0], -1, 16)                 # 1x16 blocks along each row
    s = e4m3(np.abs(b).max(-1, keepdims=True) / 6 * t) / t  # E4M3 block scale
    return (to_fp4(b / s) * s).reshape(x.shape)          # dequantized view

def mxfp4(x):                                  # 32-value blocks, power-of-two scale
    b = x.reshape(x.shape[0], -1, 32)
    s = 2.0 ** np.ceil(np.log2(np.abs(b).max(-1, keepdims=True) / 6))
    return (to_fp4(b / s) * s).reshape(x.shape)

x = np.random.randn(4, 64); x[0, 5] = 14               # one outlier
for f in (mxfp4, nvfp4):
    print(f.__name__, "RMS error", np.sqrt(((f(x) - x) ** 2).mean()))

The round-to-nearest branch breaks exact ties downward; hardware breaks them to the even code. That detail rarely moves the error.

Keep going

The takeaway. Four bits work when a fine scale sits on every 16 values, the backward pass gets 8 bits with unbiased rounding, and the last layers keep 8 bits. Train that way from the first step, and the model you test is the model you ship.
Which part of Inkling 2’s training runs in NVFP4?

Now press Present or Teach and explain from memory: the FP4 grid, the two block formats, the forward and backward precisions, and why shipping in the training precision removes a loss. Then go back to the hero, push the outlier to 16, and say why NVFP4 keeps half the block safe.

Sources

Jack Cook and Thinking Machines Lab, End-to-End 4-Bit Training, Connectionism, November 2026. Inkling 2 Mini (November 20, 2026) and its model card. Inkling 2 Small (November 5, 2026) and its model card. NVIDIA, Pretraining Large Language Models with NVFP4 (2025). Rouhani et al., OCP Microscaling Formats (MX) Specification v1.0 (2023). Cook et al., Four Over Six (2025). The explanations, toy values and devices are our own.

End-to-End 4-bit Training (NVFP4 and MXFP8)
The Thinking Machines post · NVIDIA NVFP4 paper · OCP MX spec · Back to Gleams