Evolving LLMs Without More Parameters: Recurrent Architectures and Post-Training Explained

    This article examines how large language models can improve without increasing parameter count, focusing on a recurrent computation architecture combined with general-purpose coding post-training. It breaks down the core technical components, including reusing an existing base model, sharing weights across recurrent loops, stabilizing training with gating and normalization, and expanding coding capabilities beyond simple functions. It also covers inference-side optimizations such as KV cache sharing and paged cache management, offers a balanced assessment of what this approach solves and what remains unresolved, and provides practical deployment guidance.

    1. The Problem: A Growth Curve Beyond the Parameter Race

    For a long time, improvements in large language model capability have relied heavily on the simultaneous expansion of parameter scale and pre-training data volume. But this curve is becoming steep and expensive: a larger base model means longer training cycles, higher compute investment, and unavoidable memory and latency pressure during inference. As a result, the industry has begun exploring another path—achieving higher effective computation per parameter and better task adaptation through architectural changes and post-training reinforcement, while keeping the base model scale largely unchanged.

    This article uses a typical “recurrent computation architecture + general-purpose coding post-training” approach as a thread to unpack its technical foundation and provide a reusable engineering judgment framework. It does not involve any specific vendor’s model version; the discussion focuses on a general technical paradigm.

    2. Breaking Down the Technical Foundation: Four Interlocking Parts

    2.1 Reuse the Existing Base Model and Spend the Budget on “Depth” Rather Than “Width”

    The first principle of this approach is not to pre-train a larger model from scratch, but to reuse base model weights on the order of roughly 700 billion parameters. The benefit is direct: it eliminates the compute bill for a full pre-training run while preserving the base model’s existing world knowledge and language capabilities.

    The tradeoff is that simply adding layers linearly increases memory and inference costs. Therefore, the approach replaces “stacking layers” with recurrent computation: some layers are reused multiple times.

    2.2 Recurrent Computation Architecture: Trading Time for Depth

    The core method is to select several layers in the middle of the network (a typical configuration is around 28 layers) to form a “recurrent block” that can be entered multiple times, with two rounds of recurrent computation performed during the forward pass. A schematic structure is shown below:

    1. # Pseudocode: two rounds of computation in the recurrent block
    2. h = embed(tokens)
    3. for layer in layers_before_loop: # shallow layers before the loop
    4. h = layer(h)
    5. loop_input = h
    6. for step in range(2): # two rounds of recurrence, sharing the same set of weights
    7. h = loop_block(h, step=step) # step is a modulation signal used to distinguish rounds
    8. for layer in layers_after_loop: # deep layers and output head after the loop
    9. h = layer(h)
    10. logits = head(h)

    The intuitive meaning is that the model repeatedly “polishes” the same representation for two rounds, effectively increasing the computation depth while keeping the total parameter count unchanged. This is similar to solidifying the idea of adaptive computation at inference time into the pre-training stage—encoding “more computation” into the weights rather than leaving it to be dynamically decided at runtime.

    2.3 Training Stability: The Real Difficulty of Recurrent Structures

    The problem introduced by weight sharing is that the same set of parameters receives gradients with potentially conflicting directions across different rounds, which can easily lead to activation scale drift, gradient oscillation, and even the second round “degrading into noise.” Common stabilization techniques in the industry include:

    • Round gating: Introduce a learnable scalar or vector gate for each round to control that round’s contribution to the main representation, allowing the model to learn on its own “how far the second round should go.”
    • Normalization and residual alignment: Keep the residual path and normalization layer positions consistent at the loop entry and exit to avoid representation distribution misalignment across rounds.
    • Round embeddings/modulation signals: Inject the round index as a conditional input so that shared weights can distinguish “which round I am currently in.”
    • Gradient and learning rate strategy: Apply more conservative update magnitudes to the recurrent block and monitor the similarity of the two rounds’ outputs to prevent collapse.

    From an engineering perspective, it is recommended to treat “cosine similarity of the two rounds’ outputs,” “gate mean,” and “activation variance” as first-class monitoring metrics, rather than only looking at loss.

    2.4 Post-Training: Extending Coding Capability to “General-Purpose Coding” Scenarios

    The focus of the post-training stage shifts from “writing functions” to general-purpose coding: no longer limited to algorithm problems and scripts, but covering composite tasks such as 3D scene construction, video motion orchestration, game logic and state machines, and shader and rendering pipeline configuration. The characteristics of these tasks are: multiple files, strong context dependencies, and the need to simultaneously understand visual results and code structure.

    The corresponding data and training practices typically include cross-file repository-level samples, iterative trajectories with execution feedback, and paired corpora of “natural language intent → visualization result.” Evaluation must also be upgraded accordingly to end-to-end runnability, rather than single-point function correctness.

    3. Inference-Side Coordination: Don’t Let Memory Eat Up the Architectural Gains

    The recurrent architecture naturally brings the problem of repeated KV Cache access. If each of the two rounds maintains a complete cache, memory overhead will rise significantly. Feasible coordination and optimization directions are general and mature:

    1. KV Cache sharing: The two rounds of the recurrent block reuse the same key-value cache, appending writes only for newly added positions.
    2. Sparse attention index reuse: The sparse indices computed in the first round are directly reused in the second round, eliminating repeated scoring.
    3. Paged cache management: Allocate memory at the granularity of blocks (pages) to reduce fragmentation and reserved waste.
    4. Batching and scheduling coordination: Pool long-context requests and short requests separately to avoid long requests driving up overall P99 latency.

    A simplified capacity estimation approach:

    1. KV memory ≈ num_layers × 2(K,V) × sequence_length × hidden_dim × bytes_per_precision × concurrency
    2. After cache sharing, the recurrent-block-related term is no longer multiplied by the number of recurrent rounds

    This means that the compute saved on the architecture side will not be eaten up again on the memory side—this is the key criterion for whether the approach can be deployed.

    4. Objective Assessment: What It Solves and What It Doesn’t

    Already solved: Without expanding parameters, it has been verified that “architectural optimization + post-training” can indeed raise the ceiling of general-purpose coding; compared with the previous generation, the improvement is perceptible; and returning to a leading position in the first tier of domestic model competition shows that the technical path itself has not hit an obvious ceiling.

    Not yet solved: Compared with the world’s top coding models, there are still observable gaps in ultra-long-context repository-level refactoring, complex multi-turn debugging, and cross-modal artifact consistency. Moreover, competitors are also iterating rapidly, and the relative gap will not be erased by a single-generation release. The rational conclusion is: this is sustainable, gradual progress, not a one-time end to the gap.

    5. Deployment Recommendations on Baidu AI Cloud

    To use this type of model with a recurrent architecture and strong coding capabilities in a production environment, it is recommended to design in layers as follows:

    • Model service layer: Prioritize managed inference services that support long context and stable concurrency, and check whether they have cache reuse and elastic scaling capabilities.
    • Storage layer: Store repository code and build artifacts in object storage with versioning; avoid putting large files into the prompt context.
    • Asynchronous and decoupled: Use a message queue to smooth out peaks for time-consuming tasks, and retrieve results via callbacks or polling after they are written back.
    • Containers and orchestration: Use a container platform to host evaluation and sandbox execution environments, ensuring that multi-file generation results can be run and verified in an isolated environment.
    • Observability: Use logging services and monitoring alerts to collect first-token latency, throughput, cache hit rate, and peak memory per request, forming a capacity baseline.

    For the deployment process, it is recommended to proceed in three stages: “offline evaluation set → small-traffic canary → full rollout,” and to use end-to-end runnability and manual rework rate as core acceptance metrics, rather than only looking at the impression of single-round question answering.

    6. Conclusion

    Parameters are no longer the only lever. Recurrent computation compresses “deeper thinking” into the same set of weights, gating and normalization keep training from collapsing, cache sharing on the inference side makes the math work out, and post-training pushes capabilities from code snippets to composite scenarios like 3D, motion, and games. For developers, what is truly worth paying attention to is not the ranking of a single release, but this replicable, measurable, and sustainable optimization paradigm—it determines where the next generation of improvements will come from.