AIAny. ← Back to AIAny

Lesson notes · one open model · 2,048 GPUs · one itemized bill

DeepSeek-V3

In December 2024 a technical report showed a GPT-4-class model trained for $5.576M — an order of magnitude below what frontier runs were assumed to cost. This page takes the report apart: you'll route tokens to experts yourself, run the tiny feedback loop that is its headline idea, and check the arithmetic behind the bill.

Subject Open-weights MoE language model Date Dec 26, 2024 Venue arXiv 2412.19437 Materials 2,048 × NVIDIA H800 Scale 671B total · 37B active

DeepSeek-AI · [email protected] — a single corporate byline; the report's Appendix A credits roughly two hundred named contributors across Research & Engineering, Data Annotation, and Business & Compliance. Weights and code: github.com/deepseek-ai/DeepSeek-V3.

The core idea

Spend parameters freely; spend GPU-hours grudgingly.

The obvious way to build a frontier model in 2024 was brute force: a dense network where every parameter works on every token, and a training bill to match. DeepSeek-V3 is built on a different premise — capacity is cheap if each token only wakes a sliver of it. The model stores 671 billion parameters but consults just 37 billion per token, organized as 256 small "experts" per layer of which a router picks 8.

Sparsity like that has a classic failure: a few experts hog all the traffic while the rest idle, and the standard fix — an extra loss term that punishes imbalance — degrades the very model it protects. The report's most-cited idea removes that tax: balance the experts with a bias nudged outside the loss function, so the language objective is never asked to compromise. Everything else — FP8 arithmetic, a pipeline that hides network traffic — exists to make sure the 2,048 rented GPUs never sit idle.

Every trick in this report serves one bet: sparsity at scale, cashed in for a $5.576M training bill.

PART A

A machine that spends carefully

What V3 is, and where the savings hide.

Step 1 · The black box

A token walks in, and only 37 of 671 billion parameters get out of bed.

From the outside, DeepSeek-V3 is the same kind of box as the GPT models: text goes in, the most likely next token comes out, repeat. Let's give it a sentence to chew on — the same one we'll feed to every diagram on this page:

The derivative of is prompt in DEEPSEEK-V3 671B parameters only 37B of them run 2x next token
Our running sentence. The highlighted token, derivative, is the one whose journey we'll trace through the machine.

The strange part is the number under the box: the model holds 671 billion parameters, yet each token is processed by roughly 37 billion of them — about 5.5%. A dense model multiplies every token by every weight it owns. V3 instead keeps most of its knowledge in specialist sub-networks called experts, and per token it consults only a handful — the way a hospital sends you to two relevant doctors, not to all two hundred and fifty six on staff.

Look at the second bar in the picture below: the pale stretch is capacity that exists but stays asleep for this particular token. That pale stretch is where the economics of the whole report come from — parameters you store but rarely pay to run.

an imaginary dense model of the same size all 671B parameters multiply every single token DeepSeek-V3 (Mixture-of-Experts) 37B awake (5.5%) the rest of the 671B sleeps until a token needs its specialty
Total parameters vs. working parameters. 37 ÷ 671 ≈ 5.5% — check it on a napkin.

From the abstract: “a strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token … requires only 2.788M H800 GPU hours for its full training.” Pre-trained on 14.8T tokens, then SFT and RL.

Step 2 · The blueprint

61 identical floors, each with two rooms: attention, then a hall of experts.

So the machine somehow keeps 634 billion parameters asleep per token. To see where the sleeping ones live — and which parts of the report touch which — we need the floor plan.

V3 is a standard Transformer stack, 61 blocks tall. Every block asks the same two questions about our sentence. First: what context matters here? — that's the attention room, where derivative goes looking for x². Second: which specialists should process this token? — that's the expert hall, where a small router picks 8 of 256 specialist FFNs (plus one shared generalist that serves everybody).

In the zoomed block on the right of the figure, note that the router sits in front of the expert row like a maître d'. Almost everything this report is famous for happens at that little desk.

