Frontier Foundry

Looped Transformers

The Workshop · Model Architectures

Transformers that run a block of weight-shared layers several times per token, adding depth (more reasoning per token) without adding parameters; shipped in Inkling 2 Mini and GLM-5.4 in Nov 2026.

Also called: looped transformer, loop transformer, looped model, recurrent depth, loop residual. In the glossary.

Looped Transformers is surging this week (×4.73 against the eight weeks before). What is moving.

How it works, as a machineThe Loop Tower · hidden states

Follow one hidden state from a typed word at the entry door to a trace read at the exit, in a bell tower with one gear room climbed twice.

  1. Lift the token in
  2. Climb the core
  3. Read it out
Play Looped Transformers

Looped Transformers in plain words

A looped transformer runs the same block of layers several times for each token instead of stacking more distinct layers. The model gets extra depth, so more reasoning per token, without storing more weights. The price is that every extra pass still costs time and memory when the model runs.

An analogy

Kneading dough on one small board instead of buying a longer table. Each fold works the same dough again, and it comes out better than a single long roll would leave it. The board stays small, but every fold is another minute before the loaf can go in the oven.

How Looped Transformers connects

10 typed relations in the knowledge graph

Builds on

  • Fine-Tuning: The first large looped model was a pretrained base converted by continued training.
  • Fast Inference: Sequential passes add latency; parallel lanes take it back.
  • KV Cache: Every pass leaves a cache of its own unless the passes share one.
  • Mixture of Experts: Several looped models are also mixture-of-experts models, and are compared at matched compute.
  • On-Device & Local Models: The smaller looped model was ported to consumer cards within days.
  • Open-Weight Models: Weights are promised after hardening; practitioners want them for replication.
  • Reasoning Models: Extra passes move reasoning from visible tokens into the hidden state.
  • Test-Time Compute: The number of passes is compute spent at answer time, per token.
  • Transformers & Attention: The same stack of attention layers, with the middle of it visited more than once.

A kind of

See Looped Transformers in the knowledge graph

Looped Transformers in the news

from the daily digests

Who is behind Looped Transformers

people, labs, products and models

People

  • Mira Murati (leads): Inkling 2 Mini, a 26.4B looped MoE under Apache 2.0, pitched as small enough for a laptop.

Named in its facts

What the sources say

5 parts · 19 sources · updated 2026-11-27

A looped transformer runs a block of weight-shared layers several times per token instead of stacking more distinct layers. The extra passes add depth, so more computation per token, without adding parameters; the cost is paid again at serving time in latency and per-pass state. The sources are papers on how to make the loop work and the first shipped models that use one.

Training and scaling a looped model

Training from scratch against retrofitting loops into a pretrained model, what scaling studies say about loops against plain depth and width, and what goes unstable.

  1. Base weights: a pretrained model is the usual starting point. The first large looped model was a pretrained base converted by continued training, after the design was tried at smaller sizes.
  2. Loop converter: training turns the middle layers into one shared core that is visited more than once. Plain fine-tuning into a loop gains little, so a retrofit also teaches each layer to read what earlier loops produced.
  3. Residual scaler: one shared update collects gradients from every visit and is read back by the same visits, so the residual scaling is set for the number of visits or training goes unstable.
  4. Depth-prior trainer: the model is trained over a spread of loop depths and toward a fixed point, so that passes can share a cache later and training can cut backpropagation short.
  5. Matched-compute bench: the looped model is compared with a plain one at equal compute, parameters and cache. A loop that only looks good per parameter is sent back.
+29.1% over SFT at 2x compute (Qwen3-1.7B-Base)
LoopRes authors: improvement of the loop-residual retrofit over SFT; the paper says this more than doubles the gain of the state-of-the-art baseline, across 6 pretrained LLMs and 9 benchmarks. Hugging Face
up to 37.7% over SFT, six models up to 30B
LoopRes gains as relayed by AINews from the paper's author (oahzxl); the recap says it is fully open. AINews
Gold-medal performance on 2025 IMO and IPhO, without tools
Loopie authors' claim for their post-trained looped MoE models. Hugging Face
6.8-18.0% of training FLOPs saved
SMELT authors: saving on the compute-optimal frontier from separate Chinchilla-style fits per architecture, across four sizes up to 54B non-embedding parameters. Hugging Face
1.7x token efficiency at 700M; +2.1 points on 10 tasks at 3B MoE
Mixture-of-Loops authors (U-MoLT, 400B-token pretraining versus OLMo3): validation cross-entropy token efficiency at 700M, and 10-task accuracy gain on the 3B MoE. Hugging Face
1.4x mean token efficiency, CE lower on all 11 domains
Mixture-of-Loops authors: U-MoLT adapted via 100B-token continued pretraining of Qwen3.5-0.8B-Base, against a matched baseline. Hugging Face
2.76 vs 2.84 validation loss at matched params and data
Gated Recurrent Transformer authors, isoPARAMS: deeper recurrence against a non-recurrent counterpart. Hugging Face
63% fewer parameters, 59% less peak decoding memory, +10% latency
Gated Recurrent Transformer authors at large scale: against a dense model; see the serving module for the latency side. Hugging Face
RL updates 2x faster; perplexity lower at every scale 100M to 1.6B
Part II authors: gradient from saved rollout states against replayed backprop; learned prior and orthogonal injection against Huginn's prior and prior injection schemes. Hugging Face
  • GLM-5.4 was adapted from the GLM-5 base through continued training, not pretrained looped from scratch (AINews relaying Z.ai). It also adds vision. AINews
  • A Hacker News commenter notes that GLM-5.4 is a pretrained model converted to a loop, and expects many models to get the same conversion because it is low-hanging fruit for benchmarks. lolokazaki123
  • Per the Reddit summary of Z.ai's blog, the loop architecture was validated on 1B, 4B, 30B and 750B base models before the flagship. Commenters asked for the sub-30B checkpoints for replication and ablations. AINews

