DeepSeek

DeepSeek's model line and the design choices that make its models what they are. Every figure links to its source; data as of October 2026. Reading: 26 min, plus 6 in closed details.

The idea in one screen

Every named DeepSeek idea answers one question at a different layer of the transformer: what does a frontier-quality model cost to serve, and to train on bandwidth-limited GPUs? Each release keeps the earlier answers and attacks the next cost.

DeepSeek is a spinoff of High-Flyer, a Chinese quantitative hedge fund. It publishes weights and tech reports, though not data, under permissive licences (R1 and V4.1-Flash are MIT), so its layout became the template other open MoE models reuse: Kimi K2 keeps MLA and the fine-grained-plus-shared expert layout, at 384 experts (compare them on the Config diff tab). Its price cuts are where the serving arithmetic reaches the market: V2 started the Chinese API price war, and V3.2-Exp cut API prices by more than half (DeepSeek).

Each release changes one or two layers and keeps everything before it

Rows are the parts of the model and its training; a dot marks the release that first shipped DeepSeek's answer, and the line after it shows the answer carried forward (on a narrow screen the same facts are listed by release). Tap a row to jump to its section. Releases and parameter counts (total / active) from the V2 paper, V3 report, R1 paper, V4 report and the V4.1-Flash model card; every date is in the release notes at the end of the Lineup section.

You need: the attention variants (MLA, sparse attention) from Attention variants, routing and balancing from Mixture of experts, and GRPO from RL for LLMs. This page says what DeepSeek chose and what it bought; those pages teach the mechanisms.

MLA
multi-head latent attention: cache one compressed latent per token and rebuild every head's keys and values from it (V2)
DSA
DeepSeek sparse attention: a cheap "lightning indexer" picks the top-k cached entries each token reads (V3.2-Exp)
CSA, HCA
compressed and heavily compressed attention: one cache entry per 4 or per 128 tokens (V4)
DeepSeekMoE
many narrow routed experts plus an always-on shared expert (V2)
MTP
multi-token prediction: an extra module trained to predict the token after next (V3)
DualPipe, DeepEP, EPLB
DeepSeek's pipeline schedule, expert-parallel communication kernels and expert load balancer
GRPO, RLVR
RL whose baseline is the mean score of a group of samples, with rewards from checkable answers (R1)
mHC
manifold-constrained hyper-connections: four residual streams mixed by a doubly stochastic matrix (V4)

Attention: three cuts to what a decoded token reads

Decode reads every cached key and value once per new token, so the cache decides how many sequences fit on a GPU and what each token costs. What one token reads in one layer is entries read × numbers per entry, and DeepSeek cut each factor in turn, then cut what is stored at all. Fig. 2 counts it for the whole model at a 131,072-token context: the solid column is what one decoded token reads (blue cache entries, gold indexer keys), the teal glass behind it what the cache stores.

  1. The baseline: MHA at V3's dimensions. Every cached key and value is read: per layer 131,072 entries × 32,768 numbers (2 × 128 heads × 128) = 4.29 billion, and over V3's 61 layers 262 billion numbers for one decoded token. Read and stored are the same thing here.
  2. Cut 1, MLA (V2): a smaller entry. One 576-number entry per token (a 512-number latent plus a 64-number RoPE key), 57× fewer: 75.5 million numbers a layer, 4.61 billion for the model. The scale changes, so the MHA column, 57 times taller, is cut at the top of the card. Every entry is still read.
  3. Cut 2, DSA (V3.2-Exp): read fewer entries. Attention reads only the top 2,048 entries, 64 times fewer (1.18 million numbers a layer), but the lightning indexer scores all 131,072 with its own 128-number keys (16.8 million, gold): 18.0 million a layer, 1.10 billion for the model, 24% of MLA's. Most of what a DSA token reads is the indexer. The cache grows: 5.63 billion numbers stored, 22% more than MLA, because every indexer key stays resident.
  4. Cut 3, V4-Pro: store fewer entries. 30 CSA layers keep one 512-number entry per 4 tokens (32,768, plus 128 in the exact window), read the top 1,024 and the window, and index the 32,768; 31 HCA layers keep one entry per 128 tokens (1,024 plus the window) and read them all. One token reads 162 million numbers, 6.8× fewer than DSA and about 1,600× fewer than MHA; 649 million are stored. The scale changes again: MLA's column is cut now.
  5. V4-Pro close up: two kinds of layer. A CSA layer reads 4,784,128 numbers, most of them indexer keys; an HCA layer reads 589,824 (drawn alternating). The CSA indexer key is taken as 128 numbers, as DSA's (an assumption: Attention variants gives the V4 indexer as 64 heads of 128, not the key size). These are counts of numbers, not bytes: the indexers run in FP8 (DSA) or FP4 (V4), so in bytes the gold share is smaller.

