Loop Transformers: How a 750B Model Uses Fewer Tokens for Deeper Reasoning
A 750B-parameter model uses a weight-shared Transformer block twice to increase computational depth without adding parameters. This article explains how post-training enables the conversion, how token-level gating and attention reuse help control inference costs, and why a 30B comparison model scored higher on several reasoning benchmarks while generating shorter outputs.
1. A Second Scaling Path Beyond Parameter Count
The traditional way to improve large language models is to add layers and parameters. At the scale of hundreds of billions of parameters, however, each additional layer puts pressure on memory, communication, and inference latency, making both training and deployment more expensive.
Weight-shared recurrence offers a different path. The Universal Transformer paper, introduced in 2018 and published at ICLR in 2019, proposed running the same Transformer layers repeatedly. The central idea was that depth could come from how many times a block is executed, not just from how many distinct layers the model contains. Given the compute and training constraints of the time, the approach largely remained a research direction.
A recent implementation brings that idea to a flagship model with roughly 750 billion parameters. It runs a block of about 28 layers twice, reusing the same weights on both passes. The model therefore gains effective depth without increasing its parameter count.
2. Why a Second Pass Can Improve Reasoning
2.1 How the Loop Works
In a conventional Transformer, the input passes through a sequence of layers once, with each layer using its own weights. A looped architecture instead applies the same block to the evolving hidden state more than once:
# Illustrative pseudocodex = embedding(input)for round in range(2): # Run two passesfor layer in shared_layers: # Reuse the same 28 layers on each passx = layer(x)output = head(x)
The second pass is not simply a repeat of the first. It receives a hidden state that the first pass has already transformed, giving the same layers a chance to refine that representation. The distinction is similar to reading a text once for its overall meaning and then rereading it to pick up details and relationships.
2.2 Converting a Pretrained Model Instead of Starting Over
Pretraining a looped model from scratch is expensive, and convergence is not guaranteed. A more practical route is to start with an already pretrained base model and use additional training to adapt it into a Loop Transformer. This can raise the model’s capability ceiling without repeating the full pretraining process.
That makes the conversion different from an update that keeps the same architecture and relies on better post-training alone. Although the conversion also happens after pretraining, it changes how the base model computes its representations.
3. Three Engineering Optimizations That Control Inference Cost
Sharing weights keeps the parameter count fixed, but executing a block twice still adds computation and can increase memory use. At the 750B scale, the implementation uses three techniques to keep that overhead manageable.
3.1 Token-Level Gating for Progressive Updates
Not every token benefits equally from a second round of refinement. A per-token gate controls how much of each pass’s proposed update is written back to the residual stream:
- First pass: Establish the overall context and build a coarse representation.
- Second pass: Refine that representation, applying larger updates where they matter most.
The gate controls how strongly the second pass changes each token’s representation. It does not, by itself, mean that the second-pass computation is skipped.
3.2 Sharing the KV Cache Across Passes
If the second pass built and stored its own full key-value (KV) cache for all tokens, the memory needed for those caches could nearly double. Instead, the second pass reuses the first pass’s sparse KV cache and adds only enough KV state for a sliding window.
Sparse attention already helps control long-context costs. Reusing the sparse cache across passes limits the additional memory required by the loop compared with the non-looped model.
3.3 Reusing Sparse Attention Indices
The second pass also reuses the sparse attention indices selected during the first pass, avoiding a second lookup. This extends an earlier cross-layer optimization, in which the attention indexer was reused across groups of four layers, to reuse across loop passes.
4. Benchmark Results: Higher Scores With Shorter Outputs
4.1 A Controlled Comparison at the Same Parameter Count
To isolate the effect of looping, a reported comparison used a 30B model with the same architectural design as the 750B base. After supervised fine-tuning (SFT) on 200K long-text examples, the models were evaluated with reasoning mode enabled. Adding the loop increased training compute by about 10% and improved scores across several benchmarks:
- Competition mathematics: From about 19 to above 30.
- PhD-level science questions: From about 48 to 56.
- General knowledge: From about 72 to 75.
In this comparison, roughly 10% more training compute yielded a relative gain of more than 50% on the math benchmark.
4.2 More Internal Computation, Fewer Generated Tokens
Across several benchmarks, average output length fell by 10–14%, with most of the reduction coming from the generated reasoning traces. This suggests that the extra computational depth can take on some of the work the model would otherwise do by generating more intermediate reasoning tokens.
That distinction matters for deployment. A second pass adds work per token, but shorter reasoning traces mean fewer tokens to generate. On the reported benchmarks, outputs became shorter even as scores improved. The inference trade-off is therefore not just how much each token costs, but how many tokens a task requires.
5. Generation Speed and Applications
Reported generation speeds reached up to 200 tokens per second during off-peak periods and around 70–80 tokens per second during peak periods. Shorter outputs can further reduce the time it takes to complete a task.
One application direction is using code as a way to complete tasks beyond conventional software development. Examples include:
- Multimodal content generation: Render visuals in real time with front-end code, use a third-party model to generate music, and combine the results into a music video.
- Interactive 3D scenes: Combine geometry and shader programming to build scenes users can interact with in real time.
- Engineering modeling and simulation: Use open-source modeling tools to build a robotic arm model and simulate its motion, turning a natural-language requirement into an engineering artifact that can be tested.
6. What Loop Architectures Change
- Depth can grow without adding parameters. Reapplying a weight-shared block offers another way to improve capability when increasing parameter count delivers diminishing returns.
- Inference can trade output length for internal depth. The loop shifts some work from generating intermediate reasoning tokens to refining hidden states.
- Deployment depends on system design. Token-level gating, cross-pass KV-cache sharing, and attention-index reuse work together to make looping practical at this scale.
For teams training or fine-tuning their own models, converting a pretrained model to a looped architecture is an option worth evaluating alongside conventional post-training. Gradual release of model weights and APIs following safety evaluations could support independent validation and further development. The number of passes, gating strategy, and cache design remain open areas for experimentation.
