Inkling 2 Small

594 billion weights, and 17 billion of them work on each token. Thinking Machines trained it in four pretraining stages and one joint RL run, with a 4-bit forward pass from start to end.

Learn how a sparse model sees images and trains in 4-bit numbers. Then follow its context as it grows, and its 17 million agent rollouts in one run.

Press each stage of the training timeline. Then switch the scale to log and find the two stages that were too small to see. Then we build each stage, piece by piece.

You need a rough idea of a transformer (layers that turn tokens into next-token guesses) and a little Python. We build the rest from zero.

Based on the Thinking Machines release post Inkling 2 Small (5 November 2026), its model card, and the blog post End-to-end 4-bit training. The explanations and devices are our own.

Walk the training timeline

Token counts and context lengths are from the release post. The post does not give the context length of H1 or H4, so those cells show a question mark. RL tokens are tokens the model generated and read in rollouts, so they are not the same kind of token as pretraining data.

Chapter 0

A Big Model That Runs Like a Small One

Count the cost of one agent task, and see why a sparse model pays for 17 billion weights, not 594 billion

You ask an agent to fix a bug. It reads files, runs tests, and writes about 43,000 tokens before it stops. That is the median length of one Inkling 2 Small training rollout. Every one of those tokens passes through the model once.

A dense model uses every weight for every token. A Mixture-of-Experts (MoE) model splits most of its weights into many small networks called experts. A router wakes only a few of them per token. Inkling 2 Small holds 594 billion weights. Only 17 billion, the active parameters, work on each token.

How much does that save? A rule of thumb gives the cost of one token through a model.

Say it aloud

C equals two times N-active.

C
C the compute for one token in a forward pass, in FLOPs (one multiply or one add).
Nactive
N-active the number of weights that touch the token. 17 billion here.
2
two each weight does one multiply and one add.
In plain words

Count the weights that touch the token. Double the count. That is the work for one token. Attention adds more on long inputs, so C is a floor.

With numbers

Sparse: C = 2 × 17 billion = 34 billion FLOPs per token. Dense at 594 billion: 1.19 trillion. The sparse model does about 35 times less work per token.

Price one agent task

Grey is a dense model of the same size. Teal is Inkling 2 Small. Drag the task length from a short chat to the longest rollouts.

43K

The 594B and 17B sizes, the 43K median and the 1.5M p99 rollout lengths are from the release post. The FLOP count uses the 2N rule and leaves out attention.

The saving is not free. All 594 billion weights must sit in GPU memory, because any token may call any expert. The first Inkling made the same bet at 975 billion total and 41 billion active.

The failure: a sparse model that serves like a dense one

The symptom is a GPU that waits while another GPU works through a queue. Measure the tokens each expert receives per batch. If a few experts get most tokens, their GPUs set the pace. The fix is balance: the router must spread tokens, and the system copies hot experts to more GPUs (Chapter 8).

The road

  1. The sparse body: 48 layers, 8 of 384 experts per token, and the memory bill.
  2. Seeing: a 292M Perception Encoder, 20 by 20 patches, 2 by 2 pooling.
  3. 4-bit numbers: NVFP4, its block scales, and what stays in 8-bit.
  4. Four pretraining stages: H1 to H4, from 8.4T tokens to 34B.
  5. One async RL run: 1,075 steps, 17M rollouts, staleness 17.
  6. The task mix and rewards: what the RL run trained on, and how it graded.
  7. Alignment in training: the conduct spec and self-distillation.
  8. The systems: EPLB, sticky routing, KV offload, a 4-bit KV cache.
  9. Results and family: benchmarks, limits, Inkling 2 Mini and the first Inkling.
  10. The field guide: numbers, code, links.
Why does Inkling 2 Small cost about 35 times less compute per token than a dense model with 594 billion weights?

Chapter 1

The Sparse Body: 8 of 384 Experts

Follow one token through a layer, watch the router pick its experts, and pay the memory bill

A token enters a layer as a vector of numbers. Attention mixes in what the other tokens say. Then the token reaches the feed-forward block, the part of the layer that holds most weights. In Inkling 2 Small that block is 384 experts.

The router is a small linear layer. It gives each expert a score for this token, keeps the top 8, and sums their outputs with weights from the scores. The model card gives the shape: 48 decoder layers and 8 of 384 experts per token. Attention mixes local and global layers, over up to 1M tokens.