Fig. 2: heights to scale within each step, derived from the configs (V3, V3.2-Exp and V4-Pro config.json; the formulas are in parts/26_js_ds_0data.js). The mechanisms, stepped through on one token, are on Attention variants; whole-model cache sizes for every DeepSeek generation against context length are in the KV-cache calculator on Long context.

MLA (V2): a 576-number entry where MHA caches 32,768

At V3's 61 layers in BF16 that entry is 70,272 bytes per token (68.6 KiB), against 3.81 MiB for MHA and 244 KiB for 8-group GQA, yet every head still rebuilds its own keys and values from the latent instead of sharing them as GQA does. Against DeepSeek's own dense 67B, V2 reported a 93.3% smaller cache and 5.76 times the maximum generation throughput (V2 paper). The price is extra projection arithmetic and kernels of its own (FlashMLA), which is why DSA and V4's CSA are built on MLA's decode shape rather than on GQA. See MLA step by step on Attention variants: the before/after animation first built for this page.

DSA (V3.2-Exp): keep the whole cache, read the top 2,048

V3.2-Exp (29 September 2025) left MLA's cache in place: the lightning indexer, a few small heads in FP8 with ReLU instead of a softmax for throughput, scores every cached entry, and attention reads only the top 2,048. It is an approximation, so it was trained in, continued from V3.1-Terminus, and DeepSeek reported parity with V3.1-Terminus on standard and long-context benchmarks. Every entry stays resident and the indexer still scores them all. DeepSeek cut API prices by more than 50% when it shipped (DeepSeek announcement).

CSA and HCA (V4): store less

CSA layers merge every 4 tokens into one entry and run DSA's selection over the merged entries (top 1,024 in V4-Pro, 512 in V4-Flash); HCA layers merge every 128 tokens and read all of them; both keep a 128-token exact window. V4-Pro interleaves 30 CSA and 31 HCA layers; at a 1,048,576-token context a CSA layer stores 262,144 entries and an HCA layer 8,192, each plus the window. DeepSeek report the cache at about 2% of BF16 GQA-8 at 1M tokens (a baseline already 16 times smaller than MHA), and, against V3.2 at 1M tokens, 10% of the cache and 27% of the single-token FLOPs for V4-Pro, 7% and 10% for V4-Flash (V4 report). Attention variants reproduces the 2% from the config.

V4.1-Flash: the cache argument reaches the shape of the network

V4.1-Flash (September 2026) is a 552B encoder-decoder, the first shipped at frontier scale since the field settled on decoder-only stacks, and DeepSeek's reason is the KV cache, not quality (model card). With cross-layer sparse attention with index reuse, hierarchical retrieval, an Engram memory and FP4 cache storage, the reported result is 890 bytes per token, roughly a quarter of V4-Flash's HBM footprint and an eighth of its SSD footprint (zartbot gives the HBM and SSD ratios as runtime and persistent cache storage). T5 had argued the encoder-decoder case on quality grounds without moving anyone; End-to-End Context Compression at Scale argued it on this systems ground.

Predict: how many active parameters does a prompt position use, against a generated token? Step 2 and step 4 of Fig. 3 answer it.

  1. 40 layers, cut in two. A 40-layer transformer split into a 20-layer causal encoder (layers 0 to 19, numbered from 0) and a 20-layer decoder (layers 20 to 39). The experts: 384 routed experts with 6 active per token.
  2. Prefill: a prompt position stops at the encoder. Prompt positions pass through the 20 encoder layers only, so prefill activates 8B parameters. The prompt is encoded once into a shared representation rather than carried as a per-layer cache through one causal stack.
  3. One shared cache, projected from the encoder. The halves connect not through T5-style cross-attention: the decoder's global keys and values are projected from the encoder's 20th-layer hidden state by layer-dependent projection weights, so decoder layers reuse one shared cache.
  4. Decode: a generated token runs all 40 layers. Each generated token passes through all 40 layers, so decode activates 16B. One active-parameter count does not describe this model.
  5. Four layers of forty store a cache. Each layer runs in one of three modes: full layers compute their own cache entries and top-k indices; reindex layers reuse a full layer's entries but pick new top-k indices with their own indexer query; reuse layers take both unchanged. Layers 0 and 1 are sliding-window only (the last 128 positions); the rest of the encoder is three blocks of one full layer and five reuse layers, its entries merging two adjacent positions into one (compress_ratios = 2); the decoder keeps every position: layer 20 is full and also builds the indexer's candidate pool, layers 24, 28, 32 and 36 reindex, all the others reuse. So the stack keeps 4 cache copies for 40 layers (3 encoder, 1 decoder), and 8 layers run an indexer. The Engram memory (gold) is injected at layers 1 and 14.

Fig. 3: layer modes from the released config.json, read with zartbot; active parameters from the model card. Slabs are layers, not to scale in parameters.

