← All Series

SERIES // 10 PHASES · 60 ARTICLES · COMPLETE

DeepSeek Engineering
Blog Series.

From Transformer internals to DeepSeek-V4. A complete technical deep-dive into every architectural innovation — MLA, MoE, MTP, FP8 training, GRPO, and more. Grounded in original papers and code.

60 articles
143k words
10 phases
10 / 10 completed


Phase 1

LLM Foundations

Build the mental model of how a Large Language Model works — from raw text to generated tokens. No assumed ML background.

Phase 2

KV Cache & Efficient Attention

Explain the #1 memory bottleneck in LLM inference (the KV cache) and trace the evolution of attention variants: MQA → GQA → MLA.

Phase 3

DeepSeek MLA — Major Innovation

The centrepiece technical innovation of DeepSeek-V2/V3 — Multi-Head Latent Attention. 93% KV cache reduction without quality loss.

Phase 4

Positional Encoding Evolution

How Transformers understand word order — from integer position to RoPE. The modern standard used by DeepSeek, LLaMA, and Mistral.

Phase 5

Mixture of Experts (MoE)

DeepSeek's second pillar — fine-grained expert segmentation, shared experts, and auxiliary-loss-free load balancing.

Phase 6

Multi-Token Prediction (MTP)

Predict beyond the next token, train sequential MTP modules safely, implement them from scratch, and reuse their drafts for verified speculative decoding.

Phase 7

Quantization & Inference Optimization

Build the full precision ladder from quantization basics to DeepSeek-V3's fine-grained FP8 training pipeline, including the numerical traps that decide convergence.

Phase 8

DeepSeek V2/V3 System Design

Connect V2/V3 architecture to the 2,048-GPU training system: sparse economics, expert parallelism, DualPipe, communication, and memory.

8.1

DeepSeek-V2 Architecture Breakdown

How MLA and DeepSeekMoE combine in the 236B/21B model, with configuration, training, post-training, economics, and the design lineage to V3.

advanced 8 min
8.2

DeepSeek-V3 Architecture Explained

A source-checked tour of 671B/37B, 14.8T tokens, MLA, 256 routed experts, MTP depth one, FP8, DualPipe, and post-training.

advanced 8 min
8.3

Auxiliary-Loss-Free Load Balancing

The bias controller behind V3’s balanced experts: selection versus weighting, update dynamics, residual sequence loss, and operational telemetry.

advanced 8 min
8.4

The Economics of Sparse Compute

Why 671B total and 37B active change FLOPs, memory, communication, utilization, serving, and cost in different ways.

intermediate 8 min
8.5

Distributed Training for DeepSeek-Scale MoE

Data, pipeline, expert, tensor, and optimizer-state parallelism; how V3 combines them and why DualPipe is necessary.

expert 8 min
8.6

Expert Parallelism at Scale

Token dispatch, expert placement, node-limited routing, grouped GEMM, load balance, and the two all-to-all operations inside every MoE layer.

expert 8 min
8.7

Communication Bottlenecks in MoE Training

A practical network model for all-to-all traffic, topology, overlap, congestion, precision, and why communication can dominate accelerator arithmetic.

expert 8 min
8.8

GPU Memory Optimization for Giant MoE Models

Weights, gradients, optimizer state, activations, communication buffers, KV cache, checkpointing, ZeRO, precision, and a defensible memory budget.

advanced 8 min
Phase 9

DeepSeek R1 & Reasoning

Separate R1's base architecture from its four-stage post-training pipeline, then derive RLVR, GRPO, emergent reasoning, verification, and test-time scaling.

Phase 10

Future DeepSeek Systems

Bring the series current through DeepSeek-V4, million-token serving, agent systems, post-CUDA infrastructure, a dated frontier comparison, and an open-weight outlook.