Loop Transformer Architecture: How LLMs Think Deeply With Fewer Tokens
A practical look at a loop Transformer design that shares weights to deepen computation without growing parameter count, plus three deployment optimizations, benchmark results, and why shorter outputs can still reflect deeper reasoning.
Loop Transformer Architecture: How LLMs Think Deeply With Fewer Tokens
Scaling large language models by simply adding parameters is running into two limits at once: rising compute cost and diminishing returns. A common view in the field is that adding depth improves logical reasoning more effectively than adding width. Naively stacking more layers, however, inflates both parameter count and memory use.
A recent flagship model from a leading AI company offers a different approach to that tradeoff. On a base of roughly 750 billion parameters, it introduces a looped reasoning architecture. Through weight sharing and multiple computation passes, it effectively increases network depth without increasing the total number of parameters. In testing, it also achieves a notable result: completing thinking with fewer tokens. This article breaks down the architecture and the engineering choices behind it.
1. Loop Transformer: Breaking the Parameter Ceiling With Shared Weights
From post-training tweaks back to the base model
Early in a model’s life cycle, many teams keep the same base and improve specific tasks through post-training such as instruction tuning and reinforcement learning. Those gains often hit an intelligence ceiling quickly. This next-generation model instead returns to the base architecture and adopts a Loop Transformer design.
The core change is to share weights across part of the network—for example, 28 layers—and run those layers for two forward passes. Weight-shared depth is not a new idea; the 2018 paper Universal Transformer already described it. The distinctive move here is not to pretrain a loop model from scratch, but to take an already pretrained conventional base and continue training it into a Loop Transformer. That conversion uses relatively little extra compute while raising the model’s capability ceiling.
How the loop reasons
In the first pass, the model mainly builds a global context state and extracts basic features. The second pass continues from that output and reasons more deeply. The result is an effectively deeper network. Because the weights are shared, the total parameter count does not grow, while the useful depth of the computation graph roughly doubles.
2. Deploying a Hundred-Billion-Scale Model: Three Engineering Optimizations
A loop improves capability, but its main cost is a sharp rise in memory use and inference compute. For a model on the order of 750B parameters, a naive loop would be too expensive to deploy. The team applied three optimizations.
Token-wise gated progressive write-back
In a conventional recurrent network, residual-stream updates are often full replacements, which on very large models can cause exploding gradients or overwrite useful information. This model uses a token-wise gated progressive write-back:
- Proportional write-back: Candidate updates from each pass are written back into the residual stream in proportion.
- Staged roles: The first pass builds a coarse global context. The second pass refines features and writes the final result back more fully.
Gating controls information flow and keeps the loop stable and useful.
Sharing KV cache across passes
The key-value (KV) cache is a major memory consumer during inference. If the second pass built a full new KV cache, memory use would roughly double.
The model combines cross-pass sharing with a sliding window:
# Pseudocode: reusing KV cache on the second passdef forward_pass_round2(input_tokens, kv_cache_round1):# Reuse a sparse subset of the first-pass KV cachereused_kv = get_sparse_kv(kv_cache_round1)# Compute KV only for a new sliding windownew_kv = compute_sliding_window_kv(input_tokens)# Merge for second-pass attentionfinal_kv = merge(reused_kv, new_kv)return attention(input_tokens, final_kv)
By not keeping a complete second cache, the deployment-cost increase versus the previous generation stays within a manageable range.
Reusing attention indices across layers and passes
In sparse attention, an indexer decides which tokens participate in computation. Recomputing those indices on the second pass adds noticeable latency.
The team extends a cross-layer index-sharing mechanism already validated on an earlier model—reusing the indexer every four layers. In the loop, the second pass directly reuses the sparse attention indices computed in the first pass. That removes a second retrieval and keeps both passes focused on the same regions, which improves inference efficiency.
3. Turning Extra Depth Into Better Thinking
What the benchmarks show
To test the loop, the team published a controlled comparison at the same 30B parameter scale. The control uses the same architecture as the 750B base. After supervised fine-tuning on 200K-token long context, both are evaluated in a thinking mode. Training compute rises by only about 10%.
With the loop enabled, scores move as follows:
- AIME25 (math competition): from 19.17 to 30.42
- GPQA-Diamond (graduate-level Q&A): from 47.58 to 56.26
- MMLU-Pro (knowledge and reasoning): from 71.65 to 75.05
The extra depth from looping translates into better performance on hard logic and math.
Why fewer tokens can mean deeper thought
Beyond accuracy, output length falls. On benchmarks such as GPQA and MMLU-Pro, average output length drops by 10% to 14%.
Large models often solve hard problems with very long chains of thought. Most of the reduction here comes from a shorter chain of thought. The reason is that some of the work that used to require many intermediate tokens—explicit, externalized reasoning steps—moves into the extra compute depth of the loop, as implicit internal reasoning. Before it emits a final answer, the model has already carried out deeper calculation internally, so it can show the same or greater depth of thought with fewer tokens.
4. What this means for enterprise AI
This practice is a useful reference for the industry. In cloud and enterprise deployments, compute cost remains a central constraint. Teams that run large models on cloud platforms, including services such as Baidu AI Cloud, routinely balance capability against infrastructure cost. A loop architecture challenges the assumption that stronger models must always mean vastly more parameters and much higher memory bills.
With shared weights and cache reuse, a model at the hundred-billion scale can offer deeper reasoning at a more practical compute cost. Shorter outputs also reduce end-to-end latency in API calls and product integrations. That matters for latency-sensitive workloads such as code generation, customer support, and complex data analysis. As designs like this become more widely available and are paired with elastic cloud capacity and efficient inference stacks, organizations can unlock deeper model capability at a better cost.