The indexer's cost stops growing with the context. At decode, the full layer 20 ranks the context in blocks of 8 positions and keeps up to 2,048 blocks, a candidate pool of up to 16,384 positions; each later indexing layer ranks only that pool and keeps its own top 512 (zartbot; candidate_topk_blocks, candidate_block_size and index_topk in the config). The model card's phrase is "bounding deeper indexer cost independently of context length". Slide the context: the first stage grows with it, the pool stops at 16,384.

What one V4.1 cache entry costs in bytes (an estimate against the reported 890)

DeepSeek's attention kernels store a V4.1 cache entry as 528 bytes in FP8 (512 values plus 16 scale bytes) or 288 bytes in FP4 (512 values at half a byte plus 32 scale bytes) (FlashMLA), and the model card says the main cache is FP4. As an estimate, not DeepSeek's breakdown: if the three encoder copies hold one entry per two positions and the decoder copy one per position, the main cache is 3 × 288 ÷ 2 + 288 = bytes per token; the reported 890 also counts the indexer keys.

The first stage grows with the context; the second never ranks more than 16,384 positions

The MoE layer as DeepSeek configured it

DeepSeekMoE, from V2, makes two changes to the Mixtral-style mixture of experts (a handful of large experts, two active per token): fine-grained experts, each expert split into narrower ones with more active per token, so V3 routes 8 of 256 rather than 2 of 8 at a similar active budget; and shared experts that every token passes through, absorbing the common computation that would otherwise be duplicated inside every routed expert. Mixtral's 2 of 8 gives 28 possible expert sets per token per layer; V3's 8 of 256 gives about 4.1 × 1014, which is what lets experts specialise narrowly. Why both moves work, measured, is on Mixture of experts (section 5).

Try: pick a generation: the grid is every routed expert of one layer to scale, blue the experts one token picked (at random here; a real router picks by affinity); the green count is the shared expert every token also passes through.

More, narrower experts per generation, with one always on

