Recurrent Depth for More Tokens: Inside a Recurrent Inference Architecture
This article breaks down how a recurrent Transformer architecture adds compute depth without increasing parameter count, and why that can improve reasoning while reducing output tokens. It covers the core mechanism of looping over shared weights, the three optimizations that make the structure deployable at around 750B parameters—per-token gated write-back, cross-loop KV cache sharing, and attention index reuse—along with benchmark results, "general Coding" use cases, and practical guidance for evaluating cost, latency, and task-level performance.
1. The Starting Point: Parameters Keep Growing, Returns Keep Shrinking
Over the past few years, gains in large model capability have relied heavily on two paths: pushing base model parameters higher, and investing more compute in post-training for alignment and reasoning reinforcement. Once models reach the hundreds-of-billions parameter range, engineering teams run into two constraints at the same time: the marginal cost of training and inference rises quickly, and capability gains from simply adding parameters become increasingly unstable. This raises a more practical question: can a model “think deeper” while keeping its parameter count roughly unchanged?
A recently published flagship model from a cloud vendor offers a representative answer. It uses a recurrent Transformer structure, replacing the 28 stacked layers in the base model with shared weights executed over two loops, increasing compute depth while keeping the parameter count at around 750B. The idea is not mysterious; research on “depth structures with weight sharing” was proposed around 2018 and formally published at later conferences. The real engineering value is that they did not pretrain from scratch. Instead, they took an already pretrained base model and converted it into a recurrent structure through continued training, trading relatively limited compute for a higher capability ceiling.
One common misunderstanding needs clearing up here: a recurrent structure is not “running the model twice.” The second loop is not an independent recomputation; it continues to reason on top of the residual stream produced by the first loop, effectively yielding a deeper network. This also explains why it can improve capability rather than simply doubling inference time.
2. Why Recurrent Inference Can “Think with Fewer Tokens”
Traditional chain-of-thought externalizes the reasoning process into a token sequence: every additional step of thought requires generating more text. This has two side effects—longer outputs, higher latency, and higher cost. The clever part of recurrent inference is that it moves part of the “thinking” from the token stream into compute depth.
The mechanism can be understood this way: the first loop establishes a global context state and forms an overall representation of the problem; the second loop refines on that basis and writes the result fully back into the residual stream. Because the extra reasoning happens inside the model rather than in the output sequence, the model does not have to “say” every intermediate step.
A public controlled experiment with the same parameter count provides a quantitative reference. The control model has exactly the same architecture as the base model. After long-context supervised fine-tuning on the order of 200,000 tokens, thinking mode is enabled, increasing training compute by about 10%. With the recurrent structure enabled, math competition benchmarks rose from 19.17 to 30.42, graduate-level science Q&A rose from 47.58 to 56.26, and a multidisciplinary evaluation rose from 71.65 to 75.05. More notably, output length dropped: on some benchmarks, average output fell by 10% to 14%, with the reduction coming mainly from the chain of thought.
The engineering implication of this data is clear: capability gains and token savings can happen at the same time, rather than being an either/or choice. For token-billed business scenarios, this means the cost per task has a chance to decrease. For interactive applications, improvements in time to first token and overall latency are often more noticeable to users than score gains.
3. Three Key Optimizations That Make the Recurrent Structure Deployable
The main cost of a recurrent structure is memory and inference overhead. Without special handling, the second loop brings doubled cache, repeated retrieval, and uncontrolled write-back. Public materials indicate three main changes were made for the 750B-class model.
1. Per-Token Gated Progressive Write-Back
Instead of overwriting the candidate changes from the second loop as a whole, the model writes back into the residual stream per token and by proportion. The logic can be expressed schematically:
# Illustration: per-token gated write-back, not a real interfacefor t in range(seq_len):gate = sigmoid(gate_net(hidden[t])) # independent gate per tokencandidate = layer2(hidden[t]) # second-loop candidate changeresidual[t] = residual[t] + gate * candidate
The value here is stability: the first loop has already established a usable global state, and the second loop only performs local refinement, avoiding the representation drift caused by “rewriting the whole segment.” In practice, gate initialization and temperature affect convergence speed; typically the gate needs to start conservative and then open up gradually.
2. Cross-Loop Cache Sharing
The second loop reuses the sparse KV from the first loop and only adds a sliding-window KV, without keeping the full cache. This has a major impact on memory usage. Under a naive implementation, two loops mean two full caches; after sharing, the increment is only the window portion. Public statements say this design keeps the deployment cost increase relative to the previous generation under control.
From a deployment perspective, the cache strategy directly determines the supported concurrency and context length. In engineering, this usually needs to be combined with paged cache management, prefix reuse, and batch scheduling to turn the memory advantage into actual throughput.
3. Cross-Loop Attention Index Reuse
The second loop directly reuses the sparse attention index computed in the first loop, without repeated retrieval. This idea follows an index-sharing mechanism already released in an earlier generation—reusing the indexer once every four layers. Its essence is to acknowledge that “retrieval patterns are highly similar between adjacent layers and adjacent loops,” using one retrieval to serve multiple attention computations.
Together, the three optimizations form a complete loop: write-back control manages quality and stability, cache sharing manages memory, and index reuse manages retrieval overhead. Without any one of them, recurrent depth could degrade into something that is “theoretically smarter but cannot run in engineering.”
4. From Base Model Conversion to “General Coding”: The Path of Capability Spillover
Public materials position this generation of the model as the starting point for “general Coding”: code is no longer a single category but a foundational capability for completing a broader range of tasks. Listed cases include using frontend code to draw scenes in real time and calling a third-party music model to generate an MV, using mathematical geometry and shaders to build interactive 3D scenes, and completing robotic arm modeling and motion simulation through parametric modeling and rendering tools.
These tasks share common traits: ambiguous goals, many steps, and a need for multiple rounds of self-correction. The “one extra internal round of thought” brought by recurrent depth matches exactly this kind of scenario that requires repeated reasoning. For developers, this means the evaluation focus should shift from “single-turn Q&A accuracy” to “multi-turn task completion rate” and “average number of interaction turns.”
5. Engineering Recommendations: How to Evaluate and Integrate
If you are evaluating whether to adopt a recurrent-inference model, it is recommended to proceed in this order:
- Start with a same-parameter comparison: Fix the base model and post-training data, switch only whether the recurrent structure is enabled, and observe capability gains and output length changes, avoiding mistaking post-training gains for architecture gains.
- Measure input and output costs separately: Recurrence mainly increases compute depth; after input-side cache sharing, the increment is limited, while the output side may actually decrease due to a shorter chain of thought, so the two need to be accounted for separately.
- Stress-test peak and off-peak latency: Public information shows a maximum of 200 tokens per second during off-peak hours and 70 to 80 tokens per second during peak hours; capacity planning should use the peak value.
- Watch cache and concurrency limits: Although cross-loop shared cache reduces memory, paged and eviction strategies still need validation when long context and high concurrency are combined.
- Build a task-level evaluation set: Bring multi-turn tool calls, code generation and correction, and long-document reasoning into the same set of metrics; looking only at benchmark scores is easy to distort.
On the infrastructure side, this class of models places finer demands on container platform elastic scaling, log service trace tracking, and monitoring and alerting for latency and memory metrics. Making the number of recurrent loops, cache hit rate, and gated write-back ratio observable metrics is a prerequisite for subsequent tuning.
6. Conclusion
The value of recurrent inference lies not in any single technique but in a clear trade-off: trading controllable inference overhead for compute depth, and internal reasoning for lengthy chains of thought. For teams, the real work is to establish an evaluation method where “architecture gains and post-training gains are separable,” and to put memory, latency, and token cost on the same table for decision-making. When capability gains no longer rely only on stacking parameters, refined engineering design becomes the new competitive line.
