The Block · T1 Models & inference

Looped transformer

Last reviewed 30 Nov 2026by Pratima Chainani

A transformer that runs the same block of layers more than once for each token. Each extra pass adds compute at inference time without adding weights, so one model can think harder or answer faster, set by the pass count.

A normal transformer sends each token through its stack once, from the first layer to the last. A looped transformer reuses the weights of one block, often the middle layers, and runs that block several times before it decodes the next token. The number of runs is the pass count, or loop count. The same idea also goes by Universal Transformer, recurrent depth and recursive transformer.

Why it matters: it is a third way to scale, next to more parameters and more data. Saunshi et al. (2025) show that on reasoning tasks a looped model can come close to a much deeper model with no looping. The Ouro paper (October 2025) found that looping did not add stored knowledge, about 2 bits per parameter either way, but improved how the model uses what it knows; its 1.4B looped model at 4 steps was competitive with 4B models.

The cost: every pass is another trip through the block for every token. A 2026 paper on looped coding models puts it plainly: sequential looping increases latency and KV-cache memory with the loop count. In our test of a 26B looped model on two T4s, decode speed went from about 62 tokens a second at 1 pass to 16 at 3 and 9 at 5.

Where it runs: llama.cpp added looped models in pull request #32694, and #32704 fixed the loop-pass scale. You set the count when the server starts. Research in 2026 moved fast: Hyperloop Transformers from MIT (April), training-free looping of mid-stack layers in a frozen checkpoint (May), linear-time looped transformers (May) and LoopCoder-v2 (June).

The limits: more passes are not always better. In our test, 5 passes solved no more coding tasks than 3 and took almost twice the time. On a fact question, 3 passes spent its whole 4,000-token budget and gave no answer. One run per cell, one repo, one model: a direction, not a benchmark.

Common misread

More loops means a smarter model.

More loops buy more depth per token. Past a point, you pay the time and get the same answer.

For your code

Treat the pass count as a thinking budget. Run your own tasks at 1, 3 and 5 passes with hidden checks, and pick the lowest count that holds the score.

For your roadmap

Track tasks solved per GPU-hour, not tokens per second. A higher pass count is the same weights running slower; plan capacity for it.

Sources

  1. Saunshi et al., Reasoning with Latent Thoughts: On the Power of Looped Transformers · Feb 2025
  2. Geiping et al., Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach · Feb 2025
  3. Zhu et al., Scaling Latent Reasoning via Looped Language Models (Ouro) · Oct 2025
  4. Zeitoun, Torroba-Hennigen and Kim, Hyperloop Transformers · Apr 2026
  5. Chen et al., Training-Free Looped Transformers · May 2026
  6. Deng et al., LT2: Linear-Time Looped Transformers · May 2026
  7. LoopCoder-v2: Only Loop Once for Efficient Test-Time Computation Scaling · Jun 2026
  8. llama.cpp PR #32694, looped models and PR #32704, loop-pass scale fix

More on T1 Models & inference

Every term, by layer