How the layer changed across generations (from the V2, V3 and V4 reports; V4.1-Flash from zartbot's breakdown and its config.json):

Model (total / active)Routed, activeSharedExpert widthAffinityFirst layersRouting limit
V2 (236B / 21B)160, top-621,536SoftmaxFirst layer denseAt most 3 of 8 devices per token
V3 (671B / 37B)256, top-812,048SigmoidFirst three denseAt most 4 nodes per token
V4-Flash (284B / 13B)256, top-612,048√softplusFirst three MoE, hash-routedNone
V4-Pro (1.6T / 49B)384, top-613,072√softplusFirst three MoE, hash-routedNone
V4.1-Flash (552B)384, top-612,304√softplusn/sn/s

n/s: not stated in the sources. Expert width is each expert's intermediate dimension. Hash routing sends a token to experts chosen by a fixed hash of its token id, with no learned router: V3 kept its first three blocks dense because routing on barely differentiated early representations is near-random, and V4 keeps them sparse but takes the learned router out of them. The routing limit caps how many devices or nodes a token's experts may span, which bounds all-to-all traffic; V4 removed it and redesigned its parallelism instead. The cost of both moves is routing and communication: more experts touched per token means more all-to-all traffic, which is why DeepSeek wrote its own kernels (DeepEP, below).

V3's MoE layer as equations (shared plus routed, sigmoid affinities renormalised over the top k)
𝐡t′=𝐮t+∑i=1NsFFNi(s)(𝐮t)+∑i=1Nrgi,tFFNi(r)(𝐮t) gi,t=gi,t′∑j=1Nrgj,t′gi,t′={si,tifsi,t+bi∈Topk({sj,t+bj},Kr)0otherwisesi,t=σ(𝐮t⊤𝐞i)
ut, h′t
the layer's input for token t, and its output with the residual added
Ns, Nr, Kr
shared experts, routed experts, routed experts activated
si,t
the token-to-expert affinity; σ is the sigmoid and ei a learned centroid for expert i
bi
expert i's balancing bias (next section), used only to choose
gi,t
the gate weight: the unbiased affinity renormalised over the selected experts

From the V3 report. V2 computed affinities with a softmax; V3 switched to independent sigmoids, and V4 to √softplus(·) (V4 report).

Balancing without a loss (V3)

Left alone, routers collapse onto a few experts, and under expert parallelism the busiest GPU sets everyone's step time. The standard fix, an auxiliary loss, is a second objective pushing tokens away from the expert that would have modelled them best. V3 instead adds a per-expert bias bi to the affinity for the top-k choice only; the gate weight that scales the expert's output still comes from the unbiased affinity, so the bias never enters the gradient. After each step every overloaded expert's bias drops by γ and every underloaded one's rises by γ: 0.001 for V3's first 14.3T tokens and 0 for the last 500B. V3 kept only a tiny sequence-wise auxiliary loss (weight α = 0.0001) and dropped no tokens in training or inference; V4 uses the same values (V3 report).

Worked example (illustrative numbers). A token scores expert A at 0.62 and expert B at 0.60, with one slot left. A has been overloaded for 30 consecutive steps, so bA = −30 × 0.001 = −0.03; B's bias is 0. The selection scores are 0.59 for A and 0.60 for B, so the token goes to B, and B's gate weight is computed from its true 0.60: the bias moved the decision boundary and nothing else. Real load curves with and without the bias, from trained models, are animated on Mixture of experts (section 3).

Anticipatory routing (V4) answers loss spikes, which DeepSeek traced to outliers in the MoE layers that routing amplifies: at step t the features use the current parameters but the routing indices are computed with the parameters of step t − Δt, decoupling the router's updates from the backbone's. It is not always on: an automatic detector triggers a short rollback and switches it on only when a spike occurs, at about 20% extra wall-clock time while active (V4 report).

Multi-token prediction (V3 and V4)

V3 trains one extra MTP module that predicts the token after next. Unlike parallel independent heads, it is a sequential transformer block fed the trunk's representation and the next token's embedding, so the causal chain is kept. V3 and V4 use depth 1, weighted 0.3 in the loss for most of training and 0.1 at the end. DeepSeek use it twice: denser supervision in training, and at inference a built-in draft for speculative decoding, the second token accepted 85% to 90% of the time for 1.8 times the tokens per second (V3 report). The objective and its measured worth are on Families and objectives; drafting on Speculative decoding.

Training systems: FP8, DualPipe, DeepEP

DeepSeek trained V3 on H800s, whose interconnect bandwidth is cut relative to the H100, so communication rather than FLOPs was the binding constraint: 20 of each H800's 132 streaming multiprocessors were given over to communication, and V3 trained with 16-way pipeline parallelism, 64-way expert parallelism across 8 nodes and ZeRO-1 data parallelism (V3 report). Each choice below trades complexity for bandwidth.

Which hardware drew the starting weights, read from the released checkpoints (checkpoint forensics, report of 12 November 2026, read 27 November 2026)

Embedding rows that training never touched keep the layout PyTorch's random initialisation had on the GPU that drew them, which records its SM count (GPU architecture has the mechanism). Read that way, DeepSeek-V3 (December 2024) and V3.2 sit on a 132-SM layout (Hopper: the H800s DeepSeek disclosed, or any H100 or H200), V4-Flash on a 148-SM layout and V4-Pro on a 152-SM layout, which the report assigns to the B200 or B300 and the GB200 or GB300. V3 and V4-Flash share one seed, 953049583; on a B300 it regenerates 461 of V4-Flash's 469 selected rows, and on an H100 none. V4.1-Flash gave no fingerprint after an exhaustive search over seeds, so DeepSeek probably changed its initialisation. These are inferences about which hardware drew the starting weights, not proof of where the chips were, who owned them, or that the whole run used them; the report says so itself, and the GPU counts it estimates were revised twice on launch day. Independently, DeepSeek's own DeepInfer lists NVIDIA SM100 (Blackwell) and Huawei Ascend 950 as supported serving hardware. The evidence and its limits: checkpoint forensics.

FP8 training (V3), FP4 experts (V4)

V3 was the first validation of FP8 training at this scale, roughly halving memory traffic against BF16. Naive FP8 fails because the format's dynamic range is small: one outlier forces a tensor's scale down and small gradients flush to zero. The recipe: one scale per 1 × 128 tile of activations and per 128 × 128 block of weights, so one outlier cannot poison a whole tensor; master weights, optimiser state, normalisation, the embedding and the output layers kept in higher precision; and accumulation promoted to FP32 every 128 elements, because the H800 tensor cores keep only about 14 bits when accumulating FP8 products. The loss stays within 0.25% relative error of BF16 (V3 report). V4 goes further at the serving end: routed expert weights stored in FP4 through quantisation-aware training, and the lightning indexer computing in FP4 (V4 report). The formats and scaling granularity are taught on Quantization and Precision.

DualPipe: feed the pipeline from both ends

Pipeline parallelism leaves bubbles, stretches where a stage waits on its neighbour. DualPipe feeds micro-batches in from both ends and pairs one micro-batch's forward chunk with another's backward chunk (F&B), so the MoE all-to-all of one hides behind the compute of the other. The chunks have durations F (forward), B (full backward) and W (the backward-for-weights part, which zero-bubble schedules split off to fill gaps). DeepSeek publish each schedule's bubble and memory (DualPipe repository; Table 2 of the V3 report):

ScheduleBubbleParameters per deviceActivations per deviceDevices
1F1B(PP − 1)(F + B)1×PPPP
ZB1P(PP − 1)(F + B − 2W)1×PPPP
DualPipe(PP/2 − 1)(F&B + B − 3W)2×PP + 1PP
DualPipeV(PP/2 − 1)(F&B + B − 3W)2×PP + 1PP/2

The price is the third column: every device holds two stages, the r-th and the (PP − 1 − r)-th, so micro-batches can enter from both ends. DualPipeV, Sea AI Lab's "cut-in-half" version, gets the same bubble on half the devices. Pipeline parallelism in general is on Distributed Training, which links here for these schedules.

Predict: with the README's own example (8 ranks, 20 micro-batches), how much smaller is DualPipe's bubble than 1F1B's? Then switch schedule: the readout goes from 4.5 to 21 time units. On DualPipe, rank 0 runs forward chunks of both directions (blue and teal) and, in the middle, mostly bordered F&B cells, the overlapped pairs. The time ratios are illustrative.

Feeding both ends shrinks the start-up and drain triangles

forwardforward, reverse directionbackwardbackward for weights (W)bordered: overlapped F&B

DeepEP: kernels shaped like MoE traffic

DeepEP, DeepSeek's open expert-parallel communication library, is hand-written dispatch and combine kernels with separate NVLink and RDMA paths and a low-latency variant for decode. It exists because MoE traffic is a skewed, dynamically routed, token-level all-to-all, not the uniform exchange generic collectives are built for. V4 folds computation, communication and memory access for the MoE layer into a single fused kernel (V4 report).

V4's residual stream and optimiser: mHC and Muon

mHC widens the residual stream to nhc = 4 streams mixed around each block, and projects the stream-mixing matrix onto the doubly stochastic matrices (rows and columns sum to one) with 20 Sinkhorn-Knopp iterations, so a deep stack can average streams but never amplify them; unconstrained hyper-connections had been unstable. Why, with DeepSeek's measured gains, is on Normalisation, residuals and stability. Muon replaces AdamW for most weight matrices (each momentum update orthogonalised by Newton-Schulz iterations; Optimisers teaches it), with AdamW kept for the embedding, the output head and the RMSNorm weights. V4-Flash was pretrained on 32T tokens and V4-Pro on 33T (V4 report).

mHC's equation and the Sinkhorn-Knopp projection, on a 4 × 4 matrix (interactive)
Xl+1=BlXl+Clℱl(AlXl)
Xl
the residual state before layer l, of shape nhc × d
ℱl
the layer (attention or MoE), with its usual d-dimensional input and output
Al
(1 × nhc) mixes the streams into the layer's input
Cl
(nhc × 1) spreads the layer's output back over them
Bl
(nhc × nhc) mixes the streams with each other, projected to be doubly stochastic

A doubly stochastic matrix has spectral norm at most 1, so the residual mapping cannot amplify the signal, and the set is closed under multiplication, so a deep stack stays bounded too. The three maps are generated from the input, which is why this costs little: nhc is tiny next to d (V4 report).

Try: a random positive 4 × 4 matrix (illustrative) under Sinkhorn-Knopp, which alternately rescales its rows and its columns to sum to one. Slide from 0 to 20 iterations and watch the sums go to 1 and the spectral norm fall to 1.

Serving: split the phases, replicate the hot experts

DeepSeek serve prefill and decode on separate GPU pools (disaggregation, now standard; taught on Distributed and disaggregated serving). Fig. 4 draws the deployment of V3 and R1 as DeepSeek published it (day 6), 8 GPUs a node.

  1. Two pools for two phases. A request's prompt arrives at a prefill unit (teal), its cache moves across to a decode unit (orange), and the generated tokens leave from there (purple).
  2. Prefill: 4 nodes, 32 GPUs, 9 experts each. V3 and R1 prefill on units of 4 nodes (32 GPUs, EP32). With 32 redundant experts beside the 256 routed ones, 256 + 32 = 288 expert copies over 32 GPUs: 9 routed experts per GPU (blue cubes), each GPU also holding the shared expert (the green slab). A token's routed experts sit on GPUs across the unit (the streams, illustrative): the all-to-all that DeepEP's kernels serve.
  3. Decode: 18 nodes, 144 GPUs, 2 experts each. Decode runs on 18 nodes (144 GPUs, EP144), each with the same 32 redundant experts: 288 copies at 2 routed experts per GPU, plus the shared expert.
  4. 32 redundant copies of the hot experts. The extra copies (gold) duplicate the busiest experts, so the GPU holding a hot expert no longer sets everyone's step time. Which experts get copies, and where they go, is EPLB's job (below); the gold slots drawn here are illustrative.

The bias loop balances the router in training, but a deployed model still has hot experts, and the GPU holding them sets everyone's step time. The Expert Parallelism Load Balancer (EPLB) duplicates the heaviest experts and packs the copies so every GPU carries a similar load, each copy taking an equal share of its expert's traffic (EPLB repository). Its hierarchical policy, used when the number of nodes divides the number of expert groups, packs whole expert groups onto nodes, then replicates and packs within each node: V3's routing is group-limited (a token's experts come from at most 4 of its 8 expert groups, topk_group and n_group in its config.json), so this keeps that traffic inside a node. The global policy replicates anywhere. The README suggests hierarchical for prefill (smaller expert parallelism) and global for decode (larger).

Try: the default is the README's worked example (12 experts in 4 groups, 4 redundant copies, 2 nodes of 4 GPUs, the published loads of its first layer); the EPLB view reproduces its published placement exactly. Switch to the naive view (expert i on GPU i mod 8, no copies) and read the max-to-mean ratio: how much longer the busiest GPU takes than an even split. The production layouts' loads are illustrative (a skewed random draw).

Copies of hot experts pull the busiest GPU back towards the mean

The engine that runs this is partly public. DeepInfer, open-sourced on 20 October 2026 under Apache 2.0, is the offline-inference version of "the high-performance inference framework that powers DeepSeek's large-scale production services": it serves V4.1-Flash on NVIDIA SM100 (Blackwell) GPUs and Huawei Ascend 950 NPUs with attention data parallelism, MoE expert parallelism plus EPLB and DeepSeek's own kernels, and descends from vLLM. DeepSeek kept back the KV cache system, prefill/decode disaggregation and load balancing across data-parallel replicas, the parts that make the deployment above a deployment (DeepInfer; where it sits among serving engines: Topic: inference-and-serving).

Post-training: GRPO, R1 and one checkpoint

GRPO, from DeepSeek's DeepSeekMath work, is PPO with the value network deleted: sample a group of completions for one prompt, score them, and use the group's own statistics as each completion's baseline, Âi = (ri − mean(r)) / std(r). Rewards 1, 0, 0, 1 give mean 0.5 and standard deviation 0.5, so the correct answers get +1 and the wrong ones −1; a group with identical rewards teaches nothing. That buys roughly half the memory and one fewer model to babysit, and fits verifiable-reward RL, where many rollouts per prompt are cheap to score; it moves the cost into sampling, and later work showed the standard-deviation normalisation biases across prompt difficulty and response length. The full objective, its group visual and the successors are on RL for LLMs: RLHF, GRPO, RLVR.

R1-Zero and R1. R1-Zero applied GRPO directly to the V3 base with rewards only from automatically checkable outcomes (mathematics with a known answer, code that passes tests) plus format, with no supervised reasoning traces: RL with verifiable rewards (RLVR). Long chains of thought, self-checking and backtracking emerged from that alone, and the emergence, not the benchmark number, is the result that mattered: reasoning was reachable without proprietary reasoning data. R1 proper alternates supervised fine-tuning and RL four times over, and most of its data was generated by its own predecessors: the cold-start set was partly R1-Zero output made readable, and 600K of the 800K supervised samples were sampled from the RL checkpoint itself, keeping only correct answers (R1 paper, section 2.3).

Try: click a stage for its data, its reward and what it fixed. Band widths follow the published sample counts (the cold start is only "thousands", so it is drawn thin).

R1 is V3-Base fine-tuned on data its own RL checkpoints wrote

The stages in numbers: R1-Zero's AIME 2024 pass@1 rose from 15.6% to 71.0% (86.7% with majority voting), with reflection appearing unprompted but poor readability and language mixing; R1's reasoning RL added a language-consistency reward; rejection sampling kept about 600K reasoning samples, joined by about 200K non-reasoning samples from V3's pipeline; V3-Base itself was fine-tuned for two epochs on the 800K, then a final RL stage used rule-based rewards for mathematics, code and logic and learned reward models for general prompts; R1 scores 79.8% (R1 paper).

Distilled students. DeepSeek fine-tuned Qwen and Llama bases from 1.5B to 70B on the same 800K samples, with SFT only, showing the behaviour transfers by ordinary supervised fine-tuning on traces; that is why half the open reasoning models of 2025 were R1 distillations. Distillation in general is on Distillation and Small Language Models.

At 14B and 32B the students keep most of the teacher's AIME score

AIME 2024 pass@1 of the students: Qwen-1.5B 28.9, Qwen-7B 55.5, Llama-8B 50.4, Qwen-14B 69.7, Qwen-32B 72.6, Llama-70B 70.0, against the teacher's 79.8 and o1-mini's 63.6; with cons@64 the 7B reaches 83.3 against o1-mini's 80.0.

Hybrid thinking (V3.1 onward) folds chat and reasoning into one checkpoint, long-chain mode selected by the prompt template rather than by loading different weights (DeepSeek): one set of weights, one cache, one deployment, and the caller pays for deliberation only where it earns its latency. Specialists, then one student (V4): V4's post-training first trains a separate expert model per domain (mathematics, coding, agents, instruction following), each by SFT and then GRPO against domain reward models, then consolidates them into one model by on-policy distillation: the unified model samples its own outputs and is trained to minimise the reverse KL divergence to the teachers (V4 report).

What it cost: the $5.6M is one run

V3's official training run took 2,788K H800 GPU hours, priced by DeepSeek at an assumed $2 per GPU hour on a 2,048-GPU cluster: $5.576M. DeepSeek say it excludes prior research and ablations (V3 report, Table 1; the bill line by line, with a price slider and V3's utilisation against Llama 3.1 405B, is on the DeepSeek-V3 paper page). R1's own training added a reported 147K hours, $294K at the same rate (R1 paper, v2, appendix B.4.4).