The derivative of x² is … blocks 1–3 dense block 4 block 5 block 61 predict next token INSIDE ONE BLOCK — REPEATED ×61 (FROM BLOCK 4 ON) ROOM 2 · DEEPSEEKMOE — THE EXPERT HALL shared E-M E-L E-G E-C … ×256 router · picks 8 ROOM 1 · ATTENTION Multi-head Latent Attention (MLA) → Step 3 token enters out
The floor plan, first pass. We'll come back to this drawing in Step 8 and bolt one more module onto it.
① bias balancing → the router (Part B) ② multi-token prediction → the head (Step 8) ③ FP8 → every matmul (Step 9) ④ DualPipe → across 2,048 GPUs (Step 9)

One honest note before we zoom in: MLA and the expert layout are inherited from DeepSeek-V2 (2024), where they were first validated. What this report adds on top is the balancing trick, the extra prediction head, and the systems work — the four tags above. We'll take the rooms in order.

Model shape (§4.2): 61 layers, hidden width 7,168; the FFN of every block from the 4th onward is a MoE layer with 1 shared + 256 routed experts (each a small FFN of intermediate width 2,048), 8 routed experts active per token. E-M / E-L / E-G / E-C are our four stand-in experts for the toy examples ahead; the colors stay fixed for the rest of the page.

Step 3 · Attention on a budget (MLA)

MLA files a 576-number note per token instead of a 32,768-number transcript.

The floor plan showed two rooms per block. The expert hall holds the parameters; the attention room holds a different cost — memory that grows with every token you've already read.

When a model generates, each new token attends over all previous ones, so it keeps their attention keys and values (K and V) in a cache. With V3's dimensions — 128 heads, 128 numbers per head — a vanilla Transformer would store 2 × 128 × 128 = 32,768 numbers per token, per layer. At a 128K-token context that snowballs into hundreds of gigabytes.

Multi-head Latent Attention (MLA) refuses to store K and V at all. It squeezes each token's hidden state down to a latent vector of 512 numbers, caches that, and re-expands it into full keys and values only at the moment of use. One extra 64-number vector carries the token's position (its RoPE key, shared across heads). In the figure, everything inside the dashed cinnabar box is the entire per-layer memory footprint of derivative: 512 + 64 = 576 numbers.

derivative hidden state h — 7,168 numbers compress (one matrix) CACHED DURING GENERATION — 576 NUMBERS PER LAYER latent c — 512 shared RoPE key — 64 re-expand at use time → K and V for all 128 heads what vanilla attention (MHA) would cache per token-layer — 32,768 numbers what MLA caches — 576 numbers ≈ 57× smaller
Per token, per layer: 32,768 ÷ 576 = 56.9. The two bars are drawn to true scale — the cinnabar one is not a rendering bug.

The ratio is worth checking yourself: 2 × 128 × 128 = 32,768 raw numbers versus 512 + 64 = 576 cached ones — a factor of 56.9. Slide the context length below and watch what that factor does to real memory. Remember the model weights alone occupy roughly 671 GB in 8-bit form, and the cache comes on top, per sequence being served.

Try it

drag the context length

MHA cache
≈ 524 GB
MLA cache
≈ 9.2 GB

At 128K tokens: a vanilla cache would need ≈ 524 GB per sequence — more than six H800 GPUs hold in total. MLA's ≈ 9.2 GB fits in a corner of one. Both lines scale linearly, so the 57× gap never closes.

JavaScript is off — the numbers above show the 128K-token case.

The bookkeeping, in plain words

Per token-layer: cache = d_c + d_R = 512 + 64 = 576 numbers. Across 61 layers that is 35,136 numbers ≈ 70 KB per token at 2 bytes each; MHA-style would be 1,998,848 numbers ≈ 4.0 MB. Multiply either by 131,072 tokens for the 128K case: 9.2 GB vs 524 GB. The byte counts are our arithmetic from the paper's dimensions (§4.2), assuming 2-byte values.