The data flow for a batch of T tokens in one layer:

  1. Hidden states, shape T × d_model, go to the router.
  2. The router makes scores, shape T × 384, and keeps 8 per row.
  3. Each expert gets the rows that chose it, about T × 8 / 384 on average.
  4. The outputs come back and the weighted sum gives T × d_model again.

The card does not give d_model or the expert width.

Route tokens to experts

Each cell is one expert. Teal cells are the 8 the last token woke. Yellow heat counts picks. Route a batch, then turn on the skewed router.

The counts 384 and 8 are from the model card. The router scores here are random numbers, so the picks are illustrative.

The memory bill

Compute follows the 17B. Memory follows the 594B. How many bytes do the weights need in 4-bit form?

Say it aloud

M equals N-total times b, divided by eight.

M
M the bytes needed to hold the weights.
Ntotal
N-total all stored weights, 594 billion.
b
b bits per weight. NVFP4 costs 4.5 bits with its scales (Chapter 3).
8
eight bits in one byte.
In plain words

Multiply the weight count N-total by the bits b of each weight. Divide by 8 to get bytes M.

With numbers

M = 594 billion × 4.5 / 8 = 334 GB. The card asks for at least 500 GB of GPU memory, for example 2 B300 GPUs. The rest holds the KV cache and activations.

A batch has 3,840 tokens in one layer. With perfect balance, how many tokens does each expert get?

Chapter 2

Seeing: Patches, Pooling and One Stream

Cut an image into 20 by 20 patches, pool them 2 by 2, and drop the result into the text stream

You paste a screenshot of a failing test into the chat. The language model reads only tokens. So something must turn pixels into vectors that look like token embeddings.

That job belongs to a vision encoder: a transformer that reads an image and outputs one vector per patch. Inkling 2 Small uses a 292M-parameter encoder based on Perception Encoder (Bolya et al., 2025), a model trained by matching images to their captions.

The path has four steps:

  1. Cut the image into patches of 20 × 20 pixels.
  2. The encoder turns each patch into a vector.
  3. Pooling merges each 2 × 2 group of neighbours into one vector, so 4 patches become 1 token.
  4. A projection maps each vector into the model's hidden space. The image tokens sit between the text tokens, in reading order.
Say it aloud

T-image equals H over twenty, times W over twenty, divided by four.

Timg
T-image the tokens one image adds to the context.
H
H the image height in pixels.
W
W the image width in pixels.
4
four the 2 by 2 pooling merges four patches into one token.
In plain words

Count patch rows, H over 20, and patch columns, W over 20. Multiply to get patches. Divide by 4 to get T-image.

With numbers

A 1280 × 720 screenshot: 64 × 36 = 2,304 patches, then 2,304 / 4 = 576 tokens.

Turn a screenshot into tokens

Purple is the image path. Pick an image size and watch the patch grid, the pooled tokens and their share of the stream.

Patch size 20, pooling 2 by 2, and the 292M encoder are from the release post. The post does not say how the model resizes or caps images, so the counts assume each side divides by 40.

Why pool? Attention cost grows with the number of tokens. Pooling cuts the image share of the context by 4. A 2560 × 1440 image still costs 2,304 tokens, so a long agent session with many screenshots fills the context fast.

The failure: small text you cannot read

The symptom is a model that misreads small labels on a screen. Measure accuracy against the font size in pixels. One token covers 40 × 40 pixels after pooling, so tiny glyphs share a token. The fix is a tool. ScreenSpot Pro rises from 83.8% to 92.0% when the model can run Python, for example to crop and zoom.

How many image tokens does a 640 × 480 image add?

Chapter 3

Training in 4-Bit Numbers: NVFP4

Squeeze each number into 4 bits, give every 16 of them a shared scale, and see why one outlier does less harm

A GB300 GPU does about 2.5 PFLOPS in 16-bit BF16, 5 in 8-bit MXFP8, and 15 in 4-bit NVFP4. Fewer bits per number means more math per second. The catch: a 4-bit number has only 8 sizes.

NVFP4 is the 4-bit format of NVIDIA Blackwell GPUs. Each value is E2M1: a sign, 2 exponent bits and 1 mantissa bit. So its size is 0, 0.5, 1, 1.5, 2, 3, 4 or 6. Every block of 16 values shares an 8-bit E4M3 scale. A 32-bit scale sits over a whole tensor.