When it breaksResidual scaling that ignores repeated visits is unstable. DeepLoop shows that in a looped model one shared update collects gradients from every visit and is read back by those same visits, so the usual untied residual scaling is wrong. At fixed physical depth the DeepNorm exponent must rise from 1/4 to 1/2 as loop count grows in the aligned regime. Hugging Face

Open questionIs looping a layer stack better than adding plain parameters or depth at matched compute?

  • Looped models often lose at matched compute, even when their accuracy-compute slope is steeper. Hugging Face
  • For a long time N times the parameters usually beat looping N times; Loopie claims to reverse this at equal compute against a 30B-A3B baseline. Hugging Face
  • Looping the middle half twice still wins when FLOPs, parameters and KV cache are all matched, saving 6.8-18.0% of training FLOPs. Hugging Face

The looped stack

Which layers run once and which run again, and what one pass hands to the next. A looped model keeps a few entry layers, a shared core that is visited several times, and a few exit layers; residuals, messages and gates carry state from pass to pass.

  1. Entry layers: the first layers run once and turn the token into its starting hidden state.
  2. Shared core: a block of weight-shared middle layers runs again on the state the last pass left. Each pass writes an update; the parameter count does not grow.
  3. Update gate: for each token a gate sets how much of the pass is written into the state, which lets the same layers act differently on each pass.
  4. Pass hand-off: the next pass is given what earlier passes left: the input on its own path, earlier updates or outputs, and a key that tells one pass from another. The state goes round again or leaves.
  5. Exit layers: the last layers run once on the finished state. What each pass changed can be read off as a trace.
28 middle layers x 2 iterations; 750B parameters
GLM-5.4 loop layout as summarized from Z.ai's blog by a Reddit poster in the AINews recap: 28 weight-shared middle layers run twice in a 750B-parameter model. AINews
40-75% of Transformer parameters
Loopback Transformer (paper authors) reaches lower validation loss than standard Transformers at 191M to 3B reference scales while using this share of their parameters, with training tokens and executed depth matched, on ClimbMix. Hugging Face
22 layers x 2 = 44 effective layers; ~2x compute
Raschka (via AINews) on Nanbeige 4.2-3B: similar memory footprint but roughly double the compute, with only partial token-efficiency retention versus a standard stack. AINews
  • Z.ai describes its loop transformer as a group of weight-shared layers that runs for several iterations, each pass refining the hidden states left by the previous pass. The result is a deeper network with the same parameter count. Simon Willison
  • Thinking Machines says Inkling 2 Mini runs only the middle layers of the model three times for every token. The layers before and after the middle run once. Simon Willison
  • In the Reddit summary of the GLM-5.4 post, the flagship is a pretrained GLM-5 base converted into a loop transformer: 28 middle layers share weights and run for two iterations. AINews

When it breaksPlain depth sharing collapses what layers do. The Gated Recurrent Transformer authors say that standard depth-sharing forces every pass through a uniform transformation. That collapses the diversity unique layers would have (input-grounding early, abstract refinement late) and degrades modeling quality. Hugging Face

Open questionWhat should one pass hand to the next: the residual stream, weighted individual updates, or only KV memory?

  • Pass weighted individual updates, with the input on a separate path and a recency prior over passes. Hugging Face
  • Let each layer attend to earlier loops' outputs, with loop-aware keys and a window of the latest W loops. Hugging Face
  • Pass only KV memory and restart each loop from the embeddings (MoLT-KV) to remove same-position cross-loop dependence. Hugging Face

How many passes