Serving margin. DeepSeek's "545% cost-profit margin" is theoretical: one day (27 to 28 February 2025) cost $87,072, an average of 226.75 H800 nodes at $2 per GPU-hour, against $562,027 of revenue had every token been billed at R1's prices; actual revenue was substantially lower, because V3 is cheaper, web and app use is free and night-time discounts applied (day 6).

The headline figure is the rented-hour price of the final runs, not the cost of building the model

GPU hours to scale: pre-training 2,664K, context extension 119K, post-training 5K (V3 report, Table 1), then R1's 147K. The dashed box is what DeepSeek exclude and do not disclose. Outside estimates use different units and are not drawn: SemiAnalysis put the hardware available to DeepSeek at about 50,000 Hopper GPUs and $1.6B of server capex (SemiAnalysis, an outside estimate).

The lineup volatile, read October 2026

What DeepSeek serves, with the prices and one independent index reading; these change monthly, so each is dated.

ModelParams (total / active)Price per million tokens, peak (input / output)Artificial Analysis Intelligence IndexNotes
V4.1-Flash (deepseek-flash, the 1017 checkpoint)552B / 8B prefill, 16B decode$0.30 / $1.20; half that off-peak; cache hits from $0.00645 at $0.26 per task (v4.3.2, read 19 October 2026)Encoder-decoder, 1M context, native vision, MIT
V4 Pro1.6T / 49B$1.32 / $3.96; cache hits $0.04436.0 at $0.67 per task (0813 checkpoint, v4.3, read 1 October 2026)1M context; its own API service
V4 Flash284B / 13Bits API names are now answered by V4.1-FlashOpen weights
R1 (legacy)671B / 37Bhistoric; reasoning is now folded into the V lineMIT

