# Looped Transformer

> A looped transformer is a transformer that applies the same block of weight-shared layers several times within one forward pass, so the model gains effective depth and computation without adding parameters.

- Identifier: PTL-0274
- Category: Foundations
- Canonical URL: https://protologue.com/t/looped-transformer/
- Also known as: loop transformer, looped language model, LoopLM, Universal Transformer, weight-tied recurrent depth, recurrent-depth transformer
- Introduced: 2018

## Description

Dehghani et al. proposed the Universal Transformer in 2018, which applies one shared transformer block recurrently across depth and adds a dynamic per-position halting mechanism. Giannou et al. used the name "looped transformers" in 2023, showing that a looped 13-layer transformer with fixed weights can run small programs such as a basic calculator and linear algebra routines. Zhu et al. pretrained a family of looped language models, Ouro, on 7.7T tokens in 2025, with iterative computation in latent space and an entropy-regularized objective for learned depth allocation; they reported that their 1.4B and 2.6B models match the results of up to 12B state-of-the-art models, an advantage they attribute to knowledge manipulation rather than knowledge capacity. The approach is described as a way to scale reasoning in latent computation rather than in generated tokens. The term spread in November 2026 when Z.ai described GLM-5.4 as its first "Loop Transformer", which by Z.ai's account reuses 28 layers of the GLM-5 base model across two iterations with per-token gates for each iteration, and on most benchmarks shortens average output length by 10 to 14%; these figures are vendor-reported. Z.ai also notes that the model can get caught in overly long thinking.

## Broader terms

- [Transformer](https://protologue.com/t/transformer/)

## Related terms

- [Test-Time Compute Scaling](https://protologue.com/t/test-time-compute-scaling/)
- [Reasoning Model](https://protologue.com/t/reasoning-model/)
- [Overthinking](https://protologue.com/t/overthinking/)
- [Mixture of Experts](https://protologue.com/t/mixture-of-experts/)
- [Neural Scaling Laws](https://protologue.com/t/neural-scaling-laws/)

## Sources

- Dehghani et al. (2018). Universal Transformers. https://arxiv.org/abs/1807.03819
- Giannou et al. (2023). Looped Transformers as Programmable Computers. https://arxiv.org/abs/2301.13196
- Zhu et al. (2025). Scaling Latent Reasoning via Looped Language Models. https://arxiv.org/abs/2510.25741
- Z.ai (2026). GLM-5.4. https://docs.z.ai/guides/llm/glm-5.4

## Cite this entry

Protologue. (2026). Looped Transformer. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.9.1, PTL-0274). https://protologue.com/t/looped-transformer/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
