Paper Breakdowns  /  DeepSeek-V3
Paper 41~8 min readDeepSeek · 2024
Paper Breakdown

DeepSeek-V3,
explained.

In late 2024, the going assumption was that a frontier model cost somewhere between $50M and $500M to train. Then a lab working on export-restricted GPUs published one for about $5.6M — open weights, full recipe — and matched the giants on the benchmarks that mattered. V3 isn't one clever idea; it's a stack of them, compounding: compress the attention cache, balance the experts without a tax, predict two tokens at once, and train the whole thing in 8-bit.

Video breakdown
The animated walkthrough is in production.
Read the full breakdown below in the meantime ↓
01

The shape: huge brain, small bite

V3 is a mixture-of-experts pushed toward its logical extreme: 671B total parameters, organized as many small experts, with a router activating only ~37B per token — about 5%. You store the knowledge of a giant; you pay the compute of a mid-size model. Each token consults 8 routed experts plus one shared expert that every token sees.

Fine-grained experts (many small ones rather than few big ones) give the router more precise choices — specialization without redundancy. The blueprint came from DeepSeek's own MoE work; V3's contribution was making this shape trainable and servable at 671B without the usual MoE taxes. Those taxes are what the next two sections remove.

02

MLA: shrink the cache, keep the quality

Serving throughput dies on the KV cache — the per-token attention state that grows with context and batch. Standard fixes (GQA, MQA) share keys and values across heads: less memory, some quality loss. V3's multi-head latent attention goes further: compress keys and values into one small latent vector, cache only that, and reconstruct full per-head K/V from it at use time.

MLA — cache the compression, not the keys
Hidden state
Down-project
small latent c
Cache c only
~1/10 the memory
Up-project at use
full heads restored

The result: KV memory an order of magnitude smaller than vanilla attention — longer contexts, bigger serving batches, cheaper tokens — with benchmark quality that matches or beats standard attention. It's the rare compression that costs nothing you can measure.

03

Load balancing without the auxiliary-loss tax

MoE's classic pathology: the router collapses onto a few favorite experts — they overload, the rest atrophy. The standard cure is an auxiliary loss punishing imbalance. But that loss competes with the language-modeling objective: you're paying quality to buy balance.

V3's fix is almost cheeky: auxiliary-loss-free balancing. Each expert carries a bias term used only for routing — not in the gradient, not in the output weights. Overloaded expert? Bias nudged down, fewer tokens routed there. Underused? Nudged up. Balance emerges from a feedback controller outside the training objective, so the model never trades quality for it.

The key idea

Separate the concerns: let gradients optimize prediction, let a bias controller manage traffic. The ablations show it beats auxiliary-loss balancing on both balance AND quality — a free lunch made of good engineering hygiene.

04

Multi-token prediction: denser signal, free speed

Standard training predicts one next token per position. V3 adds a lightweight module predicting the token after next as well — multi-token prediction (MTP). During training this densifies the learning signal (every position teaches two lessons) and pushes representations to plan a little further ahead.

At inference the MTP head gets a second life: it drafts the next-next token for speculative decoding, with ~85% acceptance — meaningfully faster generation, using machinery training already paid for. One module, two dividends.

05

FP8: training a frontier model in 8 bits

Most labs trained in BF16. V3 ran the bulk of its matrix math in FP8 — half the memory traffic, nearly double the arithmetic throughput on H800s — something widely considered too unstable at frontier scale. The stabilizers: fine-grained scaling (per-tile/per-block scale factors so outliers don't wreck a whole tensor) and high-precision accumulation (sums collect in FP32 before rounding back down).

Sensitive pieces — embeddings, norms, router, optimizer states — stay in higher precision. The headline stat that convinced everyone: zero irrecoverable loss spikes across the entire 14.8T-token run. Add DualPipe (overlapping the MoE's heavy cross-GPU communication behind compute) and the hardware efficiency story is complete.

06

The receipt: 2.79M GPU-hours

ItemNumber
Training data14.8T tokens
Total compute2.788M H800 GPU-hours
Rental-price cost≈ $5.576M
Benchmarkstop of open-weights; competitive with frontier closed models on math/code

The number needs its caveats — it excludes research, ablations, failed runs, salaries and the cluster itself — but the like-for-like comparison still landed like a thunderclap: contemporary frontier runs were estimated at 10–50× more compute spend. The efficiency stack above, compounding multiplicatively, is where the order of magnitude came from.

07

Why it still matters

V3 is the paper that made training efficiency a first-class research axis — after it, "what does your compute buy?" became as important a question as "how much compute do you have?" It's also the foundation everything DeepSeek-famous stands on: R1's reasoning RL runs on the V3 base, and the GRPO lineage got its frontier-scale proving ground here.

Architecturally, its ideas went mainstream fast: MLA-style cache compression, aux-loss-free balancing and MTP heads now appear across open models — including the next entry in this library, Kimi K2, which scales the same skeleton to a trillion parameters. And strategically, V3 + R1 reset the world's assumptions about who can afford to build frontier AI. The moat, it turned out, was partly an engineering culture.

Read next

The reasoning sequel: DeepSeek-R1. The MoE foundations: Mixture of Experts. The trillion-parameter descendant: Kimi K2.

Frequently asked

Quick answers

What is DeepSeek-V3?

A 671B-parameter open-weight MoE (37B active/token), trained on 14.8T tokens for ~2.79M H800 GPU-hours (≈$5.6M) — frontier-competitive at a fraction of assumed cost.

What is MLA?

Multi-head latent attention: cache a small compressed latent instead of full keys/values, reconstructing them at use time — ~10× less KV memory, no measurable quality loss.

What is aux-loss-free balancing?

A routing-only bias per expert, adjusted like a feedback controller, balances MoE load without adding a loss term that competes with prediction quality.

Why did the cost figure matter?

It proved engineering could substitute for compute budget at the frontier — resetting industry and market assumptions about who can train top models.

Finished this one? 0 / 42 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns