The Evolution of Large Language Models: Architecture Innovation and Reasoning Reinforcement in Practice

    This article traces the technical evolution of large language models along a single main line, organized by capability dimension, architectural approach, and training paradigm. It covers the engineering discipline of dense pre-training, the combination logic of fine-grained and shared experts in Mixture-of-Experts (MoE) architectures, attention optimizations such as Multi-head Latent Attention, and Group Relative Policy Optimization for reasoning that removes the value network. It also reviews multimodal alignment, document understanding, formal theorem proving, and the systems engineering behind million-token contexts, and closes with practical guidance on model selection and deployment under limited budgets.

    1. Introduction: Why a Technical Evolution Main Line Matters

    Over the past two years, the density of published work in the large language model space has been extremely high, with isolated techniques appearing constantly. What engineering teams genuinely lack is not information volume, but a main line that connects these technical points. Reorganizing scattered results along the axes of capability dimension, architectural mechanism, and training paradigm reveals that the evolution revolves around three core tensions: the conflict between compute budget and model capacity, the conflict between context length and attention overhead, and the conflict between “being able to generate” and “being able to reason.” Using time as the implicit thread and technical logic as the explicit one, this article offers reusable engineering judgments.

    2. The Foundation Stage: Dense Models and Pre-training Discipline

    The value of early work is often underestimated. A series of dense models ranging from 7B to 67B parameters completed pre-training on roughly two trillion tokens and proposed a “long-termism” training philosophy: betting returns on continuous optimization of data cleaning, data mixtures, and training strategy rather than chasing short-term leaderboard metrics. The practical conclusion was that, under an equal budget, gains from engineering discipline often exceed those from stacking parameters.

    This can be abstracted into three principles:

    1. 1. Data mixture takes priority over fine-tuning model structure: deduplicate, score quality, and set domain ratios first;
    2. 2. Training stability takes priority over peak metrics: monitor gradient norms, loss spikes, and learning rate restarts;
    3. 3. Front-load evaluation: establish regression sets for code, math, and reasoning by mid pre-training.

    Specialized training for code further validated this route: pre-training from scratch on code corpora covering dozens of programming languages allowed small and mid-sized models to outperform contemporary closed-source general models on mainstream code benchmarks, showing that “domain data density” offers better cost-performance than “general parameter scale.”

    3. Architectural Efficiency: The Combination Logic of Fine-Grained and Shared Experts

    The key to Mixture-of-Experts (MoE) is not “having many parameters” but “sparse activation with clear specialization.” One widely influential approach made two modifications: first, fine-grained expert segmentation, splitting a few large experts into more smaller ones to significantly expand the routing combination space; second, introducing shared experts, so that a portion of parameters participates constantly for every token and carries general knowledge, while the remaining experts focus on differentiated patterns.

    The benefit can be understood through an approximate view:

    1. Total parameters ≈ shared expert parameters + routed expert parameters
    2. Compute per token ≈ shared experts + Top-K routed experts

    Under a typical configuration, total parameters reach the hundreds of billions, while only about thirty percent of parameters are activated per token, matching the quality of same-generation dense models. Engineering deployment requires close attention to load balancing loss, routing entropy, and expert collapse. Common practice is to introduce a capacity factor and an auxiliary balancing term, and to track the selection distribution across experts in a monitoring dashboard.

    Optimization at the attention layer is equally critical. Multi-head Latent Attention compresses the key-value cache through low-rank projection, reducing the memory footprint of long-context inference from “linear expansion with length” to a controllable magnitude. This is one of the prerequisites that makes million-token context engineering feasible.

    4. Reasoning Capability: Policy Optimization Without a Value Network

    The biggest obstacle to applying reinforcement learning to reasoning improvement is memory and engineering complexity. Traditional Proximal Policy Optimization (PPO) requires maintaining both a policy model and a value model, nearly doubling the cost. A widely adopted alternative is Group Relative Policy Optimization (GRPO): sample a group of outputs for the same prompt, normalize using the mean and standard deviation of within-group rewards to obtain relative advantages directly, thereby removing the value network entirely.

    1. # Illustration: within-group relative advantage computation (pseudocode)
    2. rewards = [score(prompt, sample) for sample in group_outputs]
    3. mean_r, std_r = statistics.mean(rewards), statistics.pstdev(rewards)
    4. advantages = [(r - mean_r) / (std_r + 1e-6) for r in rewards]

    The knock-on effects of this method are far-reaching: a simpler training pipeline and lower memory consumption make “verifiable rewards” (answer correctness, unit tests passing, formal proofs succeeding) the primary signal, allowing longer reasoning chains and self-verification behavior to emerge naturally. For engineering practice, reward design should prioritize “automatically judgeable first,” while retaining a small format and length penalty to avoid degradation.

    5. Multimodality, Document Understanding, and Formal Verification

    Multimodal alignment typically follows a three-part structure of “vision encoder + projection layer + language model,” with the core work being the cleaning of high-quality image-text pair data and the design of resolution and chunking strategies. Document understanding builds on this with stronger layout structure perception and long table parsing. The direction of formal theorem proving transcribes natural language reasoning into machine-checkable proof steps; its rewards are naturally verifiable and align closely with the reinforcement learning paradigm discussed in the previous section.

    6. Long Context and Million-Token Engineering Practice

    Long context is not “enlarging the window”; it is systems engineering. Position encoding extrapolation, cache compression, chunked retrieval, and long-sample annealing during training are all indispensable. Practical recommendations:

    • Training side: mix in long samples in the late pre-training stage and increase the window gradually, avoiding one-shot extrapolation;
    • Inference side: prioritize compressing the key-value cache, combined with on-demand retrieval, to reduce ineffective context;
    • Evaluation side: combine “needle in a haystack” retrieval tests with multi-hop question answering to validate recall and reasoning separately.

    For cloud deployment, object storage can carry corpora, container platforms can host inference services, and log services with monitoring and alerting can track latency and cache hit rates. Baidu AI Cloud offers corresponding product categories for these general capabilities.

    7. Selection and Deployment Recommendations

    1. With a constrained budget, prioritize sparse architectures and focus on “activated parameters” rather than total parameters;
    2. For reasoning tasks, prioritize reinforcement learning paradigms with verifiable rewards;
    3. For long-context needs, evaluate caching and retrieval options before considering window expansion;
    4. Establish layered evaluation: capability benchmarks, domain regression, and online canary testing running in parallel across three tiers.

    8. Conclusion

    From dense pre-training to sparse experts, from policy optimization to long context and formal verification, the essence of this main line is “trading less activated computation for stronger specialized capability.” For engineering teams, focusing on three points—data quality, sparse efficiency, and verifiable rewards—is enough to steadily approach the frontier under a limited budget.