Queries get low-rank-compressed too (to 1,536 numbers) — that one saves activation memory during training and doesn't touch the inference cache.

One question we'll leave at the door: how can attention run on compressed latents without wastefully re-expanding every cached token? The answer is a neat piece of algebra — the up-projection matrices can be absorbed into the query and output projections — and it lives in the DeepSeek-V2 paper (§2.1 there). For this page, "cache 576, expand on demand, lose nothing measurable" is all we need.

Dimensions from §4.2: n_h = 128 heads × d_h = 128; KV compression d_c = 512; decoupled RoPE key d_R = 64. MLA was introduced and validated in DeepSeek-V2; V3 inherits it unchanged in spirit.

PART B

Keeping 256 experts busy

The headline idea: load balance without an auxiliary loss.

Step 4 · The router

Score every expert, keep the top 8, mix them by their honest scores.

MLA just cut attention's memory 57-fold. Now for the expert hall — the room holding roughly 97% of V3's parameters — and the desk that decides which of them wake up.

The router owns one learned vector per expert — think of it as the expert's job description. For each token it computes an affinity score: the dot product of the token's hidden state with each job description, squashed through a sigmoid so it lands between 0 and 1. High score means "this looks like my kind of token".

The real model scores 256 experts and keeps 8. That's too many arrows to draw, so from here on we shrink the hall to four stand-in experts, keep the top 2 — same rules, same math, napkin-sized. Watch derivative get scored below: the math expert E-M wants it badly (0.90), the general expert E-G shrugs (0.55), and the two dashed outlines mark the winning shortlist.

E-M · math E-L · language E-G · general E-C · code s = 0.90 s = 0.35 s = 0.55 s = 0.30 g = 0.62 g = 0.38 derivative arrow thickness = affinity score
Our toy hall: four experts, top-2 routing. Dashed outlines mark the shortlist; g values are the mixing weights computed next.

Here is the full routing computation, small enough to redo on paper:

1

Score

Dot the token's hidden state with each expert's job-description vector, then sigmoid.

E-M 0.90 E-L 0.35 E-G 0.55 E-C 0.30
2

Shortlist

Keep the top 2 scores (top 8 of 256 in the real model). Everyone else stays asleep — that is the whole 37B-of-671B trick.

E-M E-G — E-L and E-C never run for this token
3

Normalize & mix

Rescale the two surviving scores so they sum to 1; blend the expert outputs with those weights, and add the always-on shared expert.

0.90 + 0.55 = 1.45 gM = 0.90 ∕ 1.45 = 0.62 gG = 0.55 ∕ 1.45 = 0.38

Eqs. (12)–(15): s_i = Sigmoid(u·e_i); top-K selection; gating values normalized over the selected set. V3 switched the affinity from V2's softmax to a sigmoid — scores no longer compete before the shortlist is drawn. The "97% of parameters" figure is our arithmetic: 256 experts × 58 MoE layers × ~44M params each ≈ 654B.

Step 5 · The failure mode

Winners keep winning — and the classic cure taxes the model.

The router sent derivative to E-M with a 0.90. Nothing stops it from sending x², 2x, and every other math token there too — and in our sentence, that is exactly what happens.

Route all six tokens of our sentence with the recipe from Step 4 and count the assignments: E-M gets 4, E-L gets 3, E-G gets 3, E-C gets 2. Twelve slots, so a fair share is 3 each — E-M is already over quota after one math-flavored sentence. Now run a math-heavy batch, a million times. Two bad things compound:

The spiral. Whoever wins a token receives its gradient and gets better at tokens like it, which raises its score, which wins it more tokens. Taken to the limit the router collapses onto a few superstar experts, and most of your 671B parameters become dead weight — trace the circle in the left pane below.