Prices from DeepSeek's pricing page; index from Artificial Analysis (V4.1-Flash-1017, V4 Pro). Cross-lab rankings belong to the Topic: llm-landscape root.

A call naming V4 Flash is answered by V4.1-Flash
Since 14 September at noon Beijing time the deepseek-v4-flash and deepseek-v4-flash-vision-exp names route to V4.1-Flash. V4 Pro is not rerouted: DeepSeek continue its API service after 14 September with billing unchanged (API changelog).

Who may use it. The MIT licence places no field-of-use limits, but US policy now does: a Department of Homeland Security order (Federal Register 2026-21447, published 20 October 2026) excludes DeepSeek products from federal civilian procurement and removes from civilian agencies' IT both DeepSeek's own products and "third-party products and services developed using DeepSeek implementations", which reaches a vendor's tool built on the open weights. Private companies and states are outside it, and so, by ExecutiveGov's reading of the order, are national security systems (Federal Register).

Release notes: every release, its date and its numbers (volatile detail)

DeepSeek LLM and Coder, 2023 (DeepSeek LLM 67B: 29 November 2023, GitHub). Early Llama-style dense models, notable for the scaling-law and data work that set up what followed.

V2, 6 May 2024 (GitHub, V2 paper). Introduced MLA and DeepSeekMoE. Against DeepSeek 67B: 42.5% lower training cost, a 93.3% smaller KV cache and 5.76 times the generation throughput; MLA's serving cost is what let DeepSeek start the Chinese API price war.