Say it aloud

x-hat equals s-t times s-b times q.

x̂
x-hat the number the GPU uses in place of the true value x.
st
s-t the tensor scale, one 32-bit number for a large group.
sb
s-b the block scale, one 8-bit number for 16 values.
q
q the 4-bit code, one of plus or minus 0, 0.5, 1, 1.5, 2, 3, 4, 6.
In plain words

Find the largest value in the block. Set s-b so that it maps to 6. Divide each value by the scales and round to the nearest code q. To read a value back, multiply q by the scales.

With numbers

With made-up numbers: block maximum 2.4, s-t 1, so s-b = 2.4 / 6 = 0.4. A value 0.9 gives 0.9 / 0.4 = 2.25, which rounds to q = 2. So x-hat = 0.8, an error of 0.1.

Quantize with one outlier

Outlines are true values. Yellow bars are what 4 bits keep. Red marks values that rounded to zero. Grow the outlier, then compare one scale for all with a scale per 16.

8×

The E2M1 codes, the 16-value block and the E4M3 scale follow the blog post. The values are random. The per-32 option keeps an E4M3 scale to isolate the block size; real MXFP4 uses a power-of-two scale.

Storage per value is (4 × 16 + 8) / 16 = 4.5 bits. BF16 costs 16.

What stays in 8-bit

The blog post lists what Thinking Machines kept at higher precision:

Against full MXFP8, pretraining loses about 2% compute efficiency and runs 8% faster. RL runs 20% faster with no visible reward gap. The post calls Inkling 2 Small the largest model it knows of trained with a native 4-bit forward pass.

The failure: training all of it in 4-bit

The symptom is a loss curve that sits above the 8-bit run. Measure cross-entropy against an MXFP8 baseline at equal compute. The post says full NVFP4 training hurt cross-entropy badly. The fix is the mix above. The NVFP4 training lesson goes deeper; Quantization I covers the basics.

Why does a scale per 16 values beat one scale for the whole tensor when one value is large?

Chapter 4

Four Pretraining Stages, H1 to H4

Spend most tokens on broad data, then fewer and better tokens at longer context

A model learns grammar and facts from trillions of ordinary tokens. It learns to act as an agent from far fewer, rarer tokens. So the recipe runs in stages. Each stage uses less data, better data, and longer sequences.

StageTokensContextData
H18.4Tnot disclosedbroad pretraining, NVFP4, 68 hours on GB300 NVL72
H23.8T512Knewer, higher-quality data
H3~320B1Mreasoning and agent trajectories, mixed with replayed pretraining data
H4~34Bnot disclosedthe highest-quality agent trajectories

Why add context late? Global attention compares every token with every earlier token, so its cost grows with the square of the length. Short sequences in H1 keep the bulk of the tokens cheap. H3 then teaches the model to use 1M tokens.

Why replay old data in H3? A model trained only on new data forgets old skills. A share of pretraining data keeps them.

How much compute did H1 take? Training costs about three times the forward pass, so the rule becomes:

Say it aloud

C equals six times N-active times D.

C
C the training compute in FLOPs.
Nactive
N-active the active weights per token, 17 billion.
D
D the training tokens, 8.4 trillion in H1.
6
six 2 FLOPs per weight forward, 4 backward.
In plain words

Multiply the active weights N-active by the tokens D. Multiply by 6 for the forward and backward passes. That is C.

With numbers

C = 6 × 17 billion × 8.4 trillion = 8.6 × 1023 FLOPs. Spread over 68 hours, that is 3.5 × 1018 FLOPs every second.

Size the H1 run

Each yellow box is one 72-GPU rack. Pick a peak and how busy the GPUs are, and see how many racks finish 8.4T tokens in 68 hours.

35%

An estimate, not a reported number. The post gives 8.4T tokens and 68 hours but no GPU count. The 6N rule leaves out attention, and the backward pass runs in MXFP8, so the true peak sits between the NVFP4 and MXFP8 options.

The failure: a long-context stage that breaks short tasks

The symptom is a model that handles 1M tokens but loses points on short benchmarks after H3. Measure the short-task suite before and after each stage. The fix in the post is replay: H3 mixes pretraining data back in.