The stragglers. Experts live on different GPUs. If E-M's GPU gets 4 tokens while E-C's gets 2, the busy one finishes last and everyone else waits. At 2,048 GPUs, imbalance is not an aesthetic problem; it is idle silicon you are paying for by the hour.

the spiral

E-M wins the token gets its gradient, improves on math scores even higher on the next math token left alone, this loop ends in routing collapse

Rich-get-richer, in gradient form.

the classic fix, and its price

router & expert weights language loss: “predict 2x” balance loss: “spread evenly” two objectives, one set of weights — every gradient step is a compromise

The auxiliary loss balances by re-aiming the same gradients that model language.

The standard remedy since 2017 has been an auxiliary loss: add a term to the training objective that grows when expert loads drift apart, scaled by a coefficient α. It works — but look at the right pane: the balance gradient flows into the same router and expert weights that are trying to predict "2x". Set α small and imbalance persists; set it large and you've told a language model to care about queue fairness more than language.

Predict first: crank α to the max — what do the scores become?

Make your guess, then read on. With a huge α, the cheapest way to minimize loss is to make every expert equally likely for every token — the router's scores flatten toward uniform. But a uniform router encodes nothing about which expert is actually good at math; you've bought perfect balance with routing that has stopped meaning anything. The paper's ablation in Step 7 puts numbers on the milder, realistic version of this damage.

Routing collapse was named in the original MoE paper (Shazeer et al., 2017); auxiliary balance losses are standard in GShard and Switch Transformer. The paper's framing: "too large an auxiliary loss will impair the model performance" (§2.1.2).

Step 6 · The headline idea

One bias per expert, nudged ±γ after every step, balances the load — and never enters the loss.

An auxiliary loss buys balance by re-aiming gradients, and pays in model quality. V3's answer: get balance from something that gradients never see.

Give each expert one extra number: a bias b, starting at 0. When the router draws its shortlist, it ranks experts by s + b instead of s. And after every training step, a bookkeeper checks the batch statistics: experts that got more than their fair share have their bias cut by a small constant γ; experts that got less have it raised by γ. That's the entire mechanism — a thermostat bolted onto the router. Overworked experts cool down, idle ones warm up, no loss term anywhere.

Two details carry all the cleverness, so let's run one update by hand before the machine does it for us.

1

Count the batch