V3, 26 December 2024 (Hugging Face, V3 report). MLA plus a 256-expert MoE (8 routed active, 1 shared), aux-loss-free balancing, multi-token prediction, FP8 training, DualPipe; the $5.576M run shook the industry, and the report is unusually explicit about the infrastructure.

R1, 20 January 2025 (DeepSeek, R1 paper). GRPO-based RL on the V3 base produced o1-class reasoning; MIT licence, plus distillations from 1.5B to 70B. It triggered the "DeepSeek moment" and Nvidia's record one-day selloff.

V3.1, 21 August 2025 (DeepSeek). Chat and reasoning merged into one hybrid-thinking checkpoint.

V3.2-Exp, 29 September 2025 (DeepSeek, V3.2 paper). DSA, continued from V3.1-Terminus; API prices cut by more than half at launch.

V4: V4 Pro and V4 Flash, 24 April 2026 (The Next Web, V4 report). CSA and HCA with low-rank queries and grouped output projections, mHC, Muon, FP4 expert weights. V4-Pro at maximum reasoning effort reports 80.6% resolved on SWE-bench Verified with DeepSeek's in-house harness (a bash tool and a file-edit tool, up to 500 steps and 512K tokens of context), against 80.2 for Kimi K2.6 Thinking in the same table; V4-Flash at maximum effort reports 73.2 on BrowseComp against V4-Pro's 83.4, with a quarter of the active parameters.

V4 Flash vision, 21 August 2026 (API docs). deepseek-v4-flash-vision-exp, an experimental vision variant of V4 Flash and, until V4.1-Flash, the only DeepSeek model accepting image input. Images are normalised to at most 384 tokens each, up to 600 images per request. Since 14 September its name routes to V4.1-Flash.

V4.1-Flash, 10 September 2026 (API changelog, model card). 552B total, 8B active in prefill and 16B in decode; MIT licence; weights in 48 safetensors shards; 1M-token context, native vision, and a reasoning-effort dial from 1 to 100. Reported Terminal-Bench 2.1 at 90.6, a Codeforces rating of 3471 and GPQA Diamond at 90.9, with DeepSeek conceding it holds up better on shorter agent loops than on the longest-horizon evaluations: the generation bought serving cost rather than capability headroom. On the Artificial Analysis Intelligence Index (version 4.3, read 1 October 2026) the September build at maximum effort scored 39.5 at $0.27 per task (AA) against V4 Pro's 36.0 at $0.67: the smaller, newer model 3.5 points higher at about 40% of the cost per task. These are costs of running one evaluation task, not token prices; AA's blended token prices are $0.18 and $0.69 per million, so on token price V4.1-Flash is about 3.8 times cheaper, per task only about 2.5 times, because it spends more tokens on each task.

V4.1-Flash-1017, 17 October 2026 (DeepSeek news, model card). In DeepSeek's words "a minor update" that "reduces task execution time and output length"; MIT, served as deepseek-flash at unchanged prices. Its own table moves most on the long agent loops the September build conceded: Terminal-Bench 4.0 from 31.2 to 42.3 (in the Claude Code harness), DeepSWE v1.1 from 74.2 to 77.0 (mini-swe-v2 harness), AutomationBench v1.0.6 from 54.8 to 60.5 and Humanity's Last Exam without tools from 36.8 to 42.6; Claude Opus 5 still leads most rows of that table (51.8 on Terminal-Bench 4.0, 56.3 on HLE). Artificial Analysis: 45 at $0.26 per task (methodology 4.3.2, read 19 October 2026), second among open-weight models behind Xiaomi's MiMo-V2.6-Pro at 46. On Vals AI's fixed mini-swe-agent harness it scores 31.82% on Terminal-Bench 4.0 at $0.54 a task, against 65.15% for Claude Opus 5.5 at $13.20 (Vals AI); on Vals AI's composite index (updated 24 October) it is ninth at 61.26% for $0.66 a test, against $3.61 for GPT-6.1 Sol at 63.94% and $18.70 for the leader, Claude Sonnet 5.5, at 70.85% (Vals Index). Parameter counts disagree: Artificial Analysis and the September card give 552B, while the 1017 repository stores 763B of tensors. The same day DeepSeek opened two tool APIs priced per call: Search returns up to 50 ranked results and Fetch turns a page into Markdown, each at $0.75 per 1,000 successful calls, billed from 1 November 2026 (Beijing time), with calls through the server-side tools of DeepSeek Harness, Claude Code and Codex free before then (DeepSeek).

Trade-offs: what each choice buys and costs

ChoiceBuysCostsMatters most when
MLAA cache 57 times smaller than MHA at V3's dimensions, exact up to the latent, quality at or above MHAExtra projections, two kernel modes, a decoupled RoPE key; lagging support in serving stacksContexts long enough that the cache, not the weights, limits the batch
DSACore attention per token flat in context length past kAn indexer still quadratic overall; an approximation that must be trained in; the full cache stays residentLong-context decode where reading the cache dominates
CSA and HCAAbout 2% of a GQA-8 cache at 1M tokens; far fewer FLOPs per tokenLossy summaries, a sliding window to patch the local gap, a much more complex stackMillion-token contexts and long agent loops
Encoder-decoder (V4.1-Flash)Prefill through half the layers; one shared prompt cacheA shape serving stacks and tooling were not built for; weaker on the longest-horizon evaluations, by DeepSeek's own accountPrompt-heavy workloads with repeated long contexts
Fine-grained plus shared expertsFar more expert combinations at the same active budgetSmaller per-expert matrix multiplications, wider all-to-all trafficLarge-scale training and serving with wide expert parallelism
Aux-loss-free balancingBalance without a competing objectiveA control loop with its own rate to tuneEvery large MoE run
FP8 trainingRoughly half the memory traffic, loss within 0.25% of BF16A delicate stack: tile scales, precision promotion, higher-precision exceptionsCommunication- or memory-bound clusters such as H800s
GRPONo critic: about half the memory, one fewer modelMany rollouts per prompt; normalisation biasesVerifiable rewards, where scoring is cheap
Every specific figure links to its source. Values marked illustrative are inputs to a demonstration, not facts about a model, and every calculator result is computed from the formulas shown. Artificial Analysis Intelligence Index readings carry their version and reading date beside them.