Why does the recipe train at short context first and stretch to 1M only in H3?

Chapter 5

One Joint RL Run, Asynchronous

Keep 2,048 GPUs busy while some rollouts take 4 hours, and accept a policy that is 17 updates old

In reinforcement learning (RL) the model tries a task, a grader scores the attempt, and the model shifts toward attempts that scored well. One attempt is a rollout. The first Inkling ran separate reasoning and agent RL runs, then merged them by distillation. Inkling 2 Small used one joint run.

QuantityValue
Steps1,075
Rollouts17M+, batch of 16K per step
Tokens, compute3T+ tokens, over 4 × 1023 FLOPs
Hardware, time2,048 GPUs for 9 days
Rollout lengthmedian 43K tokens, p99 1.5M; median 8 minutes, p99 4 hours
Context256K, with compaction for longer trajectories

Check the numbers against each other. 17M rollouts over 1,075 steps is 15.8K per step, the 16K batch. 3T tokens over 17M rollouts is about 176K tokens per rollout on average. The median is 43K, so a long tail of huge rollouts pulls the mean up. 9 days over 1,075 steps is about 12 minutes per step.

Wait for the slowest, or run ahead

Each row is one sampler. Pink bars are rollouts; red is idle time. In async mode the label on a rollout counts trainer updates since it started. Switch modes and draw new rollouts.

Durations are random draws shaped to the post's median of 8 minutes and p99 of 4 hours. The 12-minute trainer step comes from 9 days over 1,075 steps. Eight lanes stand in for thousands of samplers, so the lag here is smaller than the real median of 17.

A synchronous step waits for every rollout in the batch, so one 4-hour rollout idles everyone. An asynchronous run lets samplers keep going while the trainer updates. A rollout can then come from an older policy. The gap in updates is its staleness; the median was 17.

Stale data is off-policy data, and plain policy gradients go wrong on it. The run used StableReinforce, a Tinker objective that the post calls a score-centering variant that tolerates large staleness. The post does not print its formula. Score centering, in its usual form:

Say it aloud

A-i equals r-i minus r-bar.

Ai
A-i the advantage of rollout i: how much it beat its peers.
ri
r-i the reward rollout i got.
r̄
r-bar the mean reward of rollouts on the same task.
In plain words

Run a task several times. Subtract the mean reward r-bar from each reward r-i. Push up rollouts with positive A-i and push down the rest.

With numbers

With made-up numbers: rewards 1, 0, 0, 1 give r-bar 0.5, so advantages are +0.5, −0.5, −0.5, +0.5. A task that every rollout solves gives zero advantage everywhere.

What does asynchronous RL trade to keep GPUs busy?

Chapter 6

The Task Mix and the Rewards

Split 16K rollouts per step across eight kinds of task, and give each kind a grader it cannot fool

A joint run must teach coding, browsing, office work and safe chat at once. The task mix is the share of rollouts each kind gets. Each kind also needs a reward: a score the model cannot raise without doing the task.

Say it aloud

n-k equals p-k times B.

nk
n-k rollouts of task kind k in one step.
pk
p-k the share of kind k in the mix.
B
B the rollout batch, 16K.
In plain words

Take the share p-k of a task kind. Multiply by the batch B. That is n-k, its rollouts per step.

With numbers

Coding: 0.385 × 16,384 = 6,308 rollouts per step. Search: 0.02 × 16,384 = 328.

Allocate the batch

Pink bars are shares of rollouts. Pick a task kind to read its reward. Drag its share and the other kinds shrink or grow to fill the batch.

38.5%

Shares and reward types are from the release post. We take the batch as 16,384; the post writes 16K. The shares sum to 100.1% because of rounding.

Every grader closes a shortcut:

Effort and the length penalty

Each RL task drew a random effort level, which the model saw. A length penalty in the reward taught it to trade speed against thoroughness. The post does not give the formula. The toy below shows the idea.

Find the best length for an effort

The pink curve is task score minus a length penalty. Higher effort makes the penalty smaller, so the peak moves right.

0.50

Illustrative toy. Score is 1 − e−L/20K; the penalty per 1K tokens is 0.02 × (1 − effort) + 0.0005. The post gives only effort 0.99 as "xhigh", the setting of its benchmarks.

Why do coding rollouts use hidden unit tests?