Route all six tokens of our sentence with b = 0 (Step 4's recipe, applied six times). Tally the 12 assignments against the fair share of 3:

E-M: 4 — over E-L: 3 — even E-G: 3 — even E-C: 2 — under
2

Nudge the biases

Pick γ = 0.02. Overloaded goes down, underloaded goes up, on-target stays. Write the new bias vector yourself, then check:

b_M = −0.02 b_L = 0 b_G = 0 b_C = +0.02
3

Re-rank derivative

New ranking scores s + b: E-M 0.88, E-G 0.55, E-L 0.35, E-C 0.32. Shortlist unchanged — one nudge moves nothing. Balance comes from the nudges compounding, step after step. Time to let the loop run.

0.90 − 0.02 = 0.88 0.55 0.35 0.30 + 0.02 = 0.32
Try it

set γ, then step the training loop

expert load — dashes mark the fair share (3 of 12)

E-M math
4 b +0.000
E-L lang
3 b +0.000
E-G gen
3 b +0.000
E-C code
2 b +0.000

focus token: derivative — ranked by s + b

M 0.90 G 0.55 L 0.35 C 0.30

picked M + G → weights from raw s, bias excluded:
gM = 0.90 ∕ 1.45 = 0.62 · gG = 0.55 ∕ 1.45 = 0.38

who each token consults (its top-2)

The LG derivative MG of LM MC is LG 2x MC

step 0 — loads 4·3·3·2 against a target of 3·3·3·3

What to watch, in order: ① at γ = 0.02, "of" is the first to defect — its second slot flips from E-M to E-G at step 2 (cinnabar ring = a changed pick), then dithers on the boundary for a few steps. ② Meanwhile b_C climbs steadily until E-C outbids E-G for derivative's second slot and the loads freeze at 3·3·3·3 (≈ step 11). ③ Reset, push γ to 0.15, and step: the biases overshoot and the loads seesaw forever. The real run picked γ = 0.001 — gentle beats fast.

JavaScript is off — the panel shows step 0; the caption describes what running it looks like.

Now the part that stopped us cold on first read. If the bias can overrule the scores — E-C just took a slot from E-G while scoring 0.25 less — hasn't the balancing hand already distorted the model, exactly what we blamed the auxiliary loss for? It took us a few passes through equation (16) to see why not, and the answer is in your simulator panel: after E-C won, the mixing weights were recomputed from the raw scores — 0.90∕1.20 = 0.75 and 0.30∕1.20 = 0.25. The bias decided who; it never touches how much.

So tally what the bias never enters: not the loss (no gradient ever points toward "be uniform"), not the mixing weights (raw s only), not the expert parameters themselves. Its one lever is the shortlist — occasionally you consult the #3 expert instead of #2 and pay a small, local price in fit. Compare that to the auxiliary loss, which re-aims every gradient of the network, all the time. V3 chooses the cheaper distortion.

Key property

The balancer is a feedback controller, not an objective — "controller" is our word for it, not the paper's. It watches load, tweaks rankings, and stays invisible to backpropagation. Language modeling never has to share its loss function with queue fairness.

pick top-K of (si + bi)  ·  weight by gi = si ∕ Σpicked sj

after each step:  bi ← bi − γ if overloaded,  bi + γ if underloaded

the whole headline idea — equation (16) plus one sentence of prose in §2.1.2

Real values: γ = 0.001 for the first 14.3T tokens, then 0 for the final 500B. Our toy freezes at perfect balance only because its 6-token batch never changes; in training every batch is new (and millions of tokens), so the controller keeps micro-correcting and the integer jitter you see here washes out. The 4-expert scores are invented for hand-arithmetic; the update rule is the paper's, verbatim.

Step 7 · The receipts

Drop the auxiliary loss, gain benchmarks — and the experts actually specialize.

You've run the thermostat by hand and seen what it never touches. A knob this simple still owes us evidence at scale — what improves, and what secretly breaks?

The paper trains matched pairs: same data, same architecture, one model balanced by auxiliary loss and one by the bias controller. At the larger scale tested (228.7B parameters, 578B tokens), the bias version wins most of the board — and, in the interest of honesty, loses one line. MMLU dips by 1.1 points; the paper claims a win on most benchmarks, not all, and the table backs exactly that:

Benchmark (228.7B scale)Aux-loss balancingBias balancingΔ
Pile-test (BPB, lower = better)0.6560.652−0.004
BBH (EM)66.767.9+1.2
MMLU (EM)68.367.2−1.1
HumanEval (Pass@1)40.246.3+6.1
GSM8K (EM)70.774.5+3.8
MATH (EM)37.239.6+2.4

There's a second, quieter payoff. The bias controller balances over the whole batch, not within every sequence — a looser leash. Freed from having to spread every single math document across all experts evenly, experts drift toward genuine specialties. In the paper's Figure 9 the effect is stark; our sketch below copies its shape: under the auxiliary loss (top strip) every expert carries a faint, similar load on every domain, while the bias-balanced model (bottom strip) shows a few hot cells per domain — the math specialists our toy's E-M was standing in for, now real.

with auxiliary loss — every expert a little of everything Wikipedia (en) GitHub DM Mathematics bias-balanced — hot cells are specialists Wikipedia (en) GitHub DM Mathematics each cell = one expert's relative load on that domain (16 of 64 experts shown)
Schematic, redrawn after the paper's Figure 9 (16B models, layer 9): cell darkness is illustrative; the uniform-vs-specialist contrast is the paper's finding.

Fine print on "auxiliary-loss-free": a tiny sequence-wise balance loss is kept as a safety net, α = 0.0001, "just to avoid extreme imbalance within any single sequence" (§4.2) — the headline idea does the work; this is the seatbelt. At serving time balance is handled by other means entirely (redundant copies of hot experts, §3.4). Thanks to the controller, V3 never drops a token, in training or inference.

PART C

The bill, and what it bought

Two more tricks, the invoice, the scoreboard.

Step 8 · Multi-token prediction

Every position also predicts the token after next — denser lessons now, faster decoding later.

The bias controller keeps all 256 experts earning their keep. The next idea squeezes more teaching out of every token the model reads — the second architecture contribution on the report's list.

Normally each position gets one lesson per pass: standing at "is", predict "2x". Multi-Token Prediction (MTP) adds a second assignment: a small bolt-on module — one extra Transformer block, borrowing the main model's embedding table and output head — takes the main model's representation of "is" together with the embedding of "2x" and predicts what comes after that: the "." in our sentence. Same data, nearly double the training signal. Because the module receives the true next token as input, the causal chain stays intact — it predicts two ahead given one ahead, not by guessing blindly.

Below is Step 2's floor plan, one module richer — the dashed box on the right is everything MTP adds. At inference you can simply unbolt it: the main model runs alone, at exactly its usual cost. Or keep it as a draft-writer: it proposes the token after next, the main model verifies, and when the guess sticks you emit two tokens for one pass. The paper measures the guess sticking 85–90% of the time, for 1.8× tokens per second.

MAIN MODEL 61 blocks (Steps 2–7) output head ◆ reading “… x² is” tokens in 2x predicts t+1 hidden state of “is” MTP MODULE (BOLT-ON) norm + concat + project one Transformer block → head ◆ embedding of “2x” — the true next token . predicts t+2 ◆ = embedding table and output head are shared, not duplicated unbolt at inference — or keep for drafting
V3 sets the depth to one extra token (D = 1). The module's loss joins training with weight λ = 0.3, later 0.1.

Ablation (Table 4, 228.7B scale, module discarded at inference so runtime cost is identical): HumanEval 44.5 → 53.7, GSM8K 72.3 → 74.0. Speculative decoding: second-token acceptance 85–90% across topics, ≈1.8× TPS (§5.4.3). Unlike parallel-head MTP (Gloeckle et al., 2024), V3's module is sequential and keeps the causal chain.

Step 9 · The machine room

Eight-bit arithmetic and a pipeline that hides the network — the GPUs almost never wait.

Architecture done: compressed attention, balanced experts, a second prediction head. The other half of the $5.576M story is plumbing, and we'll walk it briskly — two ideas, one pane each.

FP8 training. Store and multiply most tensors as 1-byte floats (format E4M3: 4 exponent bits, 3 mantissa bits) instead of 2-byte BF16 — roughly double the throughput on the same silicon, half the memory. The danger is outliers: one huge activation stretches the scale and squashes everything else to mush. V3's counter is fine-grained scaling — every 1×128 tile of activations and every 128×128 block of weights gets its own scale factor (left pane) — plus a precision patch: H800 tensor cores accumulate at only ~14 bits, so every 128 multiplies the partial sums are promoted to full FP32 registers. If that last sentence felt dense, keep just this: the loss curve of the FP8 model stays within 0.25% of the BF16 one — inside run-to-run noise, validated to about a trillion tokens. Nobody had shown that at this scale before.

DualPipe. Experts live spread across 8-GPU nodes, so routing tokens to them is an all-to-all network storm — naively, compute and communication take about equal time, meaning half your cluster-hours would go to waiting. DualPipe feeds micro-batches into the pipeline from both ends and schedules each forward chunk so its network phase runs underneath another chunk's compute phase (right pane). Only 20 of each GPU's 132 streaming multiprocessors babysit communication; tokens travel to at most 4 nodes.

FP8 — scale small groups, not whole tensors

activations — one scale per 1×128 tile ×s₁ weights — one scale per 128×128 block ×s₂ every 128 multiplies: promote sums to FP32 outliers only poison their own small group

Result: FP8 loss within 0.25% of BF16 (Appendix B.1).

DualPipe — network hides under compute

naive: compute waits for the network ≈ half the time is idle silicon DualPipe: overlapped lanes compute network transfers run beneath another batch's compute

Near-zero visible all-to-all overhead; no costly tensor parallelism needed.

We are folding whole subsections here — the paper spends six pages on custom communication kernels, recomputation tricks, and online quantization (§3.2–3.3). The honest one-line summary: none of it changes what the model computes; all of it changes what an H800-hour costs.

Cluster: 2,048 H800s — 16-way pipeline parallelism, 64-way expert parallelism across 8 nodes, ZeRO-1 data parallelism (§3.2). NVLink moves 160 GB/s inside a node; InfiniBand 50 GB/s between nodes — the 3.2× gap is why routing is capped at 4 nodes per token. FP8 validated on two smaller models (~16B and ~230B class) for ≈1T tokens each.

Step 10 · The invoice

2.788M GPU-hours, end to end. At $2 an hour: $5.576M.

FP8 halves the arithmetic cost; DualPipe stops the cluster from waiting on its own network. Time to add the whole thing up — Table 1 of the paper, redrawn.

The bar below is the entire official training run. Almost all of it is pre-training on 14.8T tokens; the thin band is the long-context extension to 128K, and the sliver on the right — squint — is all of post-training, SFT and RL together. That last one deserves a pause: turning the base model into a chat model cost about 0.2% of the budget.

total: 2,788K H800 GPU-hours = $5.576M pre-training · 2,664K hrs · $5.328M context extension 4K→128K · 119K hrs post-training (SFT + RL) · 5K hrs · $0.01M $2 per H800-hour — the paper's rental-price assumption
Table 1, drawn to scale — except the post-training sliver, which we widened to 3 pixels so it would survive rendering (true scale: ≈1 pixel).
180K GPU-hours / trillion tokenspre-training rate — 3.7 days per trillion on the 2,048-GPU cluster
< 2 monthswall-clock time for the full 14.8T-token pre-training run
0 loss spikes · 0 rollbacksthe entire run finished without an irrecoverable incident — the FP8 gamble held
14.8T tokensthe pre-training diet — with math and programming samples deliberately up-weighted vs V2

Read the number the way the authors themselves qualify it: this is the cost of the final, official run only — "excluding the costs associated with prior research and ablation experiments on architectures, algorithms, or data." The exploration that found these settings, the V2 lineage this builds on, and the internal R1-style model that generated reasoning data for post-training all sit outside the invoice. $5.576M is the marginal cost of reproducing the recipe, not the cost of discovering it — still a number that reset the industry's intuitions.

Table 1: 2,664K + 119K + 5K = 2,788K H800-hours; × $2/hr = $5.576M. All four cards are the paper's own figures (§1, §4.1). Its comparison, not ours: "training DeepSeek-V3 on each trillion tokens requires only 180K H800 GPU hours … much cheaper than training 72B or 405B dense models."

Step 11 · The scoreboard

The strongest open-weights model of 2024 — with GPT-4o and Claude in its mirrors.

A cheap model is only news if it is also a good one. Our running sentence retires here; the paper's own benchmark tables take the stand.

Two versions get graded. The base model comes out of pre-training as, in the paper's words, "the strongest open-source base model currently available", ahead of Llama-3.1-405B while activating a tenth of the parameters per token. The chat model — after SFT and RL, including distilled reasoning from an internal DeepSeek-R1 model — is compared against GPT-4o and Claude-3.5-Sonnet directly. Read the card as a profile, not a coronation: it wins math and competitive coding by wide margins, splits knowledge benchmarks, and concedes software-engineering agent tasks (SWE-bench) to Claude.

chat model · Table 6

DeepSeek-V3 (cinnabar) vs the best closed-source score in the same table (gray)

MATH-500 — competition math, greedy decoding
90.2
78.3 · Claude-3.5
Codeforces — percentile of human competitors
51.6
23.6 · GPT-4o
MMLU-Pro — graduate-level knowledge
75.9
78.0 · Claude-3.5
SWE-bench Verified — real repo bug-fixing
42.0
50.8 · Claude-3.5
Arena-Hard 85.5first open-weights model past 85 — judged head-to-head on hard prompts
AIME 2024: 39.2vs 9.3 (GPT-4o) and 16.0 (Claude-3.5) — the R1 distillation showing through
128K contexttwo YaRN phases after pre-training; needle-in-a-haystack stays solid across the range
Base model: 87.1 MMLUbeats Llama-3.1-405B on most benchmarks with 37B active parameters

One caveat the paper itself measures: distilling from the reasoning model lifts scores and lengthens answers — in the V2.5 ablation, MATH-500 jumps 74.6 → 83.2 while average response length doubles. Quality bought partly with verbosity; they tuned the trade-off rather than pretending it away.

Close the loop before you go — six questions, answers folded underneath. Use them to check what stuck:

Only 37B of 671B parameters run per token. Where do the others sit?

In the expert halls: 256 routed experts per layer × 58 MoE layers ≈ 97% of all parameters. The router wakes 8 per layer (plus 1 shared expert); the rest sleep for that token.

How does V3 balance experts without an auxiliary loss?

Each expert carries a bias b used only for shortlist ranking (s + b). After each step: overloaded experts get b − γ, underloaded get b + γ. Mixing weights still come from the raw scores, and no balance term ever enters the loss.

Why doesn't 128K context blow up the memory?

MLA caches a 512-number latent plus a 64-number RoPE key — 576 numbers per token-layer instead of MHA's 32,768. That's 57× less: ≈9.2 GB per 128K sequence instead of ≈524 GB.

What two things does the MTP module buy?

During training, a second prediction per position (denser signal — HumanEval +9 in the ablation). During inference, optional speculative decoding: 85–90% acceptance of the drafted token, ≈1.8× decoding speed.

What made the $5.576M bill physically possible?

Sparsity (37B active), FP8 (≈2× arithmetic throughput, halved memory), and DualPipe (all-to-all traffic hidden under compute) — capacity, precision, and communication each paying their share.

Which part of the headline number deserves a footnote?

It covers the final run only — research, ablations, the V2 lineage, and the reasoning-data generator are excluded, and $2/GPU-hour is a rental assumption. Marginal cost of the recipe, not total cost of the discovery.

What happened next — one month after this report, the same base model came back wearing reinforcement learning: DeepSeek-R1. The distillation loop described in §5.4.1 here was the preview.

“Comprehensive evaluations reveal that DeepSeek-V3 outperforms other open-source models and achieves performance comparable to leading closed-source models. Despite its excellent performance, DeepSeek-V3 requires only 2.788M H800 GPU hours for its full training.” — the abstract, DeepSeek-AI, 2024
The profound impact

The report that repriced the frontier.

Before V3, "frontier model" implied nine-figure budgets and closed weights. This report published the recipe, the weights, and the receipts — and each of its three biggest bets went on to outlive it.

Jan 2025 · one month later

DeepSeek-R1

Reinforcement learning on top of this exact base model produced the open reasoning model that rattled markets — and made "$5.576M" a number quoted far outside ML.

the toolkit

MLA & the bias balancer

Latent attention and auxiliary-loss-free balancing moved into the standard playbook for open MoE models; the FP8 fine-grained-scaling recipe anticipated the microscaling formats of next-generation GPUs.

open weights, frontier scores

The gap closed

First open-weights model past 85 on Arena-Hard, with day-one support across community runtimes — evidence that the open ecosystem could serve frontier-class models itself.

The report closes with a section of hardware suggestions addressed to chip vendors — a lab writing as if the frontier belongs to whoever engineers for it best.