Fixed loop counts, deciders that give extra passes only to the tokens that benefit, and stop signals. The loop count is a dial between speed and quality at answer time.

  1. Pass ledger: what each pass did is read from the trace: which pass does the useful refinement, and which tokens gain nothing from another one.
  2. Fixed count: the simplest control gives every token the same number of passes, chosen once for the model (two in one shipped model, three in another).
  3. Iteration decider: an adaptive model trains a decider or router with the backbone; it gives an extra pass only to the tokens it predicts will improve.
  4. Stop gauge: a learned energy over the state falls as the state settles, and its value is the signal to stop looping.
  5. Depth cap: more passes are not always better. A count past what training supports plateaus or regresses, so the count is checked against results and sent back when it does.
2.74 vs 1.79 (53% steeper)
Accuracy-compute slope (accuracy gain per doubling of test-time decoding FLOPs) on AIME for TaH2 versus the non-looped baseline, reported by the TaH2 authors. Hugging Face
+2.8 points at depth 2; +3.9 at depth 8
TaH2 gain over the non-looped baseline as maximum iteration depth rises (TaH2 authors, AIME); existing looped models largely plateau as depth rises. Hugging Face
about 3.4 points above the baseline's peak accuracy
TaH2 authors: at matched test-time compute on AIME, TaH2 exceeds the non-looped baseline's peak accuracy by this margin. Hugging Face
99.9% on Sudoku-Extreme with 345x less inference compute
Energy-Based Reasoners authors: accuracy on Sudoku-Extreme, against the next-best recurrent reasoner, with comparable training compute. Hugging Face
SWE-bench Verified 43.0 to 64.4; Multi-SWE 14.0 to 31.0
LoopCoder-v2 authors: the two-loop 7B parallel loop coder versus the non-looped baseline, trained from scratch on 18T tokens with matched instruction tuning. Hugging Face
destructive actions 26.6% at 1 pass; 3.1% at 4 passes
A research variant relayed by AINews (karenzzhou via ziqiao_ma): more loop passes cut destructive actions. Single report, no method details in the recap. AINews
  • TaH2 gives extra loop iterations only to the tokens that benefit, instead of looping every token a fixed number of times. The authors found that many tokens gain nothing from extra iterations. Hugging Face
  • TaH2 post-trains the backbone together with an iteration decider. The decider is supervised by lookahead depth labels made online, which say whether one more iteration would improve the prediction. Hugging Face
  • Mixture-of-Recursions, which Raschka calls the more substantive precedent, uses a learned router to decide how many passes each token gets: easy tokens exit early and hard tokens get more compute. AINews

When it breaksFixed loop depth: steeper slope, lower result at matched compute. TaH2's authors post-trained existing looped transformers and measured the accuracy gain per doubling of decoding FLOPs. The slope was often steeper than the non-looped baseline, yet at matched compute the looped models still did worse, and they largely plateaued as depth grew. Hugging Face

Open questionShould every token get the same number of loop passes, or should a decider give extra passes only to some?

  • Adaptive: many tokens gain nothing from extra iterations, so a trained decider should give passes only to the tokens that benefit. Hugging Face
  • Fixed and small: a fixed loop count works if chosen by gain against cost; here two loops gave the gains and more regressed. Hugging Face
  • Adaptive for tool use: accuracy rises with depth but adding compute only when needed is the better compute trade. Hugging Face

Serving a looped model

What the loop costs when the model runs: latency per token, KV-cache and other state for every pass, and the designs that cut that cost (parallel loops, shared state, fewer passes).

  1. Pass meter: every sequential pass adds latency and a KV cache of its own, so a stack reused twice costs about twice the compute at about the same memory.
  2. Parallel loop lanes: the passes are run side by side with position offsets and one shared, windowed KV cache, so cost stops growing with the loop count.
  3. KV sharing shelf: later passes reuse one cache. It is close to lossless only when the model was trained for it; training at one fixed depth breaks it.
  4. Hybrid cache: the shipped flagship holds down its extra pass with a hybrid KV cache, a short KV window for the second pass and reuse of sparse-attention indexes.
  5. Latency scale: the looped model is weighed against a plain one: equal latency in one study, a tenth slower for far less memory in another.
3x smaller KV cache at 1.6B, same downstream average
Part II authors: learned depth prior with a 3x smaller KV cache against fixed-depth training with the full cache. Hugging Face
996.6 vs 1,000.6 ms latency (S-size, about 113M)
Mixture-of-Loops authors: U-MoLT with MoL-Hybrid-2 against non-looped OLMo3. Hugging Face
  • LoopCoder-v2 states the cost: sequential looping raises latency and KV-cache memory with the loop count. Parallel loop transformers cut it with cross-loop position offsets and shared-KV gated sliding-window attention. Hugging Face
  • In parallel loop transformers the loop count becomes a design choice because shared-KV sliding-window attention keeps the per-loop cost down, but each loop boundary adds a positional mismatch cost that stays roughly fixed while refinement gains shrink. Hugging Face
  • The Part II paper's serving tricks: terminal KV sharing for decoding with almost no accuracy loss, and a distilled student that prefills up to 1.79x faster. Hugging Face

When it breaksFixed-depth training breaks KV sharing. The Part II authors found that training at one fixed loop depth breaks KV sharing at decode time. A broad depth prior allows sharing but dilutes supervision at the target depth, so the cache saving has to be designed for at training time. Hugging Face

Open questionDoes a loop save or cost at serving time?

  • It saves bandwidth: bandwidth-bound decoding can reuse weights already on chip and add intelligence from idle compute (HN commenter). aurareturn
  • It costs: sequential loops raise latency and KV-cache memory with loop count, which parallel loops try to fix. Hugging Face
  • It is a trade: similar memory but about 2x compute and only partial token-efficiency retention. AINews

Looped models in the wild

The first released models with a loop: what their makers claim, what the measured numbers show, what they cost to use and how practitioners received them.

  1. Staged release: the first large looped model reached subscribers first; its API waits on a safety evaluation and its weights on hardening.
  2. Claim board: the makers state what the loop buys: more computation per token, so fewer tokens to reach the answer, and a quoted speed.
  3. Port bench: within days practitioners port the smaller model to their own runtimes and report speeds on consumer cards.
  4. Practitioner benchmark: private runs measure tokens, time and results against the claims, and against plain models of similar size.
  5. Next-model memo: what a release shows feeds the next one: the design was validated at four sizes before the flagship, and readers take the flagship as validation for a larger model.
~70-80 tok/s peak, up to 200 tok/s off-peak
GLM-5.4 inference speed as relayed from Z.ai's post by a Reddit poster in the AINews recap; the 750B model's claim compared with 2T-3T parameter models on long-chain reasoning. AINews
~200 tok/s decode, ~6,700 tok/s prefill on 2x RTX 3090, 196k context
Reddit user report in AINews of a custom vLLM port of Inkling 2 Mini for Ampere using the original weights with no further quantization; commenters were skeptical of setup-specific speeds. AINews
135 tok/s decode on one RTX 4090; >5000 tok/s prefill
A commenter's custom llama.cpp fork for Inkling, relayed by AINews; shows kernels matter as much as hardware. AINews
Inkling 2 Mini NVFP4 0.22 vs Qwen3.8-27B 0.34-0.39 on 9 engine bugs
One poster's private benchmark of agentic coding on 9 engine bugs relayed by AINews, with a high no-patch rate (13/27), 68k tokens and 23 min per task. AINews
  • Z.ai released GLM-5.4 to GLM Coding Plan users with 50% more weekly quota. API access waits on safety evaluation, weights are promised after safety hardening, and no benchmarks had been published at launch, which drew skepticism. AINews
  • Simon Willison could reach GLM-5.4 only through Z.ai's Coding Plan subscription; the regular API did not offer it. The plan's key worked on the same OpenAI-compatible Responses API endpoint. Simon Willison
  • Z.ai said it plans to open-source GLM-5.4 weights "responsibly" after safety hardening. Reddit commenters feared hardening could mean dulling cyber capabilities, and wanted open weights for defenders. Simon Willison

When it breaksInkling 2 Mini reads and reads but does not patch. A poster's agentic-coding run had Inkling 2 Mini scoring below Qwen3.8-27B, with a high no-patch rate, long runs (68k tokens, 23 min per task) and over-reading. A commenter said it needed 512k context instead of 131k to progress, and others suggested better chat templates. This contradicts the maker's fewer-tokens claim for this setup. AINews

Open questionDoes a looped model reason with fewer tokens, or only think longer in the harness?

  • Maker claim: the loop lets the model reach the right answer with fewer tokens. Simon Willison
  • Measured by a poster: Inkling 2 Mini uses 68k tokens and 23 minutes per task and often does not patch. AINews
  • A HN user complains that Chinese models' long thinking sessions second-guess even simple things and raise time to completion. lnenad

Sources

19 in all

More in Model Architectures

The Workshop: the whole area
  • Transformers & AttentionThe attention-based architecture behind nearly all modern LLMs.
  • Mixture of ExpertsModels where a router sends each token to a few specialist sub-networks.
  • Efficient AttentionAttention variants that scale better with length (sparse, linear, latent).
  • State Space ModelsRecurrent-style architectures (Mamba, RWKV) with constant memory per token.
  • Diffusion Language ModelsText models that refine a whole draft in parallel steps instead of writing left to right.
  • Small Language ModelsCompact models that are cheap to run and good enough for many tasks.
  • Decision Models (System One)Small 'System One' models that only decide, classify, route or score with typed outputs instead of writing text; cheap, fast building blocks inside agent systems (Jev, OpenAI Decisions API).