The Evolution of Large Language Models: Architecture Innovation and the Reasoning Leap

    This article traces the technical evolution of large language models along a single main line: from general-purpose dense foundations, to sparse Mixture-of-Experts restructuring, to depth in verifiable domains such as code and math, then to multimodal and long-context capabilities, and finally to reinforcement learning for reasoning. It explains why data quality and training strategy often outperform simply scaling parameters, outlines practical data-mix considerations, summarizes fine-grained and shared expert design with its engineering trade-offs, introduces GRPO as a critic-free policy optimization method, and closes with deployment advice on tiered model selection, evaluation baselines, cost modeling, and compliance. Readers will gain a reproducible framework for making model and infrastructure choices under compute, data, and budget constraints.

    1. Why a Single Evolution Main Line Matters

    Over the past two years, the most notable shift in the large model space has not been a monotonic increase in parameter count, but the simultaneous rise of two curves: efficiency and reasoning ability. Early on, the industry concentrated resources on enlarging dense parameters. Over time, teams realized that under limited compute and data budgets, returns are actually determined by data quality, the long-term payoff of training strategy, and how effectively activated parameters are used. A clear main line then emerged: start with a general-purpose model as the base, improve parameter efficiency through sparsification, build depth in verifiable domains such as code and math, add the visual modality, and finally use reinforcement learning to move from “can calculate” to “can reason.”

    The value of this main line is its reproducible engineering meaning. For developers, it means there is no need to blindly chase the largest model; goals can be decomposed into four layers: base capability, sparse structure, domain data, and alignment algorithms. For enterprise users, it provides a basis for technology selection under constraints of in-house compute, data compliance, and cost.

    2. Foundation Stage: General Base Models and Training Philosophy

    The core task of the first stage is to make the base solid. The typical approach is to train a family of dense models ranging from billions to tens of billions of parameters, pretrain them on trillions of tokens, and adopt a long-termist view of training: treat data processing, deduplication, mixing ratios, and training strategy as long-term assets rather than over-tuning around short-term leaderboard metrics.

    Two conclusions from this stage are most worth borrowing. First, open-source base models can already approach the level of early closed-source models under a reasonable budget, with the gap narrowing noticeably on code, math, and reasoning tasks. Second, the marginal return of data engineering is often higher than simply adding parameters. A common mixing approach looks like this (illustrative, not a fixed formula):

    1. Total corpus = general web pages (about 60%~75%)
    2. + code and structured text (about 15%~25%)
    3. + math and scientific text (about 5%~10%)
    4. + high-quality instructions and synthetic data (under about 5%)

    The ratio is not a universal constant; it should align with the target scenario. Teams focused on engineering delivery can raise the proportion of code and documentation, while research-oriented teams can raise the proportion of math and formal text.

    3. Sparsification: Fine-Grained Experts and Shared Experts

    The key leap in the second stage is converting a dense structure into a Mixture of Experts (MoE). Early industry designs typically used a small number of “large experts,” which left a limited routing space and limited expert specialization. Two improvement directions exist, and they complement each other:

    • Fine-grained expert splitting: divide experts into more, smaller units, expanding the number of available combinations under the same activation budget so that different tokens can be dispatched more precisely.
    • Shared expert mechanism: keep a subset of experts that are always activated for every token, carrying common capabilities such as general knowledge and grammar, so the remaining routed experts can focus on differentiated patterns.

    The direct benefit of this design is “very large total parameters, very small activation per token.” For example, with total parameters in the hundreds of billions and only about 30% activated per token, performance can match a dense model of the same generation. Three engineering points need attention: first, routing load balancing, to avoid a few experts being overloaded; second, communication overhead, since expert parallelism introduces extra collective communication; third, training stability, where routing entropy and confidence need to be monitored.

    1. # Pseudocode: forward pass with fine-grained and shared experts
    2. def moe_forward(x, router, shared_experts, routed_experts, top_k):
    3. shared = sum(e(x) for e in shared_experts) # always activated
    4. logits = router(x) # routing scores
    5. idx, w = topk_softmax(logits, k=top_k) # sparse selection
    6. routed = sum(w[i] * routed_experts[idx[i]](x) for i in range(top_k))
    7. return shared + routed

    4. Building Depth: Code Intelligence and Mathematical Reasoning

    With an efficient base in place, the next step is to build depth in verifiable domains.

    For code, the approach is to train a program-oriented model from scratch, pretrain it on trillions of tokens of code corpus covering dozens of programming languages, and emphasize modeling repository-level context and dependencies. For evaluation, beyond function-level benchmarks, it is worth tracking repository-level completion, cross-file references, and compile pass rate, because these metrics are closer to real development scenarios.

    For math, one of the most influential contributions is Group Relative Policy Optimization (GRPO), a relative policy optimization algorithm that needs no critic model. Traditional Proximal Policy Optimization (PPO) requires maintaining both a policy model and a value model, which brings high memory usage and engineering complexity. GRPO instead samples a group of candidate outputs for the same prompt and constructs an advantage estimate from within-group relative scores, removing the value network. The idea can be summarized as:

    1. A_i = (r_i - mean(r_1..r_G)) / std(r_1..r_G)

    where G is the group size and r is the reward. This algorithm later became one of the mainstream choices for training reasoning models, because it naturally fits tasks where answers can be verified automatically, such as math, code, and logic puzzles.

    5. Multimodality and Long Context

    The goal of the multimodal stage is to align a visual encoder with the language base so the model can handle image understanding, chart parsing, and document question answering. Common engineering points include compression and sampling of visual tokens, quality control of image-text alignment data, and memory management for high-resolution inputs.

    Long context is another separate but related front. Million-token context is not simply a larger window; it requires three techniques together: extrapolation and interpolation of positional encodings, chunking and sparsification of attention computation, and a curriculum-style mix of long text during training. In practice, it is advisable to combine retrieval with hierarchical memory rather than stuffing all history into the window, and to monitor “effective context length” instead of only the nominal window size.

    6. Alignment and Reinforcement Learning: From Answering to Reasoning

    The leap in reasoning ability relies on “verifiable rewards plus large-scale reinforcement learning.” The usual practical path is: first perform supervised fine-tuning with high-quality instruction data, then drive reinforcement learning with rule-based rewards (answer correctness, format compliance, unit tests passing), and finally apply preference alignment to improve expression and safety. If an organization wants to lower the cost of building its own stack, it can build training and evaluation pipelines on top of general cloud capabilities such as container platforms, object storage, message queues, and monitoring and alerting, without binding to any proprietary interface.

    7. Engineering Recommendations

    • Tiered selection: use mid-size dense models for general question answering, sparse-activation models for high-concurrency scenarios, and add retrieval for long-document scenarios.
    • Evaluation first: establish an evaluation baseline that includes domain-private sets, and track pass rate together with agreement against manual spot checks.
    • Controllable cost: model pretraining, fine-tuning, and inference costs separately, and use monitoring and alerting to locate bottlenecks.
    • Compliance and security: data masking, permission isolation, and audit logs should be default capabilities, not patches added afterward.

    In summary, the technical evolution of large models is no longer a contest of single-point parameter counts, but systems engineering across “base, sparse structure, domain capability, multimodality, and reinforcement learning.” Understanding this main line is what allows a team to make verifiable, extensible, and sustainable technology choices under a limited budget.