From Foundation Models to Deep Reasoning: A Complete Technical Guide to Three Generations of Large Language Model Evolution
Over the past two years, open-weight large language models have gone through several steep capability jumps: from general-purpose base models, to reasoning models with long chains of thought, to hybrid reasoning and sparse attention architectures that balance efficiency with performance. This article breaks down this evolution into its key stages—efficient base architectures (MoE and latent attention), reasoning enhancement through verifiable-reward reinforcement learning (RLVR), hybrid thinking models, native sparse attention, and self-verification/self-correction—analyzing the motivation, principles, and engineering details behind each. It closes with practical recommendations for adopting these techniques in real projects.
From Foundation Models to Deep Reasoning: A Complete Technical Guide to Three Generations of Large Language Model Evolution
Over the past two years, open-weight large language models have seen several steep leaps in capability: from base models that could only follow general instructions, to reasoning models capable of long chains of thought, and finally to hybrid reasoning and sparse attention architectures that balance efficiency with performance. This trajectory is not a pile of scattered tricks—it is a systematic engineering effort built around three goals: reducing inference cost, increasing reasoning depth, and controlling reasoning quality. Following the intrinsic logic of this evolution, this article breaks it into several key stages and analyzes the motivation, principles, and engineering details of each.
1. The Main Thread: Three Core Problems Driving LLM Iteration
Every generation of architectural upgrades essentially answers three questions:
- Inference cost: Long contexts and generative reasoning drive memory and compute costs up sharply. How can attention and cache overhead be compressed without sacrificing quality?
- Reasoning depth: General instruction fine-tuning struggles to produce strong reasoning on verifiable tasks like math and code. How do we teach models to “think one step further”?
- Reasoning controllability: Deep thinking isn’t needed for every task. How do we let models think and self-correct on demand, balancing quality against latency?
Around these three problems, modern LLM evolution has gone through three stages: efficient base architectures, reasoning capability enhancement, and hybrid reasoning with efficiency optimization.
2. Efficient Base: Mixture of Experts and Latent Attention
The first stage focuses on lowering per-token training and inference cost, resting on two techniques.
Mixture-of-Experts (MoE) architecture splits the feed-forward network into multiple experts, with a router selecting a few experts to activate for each token. This decouples parameter count from compute: the model can have a very large total parameter count while each token’s actual computation involves only a small fraction of parameters. The key engineering challenge is load balancing—if routing concentrates on a few experts, distributed training becomes uneven across devices. Auxiliary load-balancing losses are typically introduced, combined with fine-grained expert splitting and shared experts, to balance load distribution with expressive capacity.
Multi-head Latent Attention (MLA) targets the memory bottleneck of autoregressive decoding. The KV cache grows linearly with context length and is the largest cost driver in long-context deployment. MLA projects key-value pairs into a low-rank latent vector; at inference time only the compressed latent representation is cached, then decompressed before the attention computation. The results:
- KV cache footprint reduced by roughly an order of magnitude;
- Attention output essentially equivalent to full multi-head attention (mathematical consistency preserved via absorption transforms);
- Compatibility with positional encoding schemes such as RoPE (handled via a decoupled RoPE branch for position information).
Together, these two techniques form a base with a huge total parameter count, controllable per-token cost, and feasible long-context support—the economic foundation for later reasoning extensions.
3. Bringing In Reasoning: Reinforcement Learning with Verifiable Rewards (RLVR)
The key shift in the second stage is moving from “imitating human writing” to “outcome-oriented reinforcement learning.”
In domains like math and code, answers can be automatically judged correct or incorrect by programs. Reinforcement Learning with Verifiable Rewards (RLVR) exploits exactly this: the model generates a full solution process, and the reward function checks only whether the final answer is correct. Unlike reward models that depend on human preference annotations, this offers two major advantages:
- Objective and scalable reward signals: no human evaluation needed, and nearly unlimited training samples can be generated;
- Encourages exploration: the model can try multiple solution paths and be rewarded as long as the conclusion is correct—leading to emergent behaviors like reflection, verification, and backtracking.
A typical RLVR training loop can be summarized as:
for batch in dataloader:prompts = batch["prompt"]# 1. Sample a group of candidate reasoning trajectories per problemresponses = policy.generate(prompts, n=group_size, temperature=1.0)# 2. Judge answer correctness with verifiable rules/programsrewards = [verify(p, r) for p, r in zip(prompts, responses)]# 3. Update the policy using group-relative advantagesadvantages = group_normalize(rewards) # within-group normalization removes difficulty variancepolicy.update(prompts, responses, advantages)
Notably, this group-relative advantage estimation is naturally suited to reasoning tasks: multiple samples of the same problem are compared together, correct trajectories get positive advantages and incorrect ones negative advantages—avoiding the overhead of training a separate value model. Follow-up work added dynamic sampling (filtering groups that are all-correct or all-wrong), loss clipping, and token-level policy gradient losses to improve training stability.
Experience shows RLVR gains don’t materialize all at once. Continuously scaling up training and expanding coverage of verifiable tasks lets the model gradually learn longer chains of thought, more proactive self-checking, and even cross-domain transfer of reasoning ability.
4. Hybrid Reasoning: Thinking On Demand
The first half of the third stage is the Hybrid Thinking Model. Pure reasoning models think long and hard on every request—even if the user just asks about the weather or requests a one-line translation, paying unnecessary latency and compute. Hybrid reasoning models introduce two modes:
- Thinking mode: the model first reasons inside a region wrapped in special tokens, then outputs the final answer;
- Non-thinking mode: the model directly generates an answer, behaving like a regular chat model.
Implementation typically relies on two components:
- Mode control: a switchable thinking toggle in the conversation template, with training data constructed for both modes so the model performs well under both distributions;
- Soft thinking: compressing some reasoning tokens into continuous latent representations (a kind of semantic compression of the chain of thought), reducing decoding overhead without significant quality loss.
The direct benefit: fast responses for simple tasks, deep thinking for hard ones. A single model covers the full spectrum from low latency to high difficulty, significantly cutting serving costs.
5. Sparse Attention: Natively Trained Efficient Long Contexts
As reasoning chains grow longer, the quadratic complexity of attention becomes the new bottleneck. The community has proposed many inference-time sparsification methods (sliding window, top-k sparsity), but these usually train with full attention and swap in sparse attention at inference—creating a train–inference inconsistency.
Native Sparse Attention (NSA)‘s core idea is to have the model use the same sparse attention during pre-training as at inference, eliminating the distribution gap. Its design generally contains three branches:
- Compression branch: compresses continuous KV blocks into block-level representations to capture coarse-grained context;
- Selection branch: dynamically selects the most important KV blocks based on query-block relevance, preserving fine-grained information;
- Sliding window branch: keeps full attention over locally adjacent tokens to maintain local coherence.
At the hardware level, sparse attention must be co-designed with efficient kernels like FlashAttention and the block-sparse memory access patterns of tensor cores, so that theoretical FLOPs savings translate into actual speedups. This algorithm–hardware co-design is the mainstream direction of modern attention optimization: not post-hoc pruning, but natively accounting for hardware characteristics in the architecture and training objectives.
6. Self-Verification and Self-Correction: Improving Reasoning Reliability
As reasoning chains lengthen, per-generation error rates accumulate. Recent work has therefore shifted focus from “generating answers” to “generating and verifying answers.”
Self-Verification lets the model act as its own judge: first generate a candidate conclusion, then generate a verification program or derivation to check it. Verification approaches include:
- Programmatic verification: the model converts math/algorithmic conclusions into code, executes it with an interpreter, and compares results;
- Backward reasoning: starting from the conclusion, checks whether the premises hold;
- Multi-path consistency: sampling multiple reasoning paths and checking whether they converge to the same answer.
Self-Correction goes further: when verification fails, the error information (which assertion failed, which step went wrong) is injected back into the context, and the model regenerates a corrected solution. One practical training strategy is rejection sampling + negative gradients:
- Sample many reasoning trajectories for the same problem;
- Keep correct trajectories for positive fine-tuning;
- For incorrect trajectories, have the model learn from a “discover and fix the error” process, preventing it from merely learning the erroneous patterns.
On math benchmarks, these methods significantly improve solve rates on hard problems, with gains growing as training time and model strength increase.
7. Extended Thinking and Scaled Reinforcement Learning
The latest generation of models integrates and upgrades these directions:
- Extended Thinking: building on hybrid reasoning, allows dynamic control of the thinking budget—adjusting thinking length to problem difficulty, with finer monitoring and safety filtering of the thinking process;
- Scaled reinforcement learning: extends RLVR from math to code, general reasoning, and writing, using larger group sizes and finer difficulty-stratified curricula so the model gets effective gradients across difficulty levels;
- Chain-of-thought content safety: as chains of thought become explicitly exposed to users, both thinking content and final output require separate policy alignment to prevent inconsistency risks.
8. Practical Adoption Recommendations
To apply these techniques in real projects, follow this roadmap:
- Base model selection: prefer open-weight models using MoE + latent attention for a better throughput/cost curve;
- Inference optimization: use inference frameworks supporting PagedAttention, continuous batching, and sparse attention kernels; for long-context scenarios, focus on evaluating KV cache compression ratios;
- Reasoning capability: build verifiable evaluation and training sets in your domain; start with small-scale RLVR experiments (verifying reward-function accuracy is the top priority) before scaling up;
- Serving strategy: configure thinking/non-thinking modes for different request types, with routing logic for on-demand switching;
- Quality loop: after deployment, collect failure cases and construct self-verification and self-correction data for continuous iteration.
9. Conclusion
From efficient base architectures (MoE + latent attention), to reasoning enhancement (RLVR), to hybrid reasoning and sparse attention, this evolution reveals one clear axis of LLM engineering: solving one bottleneck always exposes the next; real progress comes from co-optimizing architecture, training objectives, and hardware implementation. For developers, understanding this methodology matters more than memorizing any single model version—it provides a reusable technical map for evaluating, selecting, and building your own reasoning systems.
