Evidence inspector
verified

v3.0.0 · 6a2c2b3e4f5a · verified 2026-07-21

verifiedinferredconceptual
1.1 MLA Low-Rank Compression Projection

Compresses high-dimensional Key-Value states into a dense latent vector.

linear projectstore latentdecompressHidden state(h_t)KV compression(W_DKV)Latent vector(c_t^KV)KV decompression(W_UK, W_UV)

Diagram evidence

verified

1.1 MLA Low-Rank Compression Projection

Compresses high-dimensional Key-Value states into a dense latent vector.

Version boundary

Release
v3.0.0
Commit
6a2c2b3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c
Review after
2026-10-22
System breakdown

Inside DeepSeek V3 / R1: MLA, DeepSeekMoE & GRPO Reasoning

A commit-pinned examination of Multi-Head Latent Attention, auxiliary-loss-free DeepSeekMoE, DualPipe overlap, FP8 tile quantization, and GRPO self-correction reasoning loops.

18 min read Verified 2026-07-21 3 primary sources

DeepSeek-V3 and DeepSeek-R1 represent a fundamental shift in open-weights AI systems engineering, achieving frontier-level LLM performance and reasoning capabilities at a fraction of standard training and inference costs.

This breakdown provides an evidence-graded architectural trace across 20 interactive SVG diagrams organized into 5 core engineering chapters:

1. Multi-Head Latent Attention (MLA)

Standard Multi-Head Attention (MHA) creates massive memory bottlenecks during high-concurrency or long-context inference because Key and Value vectors must be cached per layer per token. DeepSeek MLA solves this by compressing KV states into a low-rank latent vector ($c_t^$), reducing KV cache memory footprint by over 93% without sacrificing query reconstruction accuracy.

2. DeepSeekMoE & Dynamic Load Balancing

DeepSeekMoE scales model capacity to 671B total parameters while routing only 67B active parameters per token across 64 fine-grained routed experts and 2 always-active shared experts. Rather than relying on traditional auxiliary loss functions that degrade model representations, DeepSeekMoE introduces a dynamic per-expert bias adjustment mechanism ($b_j$) to guarantee expert load balancing.

3. DualPipe Overlapping & Pipeline Parallelism

Training a 671B parameter model across 2,048 GPUs requires extreme pipeline efficiency. DualPipe overlaps forward and backward GEMM computation phases with inter-node All-to-All expert token communication over InfiniBand and intra-node NVLink interconnects, reducing pipeline bubbles to near zero.

4. FP8 Mixed-Precision Execution & Quantization

DeepSeek-V3 executes all GEMM operations in FP8 mixed-precision using $1 \times 128$ tile-based scaling factors. Forward passes leverage FP8 E4M3 for high activation precision, while backward gradient passes use FP8 E5M2 for dynamic range expansion, accumulating products in FP32.

5. Cold-Start Reasoning & GRPO Reinforcement Learning

DeepSeek-R1 demonstrates that long Chain-of-Thought (CoT) reasoning and self-correction behaviors emerge naturally through pure RL. Group Relative Policy Optimization (GRPO) samples groups of candidate completions per prompt and computes relative advantage scores without requiring an explicit critic network, eliminating neural reward hacking through rule-based mathematical and formatting verifiers.