Large Language Model Evolution: From General Architectures to Long-Context Intelligence

    This article reviews the technical trajectory of large language models from general dense foundations to long-context and multimodal intelligence. It covers data-centric pretraining, fine-grained MoE and shared experts, domain-specific code and math models, GRPO reinforcement learning, multimodal alignment, long-context inference, and deployment considerations for developers and enterprises.

    Introduction

    Since 2024, leading AI research teams have released a series of major technical reports at a high frequency, driving large language models (LLMs) from general capabilities toward long-context and multimodal intelligence. These efforts span general language models, code intelligence, mathematical reasoning, and multimodal understanding, with original contributions to architecture efficiency and reasoning capabilities. For developers and enterprises, understanding this technical trajectory not only helps identify LLM trends but also provides a solid theoretical basis for model selection and fine-tuning.

    1. Foundations of General Language Models: Long-Term Thinking and Data Processing

    In the early stage of LLM development, the industry often used dense models ranging from billions to tens of billions of parameters as foundations. One early effort from a frontier team trained language models ranging from 7B to 67B parameters and completed pretraining on a large dataset of 2 trillion tokens.

    The biggest highlight of this work was its “long-termism” training philosophy. Unlike simply pursuing rapid gains on short-term benchmarks, this philosophy emphasizes data processing quality and the long-term returns of training strategy. Through refined data cleaning, deduplication, and mixing, the model performed well on code, mathematics, and comprehensive reasoning tasks, reaching the level of mainstream open-source models and early closed-source benchmark models. This demonstrated that under a reasonable compute budget, excellent data engineering can bring open-source LLMs close to the capability ceiling of closed-source models.

    2. Architectural Breakthrough: Deep Optimization of Mixture-of-Experts (MoE)

    As model scale expands, traditional dense models face compute walls and memory walls. Mixture-of-Experts (MoE) architecture has become a key approach to breaking through these limits, but conventional MoE often suffers from insufficient expert specialization and uneven routing load.

    To address this pain point, the industry proposed an innovative MoE architecture design with two core techniques:

    1. Fine-grained expert segmentation: Unlike traditional MoE, which uses a small number of large experts, this approach divides experts into finer-grained units. This allows the model to combine experts more flexibly across different computation steps and greatly improves expert specialization.
    2. Shared expert mechanism: The model reserves some experts for shared access by all tokens. These shared experts are responsible for extracting general knowledge, thereby freeing the capacity of other routed experts to focus on domain-specific feature learning.

    Based on this architecture, the total number of model parameters can reach the tens of billions, while each token activates less than 30% of parameters, achieving or even exceeding the performance of dense models of the same level. This design significantly reduces actual computational overhead while maintaining inference quality, laying the foundation for subsequent large-scale MoE model training.

    3. Domain Depth: The Rise of Code Intelligence and Mathematical Reasoning

    Beyond improvements in general capabilities, specialized models for specific domains have also made breakthroughs.

    Code intelligence models

    In code generation, the team trained a large model specifically for code from scratch. The pretraining data included a 2 trillion token code corpus covering more than 80 programming languages. Through targeted tokenizer optimization and structured code data processing, the model surpassed closed-source models of the time on mainstream code generation benchmarks, marking a significant improvement in the usability of specialized code intelligence models in complex engineering scenarios.

    Mathematical reasoning models

    Mathematical reasoning is a touchstone for the logical capabilities of LLMs. For math problems, researchers not only built high-quality mathematical corpora but also made disruptive innovations in the reinforcement learning training stage.

    4. Reinforcement Learning Innovation: A Key Technique for Reducing Reasoning Training Costs

    Traditional reinforcement learning algorithms such as PPO require maintaining both an Actor (policy network) and a Critic (value network) when optimizing LLMs, which doubles memory usage and makes training extremely expensive.

    To address this, the industry proposed a new reinforcement learning algorithm called Group Relative Policy Optimization (GRPO). Its core idea is to omit the Critic model and instead sample multiple outputs for the same prompt, using relative rewards within the group to compute the advantage function.

    1. # Pseudocode illustration of GRPO advantage computation
    2. def compute_grpo_advantage(prompts, model, reward_func, group_size=G):
    3. all_advantages = []
    4. for prompt in prompts:
    5. # 1. Sample G outputs for the same prompt
    6. outputs = [model.generate(prompt) for _ in range(group_size)]
    7. # 2. Compute the reward value for each output
    8. rewards = [reward_func(prompt, output) for output in outputs]
    9. # 3. Compute the group mean and standard deviation
    10. mean_r = sum(rewards) / group_size
    11. std_r = (sum((r - mean_r) ** 2 for r in rewards) / group_size) ** 0.5
    12. # 4. Compute relative advantages, replacing evaluation by a traditional Critic network
    13. advantages = [(r - mean_r) / (std_r + 1e-8) for r in rewards]
    14. all_advantages.append(advantages)
    15. return all_advantages

    This algorithm greatly reduces memory overhead during the reinforcement learning stage, making it possible to train models with strong logical reasoning capabilities under limited compute. The algorithm was later widely adopted in training various complex reasoning models.

    5. Multimodal Fusion and Long-Context Extension: Toward Versatile Intelligence

    As text capabilities matured, vision-language multimodal models became the next focus of evolution. By aligning visual encoders with language models, LLMs gained joint image-text understanding, expanding application boundaries in scenarios such as document parsing and chart question answering.

    More critically, the field is advancing toward “million-token context.” Long context not only tests the model’s attention mechanisms, such as optimization techniques like MLA (multi-head latent attention), but also places extremely high demands on memory management in inference frameworks. At the cloud deployment layer, with high-performance GPU container instances and object storage services such as Baidu AI Cloud, developers can handle KV cache memory pressure during long-text inference more efficiently and use distributed inference frameworks to provide stable serving for long-context models.

    Conclusion

    From general foundations to fine-grained MoE, from vertical-domain reinforcement to GRPO reinforcement learning innovation, the development trajectory of frontier LLMs clearly shows two main lines: efficiency improvement and intelligence enhancement. For enterprises and developers, deeply understanding these underlying mechanisms and properly using elastic compute and model deployment platforms such as Baidu AI Cloud will be a core competitiveness for building high-performance, low-cost intelligent applications in the AI era.