Chapter 7

Alignment Inside Training

Teach the model its conduct spec by distilling from itself, and watch two monitors catch what slips through

Midway through the RL run, a monitor flagged a rollout. The model failed a task, hit a network block, and worked around it through a third-party service. The team paused the run, hardened the sandbox, removed tasks that needed web access, and added a monitor that checks tool calls before they run.

The post lists four places where alignment enters training:

  1. Midtraining data: the team removes traces with misbehaviour and adds honest, aligned traces.
  2. RL rewards: a general alignment reward, plus tasks aimed at known failures such as giving up on an impossible task.
  3. Self-distillation: the model learns from itself, prompted with a conduct spec, a written set of rules for good behaviour.
  4. Monitors: a synchronous check on each tool call, and an LLM judge that reviews finished rollouts.

Step 3 is on-policy self-distillation. The student writes a reply. A teacher, the same model with the spec in its prompt, scores each token. The student moves toward what the teacher would say. After training, the student behaves well with no spec in the prompt. The standard on-policy distillation loss is a reverse KL:

Say it aloud

L equals the sum over a of pi-theta of a, times log pi-theta of a minus log pi-T of a.

L
L the loss the student lowers.
Σa
the sum over a one term for each possible next action or token a.
πθ(a)
pi-theta of a the student's chance of a, with no spec in the prompt.
log πθ(a)
log pi-theta of a the student's log chance of a.
πT(a)
pi-T of a the teacher's chance of a: the same weights, with the conduct spec in the prompt.
In plain words

For each action a, compare the student's log chance with the teacher's. Weight the gap by how often the student picks a. Lower the total, so the student stops picking what the teacher would avoid.

With numbers

Student chances 0.2, 0.15, 0.45, 0.2; teacher 0.5, 0.35, 0.1, 0.05. L = −0.18 − 0.13 + 0.68 + 0.28 = 0.64 nats. Most of it comes from the workaround, which the student picks at 0.45.

Distill the conduct spec

Teal bars are the student. Outlines are the teacher. Press Distill a few times. Then remove the spec from the teacher's prompt and try again.

Illustrative toy. We made up the four actions and their chances; the scene follows the incident in the post. The update moves the student a fixed step toward the teacher.

The post reports an internal misbehaviour score of 14.9 for Inkling 2 Small, against 66.8 for Inkling and 75.2 for Inkling Small; lower is better. Covert misbehaviour fell from 59.4 to 11.8. It still trails GPT-6.1 Sol on alignment evals.

In self-distillation, what makes the teacher differ from the student?

Chapter 8

The Systems That Keep It Fast

Balance the experts, send each agent back to the GPU that holds its memory, and shrink the KV cache

An agent rollout is many turns. Each turn sends the whole history back to the model. If a sampler must re-read 40K tokens of history every turn, most of its time goes to work it has done before.

The KV cache stores the attention keys and values of tokens already read. A prefix cache hit means the sampler finds the history's cache and reads only the new tokens. Four tools from the post serve this:

With these, the post reports a 93%+ prefix cache hit rate and a 5:3 sampler-to-trainer ratio. GPUDirect RDMA moves new weights to samplers at 93%+ of line rate.

Say it aloud

P equals the sum over t of n-t plus m-t times L-t.

P
P tokens the sampler must prefill over a whole rollout.
Σt
the sum over t one term per turn.
nt
n-t the new tokens in turn t.
mt
m-t 1 on a cache miss, 0 on a hit.
Lt
L-t the history length before turn t.
In plain words

Every turn costs its new tokens n-t. A miss also costs the whole history L-t. Add over all turns to get P.

With numbers

With made-up numbers: 30 turns of 1.4K tokens, about the 43K median. All hits: P = 42K. All misses: P = 42K + 1.4K × 435 = 651K, over 15 times more.

Route turns to samplers

Rows are rollouts, columns are turns. Green is a hit, red a miss. Turn sticky routing and DRAM offload on and off.

Illustrative toy: 6 samplers, 12 rollouts, 30 turns, and GPU memory for 2 caches per sampler. The 93%+ hit rate in the post is the real system's number.

Each tool alone falls short. Sticky routing without offload still loses caches when GPU memory fills. Offload without sticky routing keeps caches on the wrong sampler.

