The Evolution of Large Language Models: Architecture Efficiency and the Leap in Reasoning
This article traces the main thread of large language model progress over the past two years: raising the capability baseline of dense models with high-quality data and stable training strategies, resolving the tension between parameter scale and inference cost through sparsification, moving from "answering" to "reasoning" with reinforcement learning, and bringing models into real engineering scenarios via long context and multimodality. It is organized by capability dimension rather than strict chronology, and for each step it covers the design motivation, the cost, and the engineering essentials, closing with practical guidance on model selection, training routes, and cost control.
1. Introduction: Why a Complete Technical Thread Matters
Progress in the large language model space over the past two years may look scattered, but there is a clear internal logic to it: first raise the capability baseline of dense models with high-quality data and stable training strategies; then use sparsification to resolve the conflict between parameter scale and inference cost; then use reinforcement learning to move from “can answer” to “can reason”; and finally use long context and multimodality to pull models out of the chat window and into real engineering scenarios.
The value of this path for developers is that it is not a pile of isolated papers but a reusable decision framework. When you choose a model, fine-tune it, control inference cost, or assess whether the context length is sufficient, you are essentially making trade-offs along the same chain. The sections below are organized by capability dimension rather than pure chronology, and each step fills in the design motivation, the cost, and the key points for engineering adoption.
2. The Capability Baseline: Pretraining Dense Models and “Long-Termism”
The core contribution of the early work was not a particular trick but a judgment: the long-term payoff of data quality and training strategy usually outweighs short-term pushes on individual metrics. In engineering terms, long-termism comes down to three things — data mixing and deduplication should follow a clear iteration cadence; training scale and data volume should maintain an explainable relationship; and evaluation should not look at a single leaderboard but at the balance of multiple capabilities such as code, math, and general reasoning.
The practical takeaway is direct: with a limited budget, rather than repeatedly tuning the learning rate, put more than 90% of your effort into data cleaning, deduplication, quality tiering, and mixing experiments. The reason a model family ranging from 7B to 67B can match larger dense models on code and math is precisely this structured investment on the data side.
3. Sparsification: Fine-Grained Experts Working with Shared Experts
The conflict that a mixture-of-experts architecture must resolve is this: total parameters determine knowledge capacity, while activated parameters determine inference cost. The conventional approach uses a few large experts, routing granularity is coarse, experts tend to become homogeneous, and load is easily skewed.
Two key changes shifted this situation:
- Fine-grained expert segmentation: split experts into smaller and more numerous units, so routing changes from “pick one large block” to “combine several small blocks.” A single token can activate a combination of several experts, and expert specialization increases markedly.
- Shared expert mechanism: reserve a portion of experts that are always activated for every token, carrying common information such as general knowledge and syntax, while the remaining experts focus on domain differences.
The routing logic can be understood schematically as follows:
# Pseudocode: forward pass with fine-grained and shared expertsshared = shared_experts(x) # every token passes throughscores = router(x) # score N fine-grained expertstopk_idx, topk_w = top_k(scores, k=3) # combined activationrouted = sum(shared_w * experts[i](x) for i, w in zip(topk_idx, topk_w))y = shared + routed
The engineering payoff is that total parameters can be very large while each token activates only a small fraction of them, approaching or even matching larger dense models under the same compute budget. The cost is higher memory footprint and greater complexity in routing load balancing, which has to be tuned together with an auxiliary balancing loss, a capacity factor, and an expert parallelism strategy.
4. Code and Math: From General Capability to Verifiable Capability
Code and math became breakthrough areas because they offer a signal that can be verified automatically: whether test cases pass, whether an answer can be compared. This makes both data construction and evaluation scalable.
For code, the key points are breadth of coverage and sufficiency of training: multiple programming languages, repository-level context, and sufficient pretraining from scratch are what allow a model to surpass contemporaneous closed-source offerings on public coding benchmarks. The breakthrough in math, by contrast, came from a change in the training paradigm, which the next section covers.
5. Reasoning: A Critic-Free Reinforcement Learning Algorithm
Conventional proximal policy optimization needs to maintain both a policy model and a value model (the critic), doubling memory and engineering complexity. A class of critic-free methods changes advantage estimation to a within-group relative computation: sample a group of outputs for the same prompt, normalize with the mean and standard deviation of the rewards within the group, and obtain relative advantages directly.
Sample G responses o_1 ... o_G for the same promptRewards r_1 ... r_G (from rules, a verifier, or a reward model)Advantage A_i = (r_i - mean(r)) / std(r)Objective: maximize advantage-weighted likelihood - β · KL(policy || reference model)
The direct benefit is eliminating a value network the same size as the policy, making training cheaper in memory and easier to scale; at the same time, within-group comparison naturally fits tasks whose answers can be verified. On the engineering side, watch how the sampling temperature pairs with the group size, how sparse the reward design is, and how the strength of the KL constraint affects output diversity. This method later became one of the core training techniques for reasoning-oriented models.
6. Multimodality and Document Understanding: Connecting Capability to Real Business
For the vision-language direction, the key is not “being able to see images” but the parsing quality of information-dense carriers such as charts, tables, scans, and layout structure. Adoption typically requires layout analysis and reading-order restoration, table structuring, and the design of a connector between the visual encoder and the language model. Document understanding puts more emphasis on chunking long documents, retrieval, and consistency of cross-page references.
7. Long Context: Engineering Constraints at the Million-Token Scale
Pushing context to the million-token scale moves the difficulty from modeling to engineering:
- Attention cost: quadratic complexity needs sparse, chunked, or linearized modifications to be mitigated;
- Position extrapolation: the gap between training length and inference length calls for a suitable position-encoding extrapolation strategy;
- Memory and throughput: the KV cache becomes the main bottleneck, and paged cache management, prefix reuse, quantization, and offloading are common remedies;
- Quality decay: utilization of information in the middle declines, so retrieval and context compression are needed alongside.
A pragmatic rule of thumb: most business scenarios do not need a true million-token context but rather “stable long context plus controllable cost.” If you use general-purpose cloud capabilities, you can combine object storage to hold long documents, a message queue for asynchronous parsing, a container platform to host inference services, and a logging and monitoring system to track latency and failure rates.
8. Adoption Guidance: Selection, Training, and Cost
- Define the verification signal first: whether the task can be scored automatically determines whether you take a supervised fine-tuning or a reinforcement learning route.
- For sparse models, look at total memory: small activated parameters do not mean small memory requirements; capacity and parallelism strategy must be planned together.
- Buy long context as needed: prioritize prefix reuse and retrieval before extending the window.
- Layer your evaluation: track capability evaluation, business evaluation, and cost evaluation at the same time.
- Put observability first: only by bringing latency, throughput, failure rate, and token consumption into unified monitoring can you do the subsequent optimization.
9. Conclusion
From dense baselines to sparse experts, from verifiable tasks to reinforcement-learning reasoning, and then to multimodality and long context, the common theme of this thread is structured efficiency optimization under constraints. Understanding the design motivation and the cost of each step has more long-term value than memorizing any single metric.
