Interpretability
Inside variable-looped transformers
Repeating middle layers per token gives language models a fixed-width internal workspace alongside written reasoning, reshaping how test-time compute scales and invalidating standard serving shortcuts
Standard reasoning models scale test-time compute horizontally by writing longer chains of thought before answering, storing intermediate state as extra tokens in the attention cache. Looped transformers add a vertical axis. Before emitting each token, the model passes its hidden state through the same middle layers L times with shared weights, updating a fixed-width vector silently while keeping a separate attention cache per pass so pass k attends to pass k of earlier tokens.Looped forward pass. Thinking Machines’ 24-layer design runs a 6-layer prelude once, repeats a 12-layer core L times, and ends with a 6-layer final block. Learned Attention Residuals blend the prelude state with the prior pass’s output at each loop.
A companion serving study of Inkling 2 Mini pushed local inference on NVIDIA DGX Spark to 85% to 89% of its memory bandwidth. Local deployment depends on intelligence per watt and intelligence per joule, metrics from Stanford’s Hazy Research measuring task accuracy per unit of power and total query energy.Intelligence per watt and per joule. In Saad-Falcon et al. (2025), intelligence per watt divides accuracy by power draw, and intelligence per joule divides accuracy by total query energy (power times latency). Early Stanford tests scored fixed 3-loop Inkling 2 Mini at 0.703 intelligence per watt on one DGX Spark. Once kernels sit near the hardware ceiling, further gains in intelligence per joule come from understanding what looping computes inside the weights, where silent passes replace written tokens, and which serving shortcuts degrade accuracy without saving energy.
Variable-depth checkpoints isolate those questions cleanly because loop depth L varies inside frozen weights. Comparing Thinking Machines’ TML-d24-varloop-research against fixed 3-loop Inkling 2 Mini and a structurally unrelated dense Universal Transformer, ByteDance/Ouro-2.6B-Thinking, separates general properties of looped computation from quirks of one architecture.Two unrelated architectures. TML-d24-varloop-research is a 26B sparse mixture-of-experts model (3.4B active parameters on pass 1, roughly 5.4B at 3 loops) pretrained across 1 to 5 loops with RL at 3 loops. Ouro-2.6B-Thinking is a 2.6B dense 4-pass model with full attention and a learned exit gate.
Across evidence weighing, multi-step math, activation probes, and GPU energy telemetry, variable-depth looping does not act like an unbounded compute dial. It acts like a fixed-width recurrent workspace coupled to an external written scratchpad. That dual-memory view explains where extra passes compress traces, why gains level off at shallow depth, how variable depth replaces rigid internal timers, and why serving shortcuts built for non-looped transformers fail quietly.
- Where extra loops scale and where they plateau
- What silent loops compute compared with written reasoning
- How variable depth retires a fixed countdown
- Cache sharing and the Prefill Mirage
- Why early exit hits both a hardware wall and a task wall
- What this means for building and serving looped models
Where extra loops scale and where they plateau
Sweeping loop depth inside frozen weights tests vertical scaling across two contrasting workloads. The first measures evidence weighing on 150 multiple-choice trials adapted from the belief-revision study, crossing 1 to 5 loops with four written reasoning budgets from 256 tokens to unconstrained 8,192-token defaults.Evidence-weighing setup. Each trial pairs a question and prior answer with a valid or misleading critique. Accuracy covers all 150 items, and single-user energy multiplies measured Joules per token by mean response length for an equal batch-size comparison.
The second tests multi-step math on 100 GSM8K problems and 100 hard MATH-500 problems (50 Level 4 and 50 Level 5 across all seven subjects) scored by an audited SymPy parser with zero timeouts, alongside a 1, 2, and 4 loop GSM8K sweep on dense Ouro 2.6B.Audited math grading. All 12 runs (1, 3, and 5 loops, shared cache off and on, batch 32, max 6,144 tokens) finished 100/100 items. A SymPy 1.14.0 normalizer fixed 42 formatting false negatives with zero regressions.
Figure 1. Math accuracy by loop count (Panel A, shared cache off) and 150-item evidence accuracy against single-user GPU energy as written reasoning budgets grow left to right (Panel B). Full-size figure.
| Model and depth | GSM8K accuracy | GSM8K tokens (energy) | MATH-500 Levels 4 and 5 | MATH-500 tokens (truncated) | MATH-500 energy |
|---|---|---|---|---|---|
| 26B variable-loop, 1 loop | 95.0% | 661 (66.6 J) | 76.0% (66% on Level 5) | 2,198 (16) | 167.3 J |
| 26B variable-loop, 3 loops | 98.0% | 423 (54.5 J) | 96.0% (96% on Level 5) | 1,548 (2) | 246.3 J |
| 26B variable-loop, 5 loops | 98.0% | 417 (88.1 J) | 94.0% (92% on Level 5) | 1,520 (3) | 339.2 J |
| Ouro 2.6B (dense), 1 loop | 56.0% | 662* (425 J) | not tested | - | - |
| Ouro 2.6B (dense), 2 loops | 83.0% | 562* (740 J) | not tested | - | - |
| Ouro 2.6B (dense), 4 loops | 83.0% | 582* (1,513 J) | not tested | - | - |
*Ouro 2.6B reports mean reasoning tokens at a 1,024-token cap and batch size 4, so its Joules are not directly comparable to the 26B batch-32 runs. Ouro truncations fell from 32 at 1 loop to 13 at 2 loops and 11 at 4 loops.
Shorter traces can make deeper looping energy-negative. On batched GSM8K, moving the 26B model from 1 to 3 loops cuts response length by 36.0%. At batch 32, each token costs 1.28x more energy at 3 loops than at 1 loop (versus 2.2x at batch 1), so shorter proofs make 3 loops 20% faster (171 vs. 213 s) and use 18.2% less GPU energy per problem. That raises intelligence per joule by 26%.
Vertical depth raises ceilings that longer text does not reach. On hard MATH-500, 3 loops add +20.0 points over 1 loop (20 paired wins and 0 losses, p = 0.000002), lift Level 5 from 66% to 96%, cut truncations 8x, and shorten traces by 29.6%.Paired tests and 1-loop variance. Exact paired McNemar tests compare discordant outcomes on identical items. Because 1 loop runs identical code regardless of cache sharing, 1 loop off (76.0%) vs. on (82.0%, p = 0.24) reflects batching order variance; 3 loops (96.0%) beats both (p = 0.000002 and 0.00012). On evidence weighing (Figure 1B), spending 2.5x more words and energy at 1 loop (108 to 277 J) plateaus at 74.0% to 76.0%. At that same ~165 J budget, 3 loops reach 82.7% and peak at 86.7% (+10.7 points above 1 loop’s best budget, adjusted p = 0.047).
Gains saturate past a shallow depth knee. Pushing the 26B model from its 3-loop RL anchor to 5 loops adds zero GSM8K accuracy (+61.6% energy), dips to 94.0% on MATH-500 (p = 0.50, +37.7% energy), and only ties 86.7% on evidence weighing at nearly double the energy (510 vs. 282 J). Dense Ouro 2.6B mirrors that cutoff, rising +27 points at 2 loops before flattening at 4 loops for 2.05x energy. Past that knee, intelligence per joule drops 29% on MATH-500 and 51% on Ouro, so dialing up test-time loops cannot substitute for variable-depth RL.
What silent loops compute compared with written reasoning
To see what iterative passes compute before and during written reasoning, traces were paused at 0, 16, 32, 64, 128, 256, 512, and all reasoning tokens on 200 balanced evidence trials, 100 GSM8K problems, and 60 short-answer MATH-500 problems. At each checkpoint, every pass’s hidden state passed through the frozen final block and output layer to read the model’s favored answer right then.Reading intermediate passes. Projecting any loop’s hidden state through the frozen final block and output layer needs zero training and matched normal final-pass outputs to 0.000000 max logit difference. Evidence trials scored A through D (over 99.9% probability on the four options); math scored exact greedy match on boxed answers.
Figure 2. Hidden-state readout accuracy across written reasoning checkpoints (Panel A) and two-way belief updating between written text and internal state (Panel B). Full-size figure.
Silent loops resolve context-contained judgment before speaking. When the prompt already holds the question, prior answer, and critique, 3 and 5 loops reach 85.0% and 85.5% accuracy at 0 written tokens, beating 1 loop even after it writes 1,411 tokens (84.5% internal readout, 82.5% verbal answer). Three loops also trim traces 27.8%, halve truncations (13 to 7), and cut false flips on misleading critiques (17.2% to 10.6%). For classification, grading, and routing over provided text, silent depth can replace long chains of thought.
Multi-step algebra still requires an external scratchpad. On math, the curve inverts. At 0 written tokens, 5 silent loops solve 41.0% of GSM8K and 15.0% of hard MATH-500 (17% of the final 86.7% readout). A fixed-width hidden vector cannot hold an arbitrary chain of intermediate equations, so written text remains essential as external working memory. Once partial equations appear on the page, deeper passes act as a mid-solution lookahead accelerator. On GSM8K in Ouro 2.6B, loop 4 leads loop 1 by +30 points at 256 tokens (69.0% vs. 39.0%).Mid-trace math readout caveats. On 26B GSM8K, forced bare-integer readout scores 69% vs. 98% unforced because unforced answers add currency or words. On Ouro, forcing boxed answers recovers 11 truncated traces (83% overall vs. 94.3% completed) and skips checking the closing brace on single-digit tokens (96% to 97%), while closing-token exit depth after teacher-forced digits drops from 2.88 to 2.52.
Written text and internal beliefs overwrite each other in both directions. On completed 26B valid-critique trials that end wrong (Figure 2B), silent passes first lean toward the right answer (49.7% to 55.2% across 2 to 5 loops). Faulty reasoning then pulls the internal belief down to 0.0% to 0.1%, with the drop’s 95% confidence interval strictly negative at every depth. Ouro 2.6B reverses that path, climbing from 28.4% at token 0 to 98.9% via sound steps. Looping never insulates a model from bad early text, while accurate steps can rescue weak opening loops. Spend verification compute on deeper single-turn traces or fresh evidence rather than evidence-free second turns, which only inflate wrong-answer confidence.Single-turn vs. multi-turn review. Longer single-turn budgets keep 26B 3-loop calibration error flat or lower (4.7% to 2.8% to 3.5%). Asking for a double-check without new evidence on Turn 2 lifts wrong-answer confidence +2.6 to +4.1 points across 2 to 5 loops (3 loops still beat 1 on Turn 4, 87.5% vs. 75.0%, p = 0.013).
How variable depth retires a fixed countdown
Inkling 2 Mini and the 26B variable-loop model share the same 24-layer skeleton, so comparing their activations isolates what variable-depth training changes inside the weights.
Figure 3. Relative hidden-state movement between passes (Panel A) and residual channel strength inside the 26B lineage out to 10 passes, twice its trained depth (Panel B). Full-size figure.
Because Inkling 2 Mini always runs three passes, it specializes pass 3 as a hard-coded exit transition. Extending Goodfire’s analysis of that fixed checkpoint, one residual coordinate (channel 2027) holds a normalized strength of +31.7 on loop 1 and +29.7 on loop 2 before layer 18 resets it to -1.6 on loop 3, causing a 125% hidden-state jump on the final pass (Figure 3A).Residual channels and step size. Channel strength is one coordinate of the 2,304-dimensional residual stream after RMS normalization. Step change is the relative L2 distance between consecutive pass states.
A variable-depth model cannot assume which pass is last. The 26B checkpoint retires channel 2027 (flat near +9) and promotes a steady carrier (channel 924, flat near +20.8 across all 10 passes, carrying 39% to 47% of the signal into layer-13 loop-mixing gates). Step movement contracts smoothly from 48% at loop 2 to 18% at loop 4 and 11% by loop 10, while sparse expert routing stabilizes (60.8% to 86.4% overlap). Turning each pass into a smaller refinement lets variable models run past trained depth without breaking, even as shrinking updates cap extra accuracy.
Smooth settling generalizes across architectures. Dense Ouro 2.6B shares nothing except weight-tied looping and contracts to ~11% step size by loop 4 (48.7% to 24.4% to 10.6%) with its own carrier (channel 1881). Ouro’s learned exit gate mirrors the task split on its own, allocating 3.17 passes on evidence answers (0.1% pass-1 exit) while spreading exit probability nearly evenly across all four passes (2.49 mean) at the start of GSM8K, showing why prompt-level gates miss mid-trace math needs. Zeroing separate channels confirms the 26B handover shifts loop-gate routing without creating a single brittle bottleneck.Causal ablations. On pass 3 across 200 trials, zeroing {2027, 378} shifts the layer-13 gate logit -3.48 in Inkling vs. -1.79 in the variable model, while {924, 2110} shifts it -0.37 vs. -1.86 (-2.27 on pass 4). Zeroing all loop gates keeps 85.0% to 87.5% accuracy via prelude skips, and zeroing channel 924 into pass 4 shifts accuracy by 0.0, so probes should track distributed states.
Cache sharing and the Prefill Mirage
Because each loop updates the hidden state, exact serving keeps one attention cache per layer and pass (48 caches at 3 loops instead of 24). Serving engines expose a loop_share_cache=true flag that collapses those caches to one slot per physical layer. On vLLM’s hybrid cache, however, unshared short-convolution buffers take up most of the memory pool, capping memory gains while giving zero decode speedup.Modest hybrid memory savings. In vLLM, each pass still keeps its own 4-token short-convolution state. Those unshared buffers limit capacity gains to +6.5% (2 loops), +10.7% (3), and +15.6% (5) with 0% speedup (37.0 vs. 37.2 tok/s at 3 loops).
Validating that flag with standard single-token prompt log-likelihoods (prefill only) makes it look lossless. Across both the 26B model (3 and 5 loops) and Ouro 2.6B (4 loops), single-token predictions match 100.0% with 0.000000 probability and logit error.
Figure 4. Exact token match during prefill versus autoregressive decoding (Panel A) and 3-loop confidence error across all four tasks with shared caching off versus on (Panel B). Full-size figure.
This discrepancy is an architecture-general Prefill Mirage. During prompt prefill, all prompt tokens advance pass 1 together, then pass 2, then pass 3, so early passes never read an overwritten cache. Once token-by-token decoding starts, every new token’s early passes read final-pass overwritten keys and values from prior generated tokens instead of pass-matched history. Once generation starts, greedy outputs diverge by median token 9 to 11 across both architectures (11.0 at 3 loops and 9.5 at 5 loops on the 26B model, and 9.0 on Ouro 2.6B, where exact match drops to 10% by token 31 and 0 of 40 prompts match through 48 tokens). Under batched vLLM scheduling, 3% to 7% of prompts even shift at token 0.
Pooling all four primary 3-loop benchmarks (n = 430 paired items), shared caching loses 22 items and gains 7 (-3.49 points, exact paired McNemar p = 0.0081). Losses concentrate on long judgment and multi-turn tasks. At 3 loops, long-budget evidence weighing falls from 86.7% to 81.3% while calibration error rises 2.46x (2.8% to 7.0%). Four-turn revision drops from 87.5% to 81.2% while Turn-3 calibration error rises 2.16x (4.0% to 8.6%, and 3.6x at 5 loops, 3.1% to 11.2%).Expected calibration error (ECE). ECE is the weighted average gap between predicted confidence and observed accuracy (lower is better). At 2 loops and on short 3-loop budgets, shared caching stays mostly benign before overwrites accumulate across hundreds of tokens. Verifiable math shows smaller drops (98% to 97% on GSM8K, 96% to 95% on MATH-500 with truncations doubling from 2 to 4) because written algebra catches small slips. Keep loop_share_cache=false in production, and never validate looped-model cache optimizations with prefill-only tests.
Why early exit hits both a hardware wall and a task wall
If easy queries finish in 2 loops while hard ones need 3, skipping loop 3 adaptively looks appealing. Measuring a bit-exact single-user Pass-2 early-exit prototype on NVIDIA DGX Spark exposes two independent walls, one set by memory bandwidth and one set by task structure.DGX Spark roofline. On GB10 (240.5 GB/s bus, 24 MiB L2), each loop streams 1.15 GB cold from RAM, scaling decode from 65.9 to 25.8 tok/s across 1 to 5 loops (see the Inkling 2 Mini recipe).
Figure 5. Single-user decode latency on DGX Spark for fixed depths versus Pass-2 probes (Panel A) and live accuracy when routing 40% of prompts to 3 loops before writing (Panel B). Full-size figure.
Per-token vocabulary checks cost nearly a full loop. On DGX Spark, 2 loops take 18.97 ms/token and 3 loops take 26.19 ms/token, making loop 3 cost 7.22 ms/token (Figure 5A). Checking output uncertainty after loop 2 runs the 6-layer final block and streams the 926 MB 16-bit output layer (201,024 vocabulary rows) from RAM. That adds +6.62 ms/token, or 91.7% of loop 3. Unless more than 91.7% of tokens exit early, per-token vocabulary checks are strictly slower than always running 3 loops, a ratio that holds on faster datacenter GPUs too because both steps are limited by memory bandwidth at batch 1. A linear dot-product probe on the 2,304-number hidden state adds +0.036 ms/token (0.5% of loop 3, 184x cheaper).
Probing the opening thinking token misses the problem. Because reasoning traces open with boilerplate framing before engaging the question, Pass-2 probes at thinking token 1 fail on judgment (0.46 to 0.48 AUROC across entropy, state movement, and linear probes) and invert on 1-loop MATH-500 errors (0.17 for vocabulary uncertainty). Running one forced-answer check before writing recovers signal (0.68 on judgment, 0.64 on MATH-500). Cheap probes therefore have to fire once reasoning actually engages, not on generic opening tokens.AUROC and probe amortization. AUROC is the probability that a score ranks an error above a correct item (0.50 chance, 1.00 perfect). On zero-reasoning classification (n = 150), Pass-2 option uncertainty (0.733) and a linear probe (0.730) both work, and Pass-1 to Pass-2 state movement at thinking token 1 also flags 1-loop MATH-500 errors (0.71) without helping live math routing. One 147 ms prompt check spreads across ~246 tokens (0.60 ms/token, or 8.3% of loop 3), staying net-faster up to 91.7% escalation rather than breaking even only below 8.3% escalation.
Prefill routing mirrors the judgment-versus-math boundary. In live single-user runs sending the hardest 40% of prompts to 3 loops, prompt-level gating helps tasks settled at token 0 and hurts mid-derivation math, matching the earlier dual-memory split. Practically, prefill routing only fits context-contained tasks, while splitting fixed depths across separate servers burns 1.39x to 1.83x energy on dual idle power, pointing to one shared engine that gates depth mid-trace.Prototype caveats. Linear-probe runs routed 2 or 3 loops from cross-validated scores (0.036 ms GPU cost) with thresholds fit on each small test slice.
- Zero-reasoning classification (150 evidence questions). A single-pass hidden-state probe improves every metric over fixed 3 loops (76.7% vs. 74.7% accuracy, -10.9% wall time, -10.2% GPU energy), whereas re-prefilling escalated prompts after a vocabulary check slows latency by 21%.
- Evidence weighing with reasoning (45 live questions). One 147 ms prefill check lifts accuracy (84.4% vs. 82.2%) and cuts calibration error (4.6% vs. 7.3%) at essentially flat latency and energy (309 vs. 311 s, 183 vs. 180 J) because 2-loop traces write longer answers (259 vs. 217 tokens).
- Grade-school math with reasoning (30 live questions). Routing before writing lowers accuracy from 96.7% to 93.3% with the prompt check and 90.0% with the hidden-state step check because arithmetic errors arise partway through the derivation.
What this means for building and serving looped models
Taken together, raising intelligence per joule for looped transformers is no longer just a kernel optimization problem. Viewing variable-depth looping as a fixed-width recurrent workspace coupled to an external token scratchpad yields four concrete guidelines for training, evaluating, and serving future looped models.
| Design or serving area | Evidence-backed implication | Underlying mechanism |
|---|---|---|
| Training and choosing depth | Match each model’s empirical saturation depth (3 loops on 26B, 2 on Ouro) and test variable-depth RL to push scaling further | Raises 1-loop ceilings and trims traces ~30%, while extra passes past saturation add 38% to 105% energy for zero gain |
| Pairing loops with text | Use silent loops for combining context clues and trace compression, and written tokens for multi-step state | Fixed-width hidden states resolve 85.5% of evidence trials at 0 words versus 15.0% on hard math |
| Auditing cache shortcuts | Keep loop_share_cache=false at 3 or more loops and evaluate full autoregressive decoding |
Prefill hides cache overwrites across passes that diverge by token 9 to 11 and raise judgment error 2.2x to 2.5x |
| Designing adaptive early exit | Skip per-token vocabulary checks and dual-node routers; pursue single-engine mid-trace hidden-state gating | Full vocabulary checks take 91.7% of loop 3, and math errors appear mid-derivation rather than at token zero |
Limitations and open directions
Sample sizes and statistical power. Math benchmarks use 100 deterministic problems per dataset. The 3-loop MATH-500 jump (p = 0.000002) and pooled 3-loop shared-cache drop across 430 items (p = 0.0081) are well powered, while smaller single-dataset deltas (95% vs. 98% on GSM8K, p = 0.38; 96% vs. 94% on MATH-500, p = 0.50) are underpowered alone. Live early-exit slices used 45 judgment and 30 math items with thresholds fit on those small slices rather than a held-out split, and the 30-item live math slice used the initial regex parser without saving raw completions for the SymPy re-grade.
Hardware scope and next steps. GPU telemetry ran on NVIDIA DGX Spark (GB10, unified memory) rather than discrete HBM datacenter GPUs, though batch-1 bandwidth ratios carry across hardware. When serving dense Universal Transformers with Hugging Face defaults, replace per-token torch.cat KV appends with a pre-allocated static cache; on Ouro 2.6B that cut >143 GB of fragmentation down to a flat 5.0 GiB. Causal channel ablations covered only the Thinking Machines lineage, leaving Ouro’s channel 1881 and exit gate open for intervention. Building a single-engine batched kernel that gates loop depth mid-derivation with a sub-millisecond hidden-state probe is the clearest systems frontier ahead.Audit checklist for new checkpoints. Three zero-training checks cover every failure mode above, comparing prefill against greedy decode under shared caching, reading intermediate passes before and during written reasoning, and measuring pass-2 probe overhead against marginal loop latency.