A Panoramic Review of LLM Evolution: From General Language Models to Long-Context Intelligence
This article provides a systematic review of a prominent research team's open-source large language model (LLM) developments, tracing their evolution from general dense models to fine-grained Mixture of Experts (MoE) architectures. It covers domain-specific models for code and math reasoning, advancements in multimodal and long-context capabilities, and key algorithmic innovations like Group Relative Policy Optimization (GRPO) and Multi-head Latent Attention (MLA). By distilling these technical concepts, the article offers a reusable methodology for developers and enterprises to build and optimize their own LLM engineering pipelines.
In recent years, the open-source large language model (LLM) field has seen a high density of technical report releases, with a series of works from a leading research team being particularly notable. These research efforts span general language modeling, Mixture of Experts (MoE) architecture, code intelligence, mathematical reasoning, multimodal understanding, formal theorem proving, and document understanding. They have also made widely impactful original contributions to attention mechanism efficiency optimization and reinforcement learning (RL) for reasoning. This article systematically reviews these works chronologically, distilling universal technical concepts to help developers build a comprehensive cognitive framework for LLM evolution.
1. The Starting Point: Scaling Practices for General Language Models
The beginning of this research series was a general LLM technical report. It trained a family of dense models ranging from 7 billion to 67 billion parameters, completing pre-training on approximately 2 trillion tokens. The most valuable takeaway from this work is not the model scale itself, but its proposed “long-termism” training philosophy: prioritizing decisions in data processing and training strategy that offer compounding benefits for the model’s long-term capabilities, rather than chasing short-term fluctuations in benchmark rankings.
From an engineering perspective, this philosophy is reflected in several areas:
- Iterability of data pipelines: Establishing a sustainable data pipeline for cleaning, deduplication, quality grading, and ratio tuning, allowing data quality to improve continuously across versions.
- Systematic hyperparameter studies: Conducting scaling law experiments on learning rate, batch size, and model aspect ratio using smaller models, then extrapolating to large models to reduce trial-and-error costs.
- Comprehensive evaluation systems: Simultaneously tracking multi-dimensional capabilities such as code, math, reasoning, and knowledge QA to avoid overfitting to a single dimension.
Ultimately, its 67-billion-parameter model surpassed open-source models with larger parameter counts in code, math, and reasoning tasks, reaching a level close to early closed-source commercial models. This result validates an important conclusion: under reasonable budget constraints, open-source models can approach the capability boundaries of closed-source models through meticulous data and training engineering.
2. Architectural Innovation: Fine-Grained MoE and Shared Expert Mechanism
The second key work was a deep modification of the MoE architecture. Traditional MoE typically sets up a small number of large experts (e.g., 8 or 16), routing each token to one or two of them. This design has two issues: coarse expert granularity leads to knowledge entanglement, and redundant learning occurs among different experts.
The research proposed two improvements that were widely adopted subsequently:
- Fine-grained expert segmentation: Splitting expert networks into a larger number of smaller expert units. Finer routing granularity allows each token to be assigned to a more precisely matched parameter subspace, significantly enhancing expert specialization.
- Shared expert mechanism: Designating a portion of experts to be constantly activated for all tokens to capture cross-task general knowledge. This reduces redundancy among routing experts, allowing them to focus on differentiated knowledge.
The model has a total of approximately 145 billion parameters, but only activates about 28.5% of them per token, achieving performance comparable to the team’s 67-billion-parameter dense model. In other words, it trades roughly 40% of active computation for double the parameter capacity. This paradigm of “large total parameters, small active parameters” became the mainstream technical route for subsequent cost-effective LLMs, providing a new design space for memory and compute planning in inference services.
The takeaway for engineering practitioners is that when building in-house inference services, the cost accounting for MoE models should be based on active parameter count rather than total parameters, while also paying attention to load balancing and memory residency strategies for expert routing.
3. Vertical Capability I: Code-Oriented Domain LLMs
Building on the general foundation, the team trained a series of models focused on code intelligence from scratch (1.3B to 33B parameters). They were pre-trained on 2 trillion tokens of code corpus, covering over 80 programming languages. They surpassed all open-source code models of that time on public code generation benchmarks and exceeded some early closed-source commercial models.
The universal methodological value of this work lies in:
- Repository-level data construction: Unlike random file-level concatenation, training samples were organized according to the dependency topology of code repositories. This enables the model to learn cross-file context understanding, which is crucial for completion and refactoring scenarios in real-world engineering.
- Fill-In-the-Middle (FIM) training objective: Introducing “middle filling” tasks at a certain ratio during training, so the model naturally supports cursor-based completion scenarios in IDEs, rather than only being able to continue text.
- Size tiering strategy: Small models (1B~7B) are suitable for low-latency scenarios like local IDE plugins, while large models are suited for complex cloud-based generation tasks, forming a complete product gradient.
These design concepts have now become standard practices for industry code models. Enterprises building internal intelligent programming assistants can follow this approach: domain continual pre-training based on a general foundation, followed by Retrieval-Augmented Generation (RAG) or fine-tuning for their own codebases. At the implementation level, the engineering loop can be closed using general cloud capabilities such as object storage for corpus version management, container platforms for training task orchestration, and logging and monitoring services to ensure training stability.
4. Vertical Capability II: Math Reasoning and Critic-Free RL
One of the team’s most academically influential works was a model for mathematical reasoning and its proposed Group Relative Policy Optimization (GRPO) algorithm. Understanding GRPO requires first reviewing the pain points of traditional PPO: PPO requires maintaining both a policy model (Actor) and a value model (Critic), with the latter used to estimate state values to calculate the advantage function. The Critic is comparable in size to the Actor, meaning the memory and compute overhead during the RL phase is nearly doubled, and value estimation itself is difficult to train stably in LLM scenarios.
The core idea of GRPO is to replace the value network with group relative comparison: for the same input prompt, a group (e.g., 8~64) of outputs is sampled. A reward model or rule-based verifier (such as checking the correctness of a math answer) scores each output. The relative advantage of each sample is then obtained by normalizing using the mean and standard deviation of the group’s scores.
# Pseudo-code for GRPO advantage calculationdef compute_advantages(rewards: list[float]) -> list[float]:mean = sum(rewards) / len(rewards)std = (sum((r - mean) ** 2 for r in rewards) / len(rewards)) ** 0.5return [(r - mean) / (std + 1e-8) for r in rewards]
This design brings three benefits: it eliminates the Critic model, significantly reducing memory overhead; it avoids value estimation bias, making training more stable; and it naturally adapts to programmable verifiable tasks (math, code) because rewards can be given by deterministic rules. This algorithm later became one of the de facto standard methods for the RL phase of reasoning LLMs, and its “verifiable rewards + group relative advantage“ paradigm has been widely replicated in various reasoning enhancement training.
5. Capability Extension: Multimodal Understanding and Long Context Evolution
After solidifying language and reasoning capabilities, the research map expanded to multimodality: the first vision-language model adopted the classic three-stage architecture of “vision encoder + adapter + language model,” verifying the feasibility of transferring foundational language capabilities to visual understanding. Subsequently, the research extended to formal theorem proving (translating mathematical proofs into machine-verifiable formal languages), structured document understanding (OCR-free layout and chart parsing), and other directions, reflecting an overall route of “radiating from a strong language foundation to various vertical modalities and tasks.”
Simultaneously, long-context capabilities continued to evolve: from context windows of a few thousand tokens, gradually moving towards ultra-long contexts of hundreds of thousands or even a million tokens through combinations of positional encoding extrapolation, attention sparsification, and efficient key-value (KV) cache compression. Among these, Multi-head Latent Attention (MLA) achieved low-rank joint compression of the key-value matrices, reducing inference KV cache footprint by an order of magnitude, which is a key component for achieving low-cost long-context inference.
6. Conclusion: A Reusable Methodology for Technological Evolution
Looking across this research lineage, several experiences of universal value for developers and enterprises can be extracted:
- Foundation first: The data and training engineering quality of general language models determines the ceiling for all downstream capabilities.
- Architectural efficiency equals cost competitiveness: Architectural innovations like fine-grained MoE and attention compression directly determine the unit cost of inference services.
- Verifiable tasks are the breakthrough for reasoning: Tasks with programmable rewards, such as math and code, are the best testing grounds for iterating RL methods.
- Capability radiation expansion: Expanding from a strong foundation to multimodal, long-context, and vertical domains yields a greater compounding effect than spreading efforts across multiple points.
For teams looking to apply LLM capabilities in their own business, it is recommended to follow this route: first perform domain adaptation based on a mature open-source foundation, and then combine general cloud infrastructure (such as object storage, container platforms, message queues, monitoring, and alerting) to build an engineering loop for training and inference, thereby achieving sustainably iterable LLM capabilities at a controllable cost.