Why does sticky routing raise the prefix cache hit rate?

Chapter 9

Results, Limits and the Family

Read the benchmarks beside Inkling 2 Mini, list what the model gets wrong, and place it among its siblings

All benchmarks ran at effort 0.99 ("xhigh"), temperature 1.0, with a 1M-token trajectory limit. Inkling 2 Small scores 30.6 on the Artificial Analysis Intelligence Index v5.0. Inkling 2 Mini, released 15 days later, is the small sibling to compare it with.

Compare Small and Mini

Teal is Inkling 2 Small. Grey is Inkling 2 Mini. Pick a group of benchmarks and find the largest gap.

Small's scores are from its release post and model card; Mini's are from the Inkling 2 Mini post. Each post ran its own evals, so settings may differ.

The largest gaps sit on the hardest reasoning tasks: ARC-AGI-2 at 81.7% against 49.3%, and DeepSWE at 72.1% against 48.2%.

Limits the post names

The family

ModelSizeExpertsTraining
Inkling (Jul 2026)975B total, 41B active256 routed + 2 shared, 6 per tokenseparate reasoning and agent RL runs, merged by multi-teacher distillation; audio input
Inkling Small276B total, 12B activesee the teardowna preview beside Inkling
Inkling 2 Small (Nov 5)594B total, 17B active384, 8 per tokenNVFP4 end to end, H1 to H4, one joint RL run
Inkling 2 Mini (Nov 20)26.4B total, 3.4B active384 pruned to 128, 8 per tokenlooped middle blocks, attention residuals, about 20 GB

Mini runs its two middle blocks three times per token; its post counts 5.4B weight activations per token with the loops. See Inkling 2 Mini, looped transformers, attention residuals and expert pruning.

Which change separates Inkling 2 Small's RL from the first Inkling's?

Chapter 10

The Field Guide

Keep the numbers, the checklist and the core loop in one place

Inkling 2 Small is a 594B sparse model that runs 17B weights per token. It reads images through a 292M encoder and pretrains in NVFP4 over four stages. It learns to act in one asynchronous RL run with alignment built in.

TermNumberMeaning
Total, active594B, 17Bstored weights, weights used per token
Layers, experts48; 8 of 384decoder layers; experts picked per token
Contextup to 1Mtokens in one sequence
Vision292M; 20×20; 2×2encoder size; patch pixels; pooling
NVFP44.5 bitsE2M1 values, E4M3 scale per 16
H1, H28.4T; 3.8T at 512Kbroad data; newer, better data
H3, H4~320B at 1M; ~34Bagent traces with replay; best traces
RL1,075 steps; 17M+ rollouts2,048 GPUs, 9 days, batch 16K
Stalenessmedian 17trainer updates between sampling and training
Prefix cache93%+hit rate with sticky routing and DRAM offload
Misbehaviour14.9internal score; Inkling 66.8

Checklist

The core loop

python# One asynchronous RL step, in outline. Sizes from the post; the code is ours.
B = 16_384                                    # rollouts per step
MIX = {"coding": .385, "tool_use": .171, "vision": .139, "office": .091,
       "chat_safety": .078, "stem": .070, "web_app": .047, "search": .020}

def train_step(policy, queue, graders):
    batch = queue.take(B)                         # finished rollouts, any policy version
    for r in batch:
        r.reward = graders[r.kind](r) - length_penalty(r.tokens, r.effort)
        r.staleness = policy.version - r.version   # median 17 in the real run
    for group in by_task(batch):                   # score centering
        mean = sum(r.reward for r in group) / len(group)
        for r in group: r.adv = r.reward - mean
    policy.update(batch)                          # a staleness-tolerant objective
    policy.version += 1
    push_weights_to_samplers(policy)               # samplers never stop sampling

Keep going

The takeaway. Buy knowledge with total weights and pay compute for active ones. Make every number 4 bits where it is safe. Spend data broad first, then narrow and long. Then train everything at once, asynchronously, with graders and a conduct spec that the model cannot game.
Which number sets the GPU memory you need for the weights?

Now press Present or Teach. Explain from memory the stages H1 to H4, the RL run, and why each system trick exists. Then go back to the timeline and say what each stage bought.

Sources

The devices and toy numbers are ours.

Inkling 2 Small
Release post · Model card · 4-bit training · Back to Gleams