# Looped Transformers: One Block, Many Laps

> Source: <https://pub.towardsai.net/looped-transformers-one-block-many-laps-674556bc42f7?source=rss----98111c9905da---4>
> Published: 2026-11-28 20:01:01+00:00

**Recommendation:** Reuse one block of k layers across L laps to cut stored weights to k while paying k x L in compute; Google's Saunshi and colleagues measured near-parity with a full k x L-layer model on synthetic reasoning.
More in the playbook "Inference and self-hosting": <https://wpnews.pro/playbooks/inference-serving>

A model with 70 billion weights, stored as 16 bit numbers, needs about 140 gigabytes of memory before it has read a single word. For years the recipe for a smarter language model was to make it deeper: more layers, each with its own weights, each one more memory to buy.

Looped transformers question that recipe. They ask whether depth really needs new weights, or whether the same few layers, used again and again, can do the same job.

The idea fits in four lines of code and a handful of cartoon boxes. In the last two years it has also left the theory papers. There are looped models you can download today, and a growing body of evidence about what they can and cannot do.

A transformer reads text by turning each piece of it (a token) into a vector of numbers, then passing the vectors through a stack of layers. Each layer does two things. Attention lets every token look at the others. A feedforward network then rewrites each token’s vector. After the last layer, a final step picks the next token.

Every layer has its own weights, learned during training. Layer 5 knows things that layer 6 does not. A model with 32 layers is a building with 32 floors and a different specialist on each one, as in the top row of the figure below.

A looped transformer keeps one block, which can be a single layer or a short group of layers, and feeds the output back into the input of the same block. In code, the whole idea fits in four lines.

```
h = embed(tokens)for lap in range(r):    h = block(h)        # same weights on every laplogits = head(h)
```

A block of k layers run for L laps costs the compute of k x L layers and stores the weights of only k. That is the whole trade: depth is bought with time, and the memory bill stays flat.

Everything else in this field is about making the trick work well: how to train it, how to feed it the input, when to stop, and what it can prove.

The idea is older than the current wave of language models. It started as a curiosity, became a compression trick, then turned into a theory of computation and, more recently, of reasoning.

The [Universal Transformer](https://arxiv.org/abs/1807.03819) (Dehghani and colleagues, Google, 2018) shared one block across all depths and added halting: each position in the sequence can stop early, with a mechanism called adaptive computation time. [ALBERT](https://arxiv.org/abs/1909.11942) (Lan and colleagues, Google, 2019) used the same sharing to shrink BERT. It shared weights across all layers, then spent the saved memory on a wider model that beat the original.

Then came theory. [Giannou and colleagues](https://arxiv.org/abs/2301.13196) (ICML 2023) wrote the weights of a looped transformer by hand. Their model reads its input like a punch card full of instructions and data, runs one instruction per lap, and emulates a basic calculator, a small linear algebra library, and even a learning algorithm. The loop is what lets a fixed set of weights run a program longer than the stack is deep.

[Yang and colleagues](https://arxiv.org/abs/2311.12424) (ICLR 2024) trained looped transformers to learn simple functions from examples in the prompt, such as sparse linear functions and decision trees. On those tasks, they beat standard transformers with far fewer weights.

The result closest to language models comes from [Saunshi and colleagues](https://arxiv.org/abs/2502.17416) at Google (ICLR 2025). On synthetic reasoning tasks, a transformer of k layers looped L times nearly matches a non-looped transformer of k x L layers.

They also show that T laps can simulate T steps of chain of thought, the technique where a model writes its reasoning before its answer. A loop, in other words, is a way of thinking without writing.

The first large-scale test came in early 2025 from Jonas Geiping, Tom Goldstein, and colleagues, with a model called [Huginn](https://arxiv.org/abs/2502.05171). It has 3.5 billion weights and was trained on 800 billion tokens. Its design is the easiest one to learn from.

The prelude turns tokens into a latent state, a vector the model uses as working memory. The core is the looped block. At every lap, it receives both the current state and the original input, so it never loses sight of the question. The coda turns the final state back into token probabilities.

Training has a clever twist. The state starts as random noise, and the number of laps is drawn at random at every training step. The model learns to work with any r, and at test time you pick it, like a dial that sets how long the model thinks.

The authors report that benchmark scores grow with r, up to a compute load equal to a 50 billion-weight model. The result has a critic. A [2025 follow-up](https://arxiv.org/abs/2507.02199) from Brown and Harvard researchers found that on the GSM8K math benchmark, extra laps helped only marginally and fell far short of models that reason with explicit chain of thought. Read both papers side by side.

A fixed r wastes effort. The word “the” and the hard step of a derivative get the same number of laps. Four papers give four answers.

The Universal Transformer halts per position. [Mixture of Recursions](https://arxiv.org/abs/2507.10524) (KAIST AI and Mila, with Google co-authors, NeurIPS 2025) adds lightweight routers that pick the number of laps for each token.

Because depth now varies by token, the model stores its attention cache per depth. That cache holds the keys and values, the summaries each token leaves behind so later tokens can look back at it.

The authors tested models from 135 million to 1.7 billion weights. At equal training compute, they report lower perplexity (the model is less surprised by real text), better few-shot accuracy (answers given a handful of examples in the prompt), and more tokens served per second.

[Relaxed Recursive Transformers](https://arxiv.org/abs/2410.20672) (Bae and colleagues, Google DeepMind, ICLR 2025) take another road. They turn a pretrained model into a looped one and add a small low-rank adapter (LoRA) for each lap, a tiny extra matrix that lets every lap behave a little differently.

Their Recursive Gemma 1B beats similar-sized models such as TinyLlama 1.1B and Pythia 1B. They also propose continuous depthwise batching, a way to serve many requests at once that, combined with early exit, reaches up to 2.76 times the throughput.

The fourth answer is Ouro, which learns an exit gate trained with an entropy-regularized objective, a penalty that stops the gate from always choosing the same depth.

[Ouro](https://arxiv.org/abs/2510.25741) comes from ByteDance and UC Santa Cruz. It is released in two sizes, 1.4 and 2.6 billion weights, trained on 7.7 trillion tokens, with open weights under the Apache 2.0 license on Hugging Face. The authors report that the two models match standard models of up to 12 billion weights on a wide set of benchmarks.

The Thinking variants, run at four laps, go further on math and science tests. The 1.4 billion model competes with 4 billion-weight models, and the 2.6 billion model matches or beats 8 billion-weight models. These are the authors’ numbers, and I found no independent replication yet.

Huginn is also open, under Apache 2.0, with a num_steps argument that sets the number of laps. The Mixture of Recursions code is public, with pretrained 360 million-weight checkpoints for the standard, recursive, and routed variants.

Two more models loop without being language models. The [Hierarchical Reasoning Model](https://arxiv.org/abs/2506.21734) (Sapient Intelligence, 27 million weights) runs two small recurrent modules at different speeds. The [Tiny Recursive Model](https://arxiv.org/abs/2510.04871) (Samsung SAIL Montreal, 5 to 7 million weights depending on the task) loops a single network of two layers. Both solve puzzles.

On ARC-AGI-1, a test of abstract visual puzzles, the Tiny Recursive Model reports 45%, and 8% on the harder ARC-AGI-2. On Sudoku-Extreme, it reaches 87.4%, against 55% for the Hierarchical Reasoning Model. That is a lot of reasoning from a network smaller than a single layer of a typical chatbot.

I found no frontier model from a major lab that is publicly confirmed to use looping. Every model above is a research release, and the largest has 3.5 billion weights. Whether the idea holds at tens of billions is the open question.

Chain of thought makes a model reason by writing. At every step, the model holds a rich picture in thousands of numbers, squeezes it into one token and keeps only that token. A loop skips the squeeze. The state stays as numbers, goes around again, and nothing is written until the answer is ready. Researchers call this latent reasoning.

The Ouro authors claim that this silent reasoning is more faithful than chain of thought, meaning their traces agree better with the final answer than written reasoning does.

Treat the claim with care: the Huginn critique found little evidence of step-by-step reasoning inside the loop. A silent model is also harder to inspect, because a person can read a chain of thought but cannot read a state vector.

The Ouro team ran controlled experiments on synthetic data and found about 2 bits of knowledge per weight for both looped and standard models. Looping does not add storage.

It improves what the model does with its knowledge, especially on tasks that combine facts or need several steps. A small looped model reasons better than a small standard model, and it still knows fewer facts than a large one.

Speed is the second limit. A run of r laps takes r times the compute, so a looped model saves memory and loses time. Naive implementations also pay in cache, because every lap leaves its own keys and values for every token. This is the problem Mixture of Recursions attacks.

Training is the third limit. The learning signal must flow back through every lap, a textbook setup for gradients that explode or vanish, so the training recipe matters as much as the architecture.

Three things will decide whether looped transformers become standard. The first is scale: I found no published looped model with tens of billions of weights. The second is evaluation: the strongest claims come from the authors of each model, and critics are already finding limits. The third is adoption: a major lab shipping a looped model would settle the first two questions faster than any paper.

Ravel’s Boléro repeats the same two melodies for about fifteen minutes and gets its drama from what changes around them. Looped transformers make the same bet: keep the block, change the state that flows through it.

[Looped Transformers: One Block, Many Laps](https://pub.towardsai.net/looped-transformers-one-block-many-laps-674556bc42f7) was originally published in [Towards AI](https://pub.towardsai.net) on Medium, where people are continuing the conversation by highlighting and responding to this story.
