Papers · 2024 · added to the knowledge base 2026-08-24 · Reading: 32 min, plus 6 in closed details.
Paper · Technical report, arXiv 2024 · arXiv 2412.19437

DeepSeek-V3 Technical Report (DeepSeek-V3)

DeepSeek-AI (about 200 authors, listed alphabetically by first name within each role in Appendix A)
DeepSeek (Hangzhou) · December 2024 (arXiv v1 27 December 2024; v2 18 February 2025)

In one line: 671B/37B-active MoE matching GPT-4o-class models via MLA, aux-loss-free routing, MTP, and FP8/DualPipe co-design for 2.788M H800 hours (~$5.6M marginal compute).

2.788M H800 GPU hours
the whole official run: pre-training, context extension, post-training
$5.576M at an assumed $2 an hour; excludes research and ablations · Table 1
37B of 671B
parameters active per token: 8 of 256 routed experts plus 1 shared, in 58 of 61 layers
recounted from config.json: 37.55B and 671.03B · §4.2
< 0.25% loss gap
FP8 against BF16 training, relative, at 16B and 230B scale for about 1T tokens
with 1×128 / 128×128 scaling and promoted accumulation · Appendix B.1

How far to trust it: Believe the engineering and the bill as the paper defines it: one final run, and the GPU hours agree with a FLOPs count at the same utilisation Llama 3 reported. Treat the MTP and auxiliary-loss-free wins as real but small, single-run and not quite like for like, and the benchmark tables as the authors' own harness. The evidence, judged.

The idea in one sentence: DeepSeek-V3 is cheap because a mixture of experts that runs 37B of its 671B parameters per token does a tenth of a dense 405B model's arithmetic, and FP8 training, the DualPipe schedule and custom all-to-all kernels stop the experts' cross-node communication from eating that saving: the whole official run took 2.788M H800 GPU hours.

You need: routing, top-k gates and expert parallelism are taught on Mixture of experts; MLA as an attention design, with its cache animated, on Attention variants; FP8 formats and scaling granularity on Quantization and Precision; pipeline, expert and ZeRO data parallelism on Distributed Training. The DeepSeek lab page animates MLA token by token, recomputes the KV cache across DeepSeek's generations and simulates DualPipe against 1F1B and ZB1P; this page builds what is specific to this report: its claims checked line by line, the training-cost arithmetic, FP8 run live, and what its own evidence says about multi-token prediction and auxiliary-loss-free balancing. New terms: shared and routed experts (one expert every token uses, and 256 a router chooses among); auxiliary-loss-free balancing (a per-expert bias that steers selection, instead of a loss); MTP (multi-token prediction, an extra module trained to predict the token after next); DualPipe (V3's pipeline schedule that overlaps one chunk's communication with another's compute); 1×128 tile, 128×128 block (the groups that share one FP8 scale); promoted accumulation (moving partial sums to FP32 every 128 products); H800 (the export version of the H100: same compute, NVLink cut to 160 GB/s).

Seven co-designed pieces, two jobs, one bill

Each box is a section below, with the number the paper gives for it: §2.1 and §4.2 (MoE, MLA), §2.1.2 (balancing), §5.4.3 (MTP's 1.8×), Appendix B (FP8), §3.2 (DualPipe, kernels), Table 1 (the bill). The Llama ratios are derived on this page (The bill). The model row is mostly inherited from DeepSeek-V2 (MLA, DeepSeekMoE); what is new in V3 is the balancing rule, MTP, FP8 at this scale and the system row.

Problem

§1 Introduction

Open models trailed the frontier closed ones (GPT-4o, Claude 3.5 Sonnet), and the assumed fix, more dense parameters on more GPUs, was priced out of reach for most labs. DeepSeek-V2 had already validated two efficiency choices: MLA for cheap inference and DeepSeekMoE, fine-grained mixture-of-experts, for cheap training (§1). V3 asks how far co-design of algorithms, frameworks and hardware can push a 671B-parameter MoE trained on 2,048 export-restricted H800s (§3.1). Three things had to work at once: an MoE balanced without the auxiliary loss that damages quality, FP8 training that does not diverge at this scale, and expert parallelism across nodes without the all-to-all communication becoming the bottleneck.

The report's answer, in its own words: 671B total parameters, 37B active per token, 14.8T training tokens, "remarkably stable" training with no irrecoverable loss spikes and no rollbacks, and 2.788M H800 GPU hours for the whole thing (abstract).

Architecture: MLA and DeepSeekMoE, as in V2

§2.1, §4.2

The block is a Transformer with two substitutions (§2.1, Figure 2); everything not stated follows V2. The sizes (§4.2): 61 layers, hidden size 7,168, 128 attention heads of 128 dimensions, every learnable weight initialised with standard deviation 0.006. A byte-level BPE tokenizer with 128K tokens (§4.1).

Multi-head latent attention. Keys and values are generated from one low-rank latent per token: the input ht is down-projected to ctKV of size dc = 512 (Eq. 1), then up-projected per head for keys and values (Eq. 2, Eq. 5), plus a "decoupled" RoPE key ktR of 64 dimensions shared by all heads (Eq. 3, Eq. 4; why RoPE needs it, the mechanism Attention variants owns: RoPE cannot pass through the absorbed product). Only cKV and kR are cached: 576 numbers per token per layer, against 2 × 128 × 128 = 32,768 for a standard 128-head, 128-dimension attention, about 57 times fewer (71 times against an MHA with V3's 192-dimension keys; recompute.py), "while maintaining performance comparable to standard Multi-Head Attention" (§2.1.1; the evidence is V2's).

MLA's two smaller details (queries, absorption)

Queries get their own low-rank compression to dc′ = 1,536 (Eq. 6 to 9), only to cut activation memory in training. At inference the up-projections can be absorbed into the neighbouring matrices. The step-by-step animation, prefill against decode and the cache sizes are on the DeepSeek lab page.

DeepSeekMoE. Every feed-forward layer except the first three is an MoE layer of 1 shared expert and 256 routed experts, each with intermediate size 2,048; each token uses 8 routed experts (§4.2). Affinities are now a sigmoid of the token against each expert's centroid (Eq. 15), not V2's softmax, and the top-8 scores are renormalised to sum to one to give the gates (Eq. 13 to 14). Routing is node-limited: a token may reach experts on at most M = 4 nodes, chosen by the sum of the highest Kr/M = 2 affinities on each node (§2.1.2). The released config expresses the same rule as 8 expert groups of which 4 are kept per token (n_group, topk_group in config.json). V3 also keeps V2's extra RMSNorm after the compressed latents and scaling factors at the width bottlenecks (§4.2).

Predict: with 97% of the weights in routed experts, which share of the active parameters is attention? Then switch the chart beside this section, which recounts where the parameters live from the released configuration (the paper prints only the two totals).

Where the 671B parameters live

Load balancing without an auxiliary loss

§2.1.2, §4.5.2, §4.5.3

An MoE whose router sends most tokens to a few experts collapses and, under expert parallelism, wastes the GPUs that hold the idle experts (§2.1.2; routing collapse and the auxiliary-loss cure of Switch and GShard are taught on Mixture of experts). The paper's objection to the cure: "too large an auxiliary loss will impair the model performance".

V3's rule. Each routed expert gets a bias bi that is added to its affinity only to choose the top 8 (Eq. 16); the gate that multiplies the expert's output still uses the raw affinity, so the bias never enters the gradient. After every step, measured over the whole batch, the bias of an overloaded expert falls by γ and that of an underloaded one rises by γ, the "bias update speed": γ = 0.001 for the first 14.3T tokens and 0 for the last 500B (§4.2). A complementary sequence-wise balance loss (Eq. 17 to 20) is kept with α = 0.0001, "just to avoid extreme imbalance within any single sequence". With balance held, V3 drops no tokens in training, and serving keeps balance with its own deployment strategy, so it drops none in inference either (§2.1.2). The animation of this control loop, and of balancing scope, is in Mixture of experts.

The evidence in this report. Two ablations (Table 5): a 15.7B-total, 2.4B-active MoE on 1.33T tokens and a 228.7B-total, 20.9B-active MoE on 578B tokens, each trained once with auxiliary losses (at V2-Lite's and V2's strengths) and once with the bias rule instead, same data and architecture. The bias rule wins 9 of 10 benchmarks at the small scale (MBPP drops 36.6 to 35.8) and 8 of 10 at the large scale (MMLU drops 68.3 to 67.2, DROP ties at 67.1); the largest gains are HumanEval +6.1 and GSM8K +3.8 at the large scale (as bars). Then a sharper question (§4.5.3): is the gain from dropping the loss, or from where balance is enforced? The bias rule balances each batch; the auxiliary loss balances each sequence, a strictly tighter constraint that forbids experts from specialising by domain within a sequence. Figure 9 and Appendix C show the bias-balanced 16B model's experts specialising more by Pile domain.

DeepSeek also trained a third variant: an auxiliary loss computed over each batch instead of each sequence, tuned to reach similar batch-wise balance. How did its validation loss compare with the bias rule's?

Batch-wise balance has two costs the paper names (§4.5.3): imbalance inside single sequences or small batches, handled by training with large expert- and data-parallel micro-batches, and domain shift at inference, handled by redundant experts in deployment (below). The serving side, a port of DeepSeek's EPLB, is on the DeepSeek lab page.

Balance by batch, by any method, and the loss is the same

1B MoE models: 2.258 with the sequence-wise loss, 2.253 with the bias rule, 2.253 with a batch-wise loss. 3B MoE models: 2.085, 2.080 and 2.080 (§4.5.3). Bars start at 2.0 so the differences are visible; they are 0.005 nats, and every number is a single run.

Multi-token prediction

§2.2, §4.5.1, §5.4.3

Inspired by Gloeckle et al., V3 trains each position to predict more than the next token, to densify the training signal and perhaps let the model "pre-plan its representations" (§2.2). Unlike Gloeckle et al.'s parallel independent heads, V3's modules are sequential and keep the full causal chain, like EAGLE's draft heads but used for training (Figure 3; the two designs side by side are drawn on Families and objectives). V3 trains one module (depth D = 1) and weights its loss by λ = 0.3 for the first 10T tokens, 0.1 for the last 4.8T (§4.2).

The MTP module, equation by equation (§2.2, Eq. 21 to 25)

The k-th module shares the main model's embedding and output head and adds one Transformer block and a projection Mk of size d × 2d; it combines the previous depth's representation with the embedding of token i + k (Eq. 21), runs its block (Eq. 22) and predicts token i + k + 1 (Eq. 23). The loss is the depth-averaged cross-entropy times λ (Eq. 24 to 25). The pipeline puts the embedding and the output head on the same pipeline rank, so the MTP module shares their parameters and gradients physically (§3.2.3).

At inference the module can be discarded, so a model trained with it costs exactly the same to run; or it can be repurposed as a draft for speculative decoding (§2.2; how drafting and verification work is on Speculative decoding). On Hugging Face the release is 685B: 671B of main model plus 14B of MTP module (README); recounted from the config, the module's block alone is 11.6B and its file carries its own copies of the embedding and head.

The evidence. Table 4: a 15.7B MoE on 1.33T tokens and a 228.7B MoE on 540B tokens, each with and without a depth-1 MTP module. MTP wins 8 of 10 benchmarks at the small scale (one tie on Pile BPB, NaturalQuestions 22.7 to 22.3) and 9 of 10 at the large scale, where MMLU drops, 67.5 to 66.6. The biggest gains are on code and maths: HumanEval +6.1 (small) and +9.2 (large), GSM8K +6.0 (small) (as bars). The paper summarises this as "consistently enhances the model performance on most of the evaluation benchmarks", which is fair.

Used for speculative decoding, the MTP module's second-token guess is accepted 85 to 90% of the time. What speed-up in tokens per second did DeepSeek measure?

Infrastructure: DualPipe, all-to-all kernels, no tensor parallelism

§3.1, §3.2

The layout. 2,048 H800s, 8 per node on NVLink and NVSwitch, InfiniBand (IB) between nodes (§3.1). The in-house HAI-LLM framework runs 16-way pipeline parallelism, 64-way expert parallelism across 8 nodes and ZeRO-1 data parallelism, and no tensor parallelism (§3.2). So 2,048 / 16 = 128 GPUs serve each pipeline stage and, in each layer, 256 / 64 = 4 routed experts sit on each GPU (derived).

DualPipe. Cross-node expert parallelism makes compute and communication roughly 1:1 (§3.2.1). DualPipe splits each chunk into attention, all-to-all dispatch, MLP and all-to-all combine (backward chunks further into backward-for-input and backward-for-weights, as in ZeroBubble), pairs a forward chunk with a backward chunk, and reorders them with a hand-tuned split of SMs between compute and communication, so that both the all-to-all and the pipeline communication are hidden (Figure 4). Micro-batches are fed from both ends of the pipeline at once (Figure 5, 8 ranks and 20 micro-batches). Table 2 gives its cost:

MethodBubbleParametersActivations

F, B, W: time of a forward chunk, a full backward chunk and a backward-for-weights chunk; F&B: two mutually overlapped chunks. DualPipe keeps two copies of the parameters, cheap because the expert-parallel degree is large; it needs only the stages and micro-batches to be divisible by 2 (Chimera also needs micro-batches divisible by stages), and neither bubble nor activation memory grows with more micro-batches (§3.2.1). The chunk-by-chunk simulation of all three schedules is on the DeepSeek lab page; DeepSeek released the scheduler as DualPipe in February 2025.

All-to-all kernels: one IB crossing per node

NVLink gives 160 GB/s, about 3.2 times IB's 50 GB/s (§3.2.2). So a token crosses IB once per target node, to the GPU with the same in-node index, and is then forwarded over NVLink to the GPUs holding its experts, the two transfers overlapping. Each token can use on average 3.2 experts per node at no extra NVLink cost, so with at most 4 nodes the same communication could serve up to 13 experts (4 × 3.2 = 12.8) where V3 uses 8.

  1. One node, then the group. Node 1: 8 GPUs on NVLink, each holding 4 of a layer's 256 routed experts (the small blocks; 256 / 64, derived); the token (orange) sits on one of them. The expert-parallel group is 8 such nodes, 64 GPUs, joined by InfiniBand.
  2. Score each node. The router's affinity for each of the 256 experts is summed over each node's two best experts (Kr/M = 8/4 = 2); the bar on each node is that sum.
  3. Keep four nodes. The M = 4 highest-scoring nodes are kept, here nodes 1, 5, 6 and 8. No expert on the other four can be chosen, which caps how many nodes a token's traffic reaches.
  4. Pick the top 8 experts among them. The 8 highest affinities on the kept nodes (green): 2 on node 1, 3 on node 5, 1 on node 6 and 2 on node 8. The bias bi would only shift which experts win; the gates use the raw affinities.
  5. Cross IB once per remote node. The token travels to each of the 3 remote nodes once, landing on the GPU with its own in-node index: 3 IB sends, where a copy for each off-node expert would take 6.
  6. Fan out over NVLink. Inside each node the landing GPU (or, on node 1, the token's own GPU) forwards it to the expert GPUs at 160 GB/s, 7 forwards in all; a landing GPU that holds an expert itself keeps its copy. The IB and NVLink transfers overlap.
  7. Combine on the way back. The experts' outputs return along the same route in reverse (yellow), and the token's GPU adds them up, each weighted by its gate.

Fig. 1: the layout and the routing rule are the paper's (§2.1.2, §3.2.2); the token's 256 affinities are illustrative (seeded random sigmoids), so which nodes and experts win is one example.

Only 20 SMs, split into 10 channels with warp specialisation (IB sending, IB-to-NVLink forwarding, NVLink receiving, and the mirror for combine), saturate both fabrics; custom PTX instructions and auto-tuned chunk sizes cut L2 cache use and interference with compute (§3.2.2). DeepSeek released these as DeepEP.

Memory savings that let V3 skip tensor parallelism (§3.2.3)

Memory, to avoid tensor parallelism (§3.2.3): recompute every RMSNorm and every MLA up-projection in the backward pass instead of storing their outputs; keep the exponential moving average of the weights (used to estimate performance after learning-rate decay early) in CPU memory, updated asynchronously; and share the embedding and output head between the MTP module and the main model on one pipeline rank.

Serving: the prefill and decode layouts (§3.4)

Serving (§3.4) separates prefill and decode. Prefill's smallest unit is 4 nodes, 32 GPUs: attention in 4-way tensor parallelism with sequence parallelism and 8-way data parallelism, the MoE in 32-way expert parallelism, dense MLPs of the shallow layers without tensor parallelism; 32 redundant experts, duplicates of the hottest ones re-chosen from live statistics about every 10 minutes and rearranged within nodes, give each GPU its 8 experts plus one; two micro-batches overlap attention and MoE of one with dispatch and combine of the other (§3.4.1). Also explored: hosting 16 experts per GPU and activating 9, with a globally optimal routing computed on the fly. Decode's smallest unit is 40 nodes, 320 GPUs: attention TP4 with SP and DP80, the MoE EP320 with one expert per GPU, 64 GPUs for redundant and shared experts (the shared expert treated as a routed one always selected, so 9 per token), point-to-point IB transfers with IBGDA; per-expert batches are usually within 256 tokens, so decode is memory-bound and the MoE path can run on few SMs, overlapped with another micro-batch's attention (§3.4.2). Serving across nodes in general is taught on Distributed and disaggregated serving.

The wishlist to hardware vendors (§3.5)

The wishlist to hardware vendors (§3.5): offload communication from the SMs (20 of 132 used, with tensor cores idle) to a co-processor like NVIDIA SHARP, and unify the IB and NVLink domains behind simple read, write, multicast and reduce primitives; higher FP8 accumulation precision in tensor cores; native tile- and block-wise scaling inside the MMA; fused FP8 cast with TMA, a warp-level cast instruction, or near-memory casting that would cut off-chip traffic by about 50%; and direct transposed reads from shared memory for the 1×128 to 128×1 re-quantisation the backward pass needs.

FP8 training

§3.3, Appendix B

The report claims the first validation of FP8 mixed-precision training on an extremely large model (§1). The framework (§3.3.1, Figure 6): all three GEMMs of every linear layer, Fprop, Dgrad and Wgrad, take FP8 inputs and produce BF16 or FP32, theoretically doubling speed over BF16, and FP8 Wgrad lets activations be cached in FP8 for the backward pass. Kept in BF16 or FP32: the embedding, the output head, the MoE gating, normalisation and attention. Master weights and weight gradients stay FP32; AdamW's two moments drop to BF16 without observable loss (§3.3.3). Four changes make it work (§3.3.2); the first two run below in your browser with exact arithmetic, each as the method V3 replaced against the one it adopted on the same input.

The two FP8 formats, in the numbers the simulator uses

E4M3: 4 exponent bits, 3 mantissa bits, largest value 448, smallest normal 2−6, smallest subnormal 2−9: about 218 of range, rounding error up to 1/16 of a value. E5M2: largest 57,344, smallest normal 2−14, smallest subnormal 2−16: 232 of range, twice the rounding error. Below the smallest normal a value is subnormal and keeps fewer mantissa bits; below half the smallest subnormal it becomes zero. Rounding is to nearest, ties to even; values above the maximum saturate. How the formats are built bit by bit is on Quantization and Precision.

Activations quantised to E4M3 with one scale per tensor. Two channels carry outliers 100,000 times larger than the rest. What share of the ordinary values survive as non-zero FP8 numbers?

1. Fine-grained scaling: one scale per tensor, per 1×128 tile, or per 128×128 block

Scaling a whole tensor so its largest value maps to FP8's largest makes everything else hostage to outliers. V3 scales activations per 1×128 tile (one token, 128 channels) and weights per 128×128 block (Figure 7a), each scale computed online from the group itself so that its largest magnitude lands on 448. Standard FP8 GEMMs cannot take per-group scales along the inner dimension; V3 applies them during the promoted accumulation. The paper notes this is the idea behind microscaling formats, which NVIDIA's Blackwell tensor cores support natively.

  1. The activations. A matrix of 32 tokens × 512 channels of unit-variance values lies on the plate, with outliers 105 times larger on channels 38 and 301 of every token (the purple ridges).
  2. One scale for the whole tensor. The largest magnitude, 3.1 × 105 on an outlier channel, divided by 448 (E4M3's largest value) is the scale: one outlier sets it for all 16,384 values.
  3. Rounded with that scale. Every value shrinks about 700 times: a typical value of 1 lands at 0.0014, among the subnormals (the smallest is 2−9, about 0.002), and anything under about 0.7 rounds to zero. 8,190 of 16,384 values become zero (red) and 8,130 more are subnormal (yellow).
  4. One scale per 1×128 tile, V3's choice for activations. 128 scales, one per token per 128 channels. The tiles that hold an outlier channel still get a tall scale; the other half get scales set by ordinary values (as small as 2.0 ÷ 448).
  5. Tiles confine the damage. Zeros fall to 1,146 and subnormals to 5,366, all in the tiles that share a channel group with an outlier; the clean tiles keep full FP8 precision.
  6. Outliers on two tokens instead. With the outliers on tokens 6 and 22, in every channel, only those two tokens' 8 tiles get tall scales, and rounding loses 1 value (2 subnormal): a 1×128 tile never mixes two tokens.
  7. 128×128 blocks on the same tokens (Appendix B.2). A 128×128 block spans every token, so each of the 4 blocks takes an outlier token's scale and 7,574 values become zero, close to one scale per tensor (8,505 on the same matrix). This is the mechanism the paper suspects behind the divergence of block-wise activation gradients.

Fig. 2 runs the page's FP8 simulator (the widget below and check_fp8.mjs use the same code) on illustrative random values, not V3's tensors. Bar height is log10 of the group's largest magnitude; each 1×128 strip of the plate is tinted by the share of its 128 values that became zero or subnormal. Weights would use 128×128 blocks; how each of V3's matmuls takes its inputs is drawn on Quantization and Precision (Fig. 10).

Then try it: the widget beside this paragraph opens on the per-tensor run with outliers of 105 (step 3 of Fig. 2). Move the outliers, change their size or the granularity, and see each value's fate; switch the format to E5M2 and nothing is lost to range, but every value carries twice the rounding error.

The matrix is 32 tokens × 512 channels of unit-variance values (sums of 12 uniforms), with outliers multiplied in; one pixel column per channel, one row per token. Colours: in the rounding outcome, grey kept at full FP8 precision, yellow subnormal (fewer mantissa bits), red flushed to zero; in the relative error, white to red. Weights would use 128×128 blocks in V3; only activations are shown.

One dot product of length K; inputs rounded to E4M3, so every product is exact and the true sum is known exactly. The chart is the relative error of the running sum against the exact running sum; for Gaussian inputs, whose running sum crosses zero, the error is divided by the sum of the products' magnitudes instead.

2. Promoted accumulation: 14 bits in the tensor core, or FP32 every 128

On the H800 the FP8 tensor cores accumulate with about 14 bits; on two random matrices with K = 4,096 the maximum relative error was "nearly 2%". V3 copies the partial sum to FP32 registers on the CUDA cores every NC = 128 elements (4 WGMMA instructions), applying the dequantisation scales there; with two warpgroups in flight one promotes while the other multiplies, so the tensor cores stay busy (Figure 7b).

The paper's description of the hardware (§3.5.2, v2): each MMA instruction aligns 32 products to the largest exponent, keeps "the highest 14 bits of each mantissa product", truncates the rest, and accumulates into registers "also" at 14-bit precision. That admits two readings, both simulated: A, the running sum joins the alignment of each group of 32, so as it grows the incoming products lose their low bits (the v1 text's "fixed-point accumulation"); B, the 32 products are aligned among themselves and their sum is added to a register that keeps 14 significant bits (the FP22 accumulator others measured on Ada). Both truncate toward zero.

Predict, then play: with reading A at K = 4,096, does the tensor-core-only error grow steadily or stay flat? Every addition throws away the bits below the accumulator's 14-bit window, so it climbs; with promotion the window restarts every 128 elements and the error stays flat. The two buttons above the chart switch between the tensor core alone and promotion every 128; each replays the steps.

  1. Form the products. K pairs of inputs, each rounded to E4M3. The product of two E4M3 numbers has at most 8 significant bits, so every product is exact; only the adding can lose anything.
  2. The first MMA: 32 products. One tensor-core instruction adds 32 products. The 14-bit window sits at the largest of them; while the running sum is small, almost nothing falls outside it.
  3. The first 128 elements. Four instructions. With promotion, the partial sum is now copied into an FP32 register on the CUDA cores and the 14-bit sum restarts from zero (Figure 7b of the paper). Without it, the sum keeps growing inside the tensor core.
  4. To 1,024. Without promotion the running sum is now hundreds of times larger than a single product, so the window has moved up and each new product keeps only its top bits. Truncation always rounds toward zero, so the losses add up instead of cancelling.
  5. To K. The rest of the dot product (K = 4,096 by default): steady growth of the error without promotion, flat with it.
  6. The result. The final relative error of this mode, with the other mode's curve faint behind it; the closed block below the box has every K.
What reproduces, and what does not

Reproduces: the error of 14-bit accumulation grows with K, roughly in proportion for positive inputs, and promotion every 128 elements removes most of it (with uniform inputs at K = 4,096, from 6.8% to 0.05% under reading A, from 0.28% to 0.012% under B). Does not reproduce exactly: the paper's "maximum relative error of nearly 2%" at K = 4,096. The paper gives neither the input distribution nor the error metric, and its two versions describe the hardware differently; the two readings bracket 2% (0.28% and 6.8%) without either hitting it. Fine-grained scaling's benefit reproduces as the mechanism the paper names (outliers pushing ordinary values below E4M3's range), not as a training-loss number, which needs a real training run. The simulator is a line-by-line port of fp8_sim.py; check_fp8.mjs runs this page's code against it and the two agree exactly on all 283 numbers compared. Inputs are illustrative random matrices, not V3's tensors.

Error against K, both readings, both modes (the chart behind the box)

Each point is 16 dot products of length K; for uniform inputs the largest relative error among them, for Gaussian inputs (whose sums can sit near zero) the error relative to the size of the outputs, ‖error‖ / ‖exact‖.

3 and 4. Mantissa over exponents; online scales

Mantissa over exponents. Earlier recipes used E4M3 for the forward pass and E5M2, with more range, for gradients. V3 uses E4M3 everywhere, because per-group scales share exponent bits across each group and give back the range (the format switch in the scaling animation shows the trade). Online scales. Each tile's or block's maximum is computed when it is quantised, not inferred from a history of past steps (delayed scaling).

Storage and communication in lower precision (§3.3.3)

Storage and communication go lower still (§3.3.3). Activations cached for backward are FP8, except the inputs of the linear layer after attention (also used by the attention backward, so precision-sensitive), kept in a custom E5M6 format with power-of-two scales because they are re-tiled from 1×128 to 128×1; SwiGLU inputs in the MoE are cached in FP8 and its output recomputed. Activations are quantised to FP8 before the MoE dispatch, with power-of-two scales, and so are activation gradients before the MoE down-projection; the combine steps stay BF16.

The evidence (Appendix B, Figure 10): about-16B and about-230B MoE models trained in FP8 and in BF16 for 1.33T and about 0.9T tokens, with the FP8 loss within 0.25% relative of BF16's, "well within the acceptable range of training randomness" (§3.3). One negative result: quantising the activation gradients in 128×128 blocks like the weights (which would make the backward re-tiling a simple transpose) made a 16B MoE diverge after about 300B tokens; the authors' hypothesis is token-correlated outliers in activation gradients, which a block that spans 128 tokens cannot absorb (Appendix B.2). The simulator reproduces the mechanism of that hypothesis: put the outliers on a few tokens and 128×128 blocks lose about as many values as one scale per tensor, while 1×128 tiles lose almost none.

Pre-training

§4.1 to §4.3

Data (§4.1): 14.8T tokens, with more maths and code than V2, more languages beyond English and Chinese, and less redundancy. Documents are packed without cross-sample attention masking. Fill-in-the-middle in the prefix-suffix-middle layout, inherited from DeepSeekCoder-V2, is applied to 10% of documents.

A tokenizer fix (§4.1)

The tokenizer's new tokens that join punctuation and line breaks caused a token-boundary bias on multi-line prompts without a final newline, so a share of them are randomly split during training.

Hyper-parameters (§4.2)

Hyper-parameters (§4.2): AdamW with β1 = 0.9, β2 = 0.95, weight decay 0.1, gradient clipping 1.0, sequence length 4K. Learning rate: linear warm-up to 2.2 × 10−4 over 2K steps, constant until 10T tokens, cosine decay to 2.2 × 10−5 over 4.3T tokens, then 2.2 × 10−5 for 333B tokens and 7.3 × 10−6 for the last 167B. Batch size ramps from 3,072 to 15,360 sequences over the first 469B tokens.

Long context (§4.3): YaRN applied only to the decoupled key kR (scale s = 40, α = 1, β = 32, √t = 0.1 ln s + 1; YaRN itself is taught on Positional Encodings), then two 1,000-step phases that take the window from 4K to 32K and then to 128K, at learning rate 7.3 × 10−6: 32K sequences in batches of 1,920, then 128K in batches of 480. After fine-tuning the model passes "Needle in a Haystack" across the whole 128K window (Figure 8). Those two phases are about 126B tokens for 119K GPU hours, about 950 GPU hours per billion tokens against 180 in pre-training (derived), because attention over long sequences is expensive.

Llama 3.1 405B's pre-training took 30.84M H100 GPU hours, 11 times V3's total. An H800 has the same compute as an H100. How much of that 11× is explained simply by Llama doing more work: 405B active parameters on 15.6T tokens against 37B on 14.8T?

The bill, precisely

§1, Table 1

Table 1: 2,664K H800 GPU hours of pre-training, 119K of context extension and 5K of post-training, 2,788K in all; at an assumed rental price of $2 per GPU hour, $5.328M, $0.238M, $0.01M and $5.576M. Pre-training costs 180K GPU hours per trillion tokens, 3.7 days on the 2,048-GPU cluster, so under two months in all (§1). Recomputed beside this paragraph, with the price as the one input you can change.

The paper is explicit that this "include[s] only the official training of DeepSeek-V3, excluding the costs associated with prior research and ablation experiments on architectures, algorithms, or data". It does not mention hardware purchase, staff, failed runs, or the R1-series models whose outputs became V3's reasoning data. Much of the January 2025 discussion ignored that sentence; the honest reading is "the marginal compute cost of one training run", still roughly an order of magnitude below contemporary dense frontier runs.

What the $5.576M leaves out, item by item
  • Research and ablations on architectures, algorithms and data: excluded by the paper's own sentence (§1). The ablations alone include 15.7B and 228.7B models on up to 1.33T tokens, twice each for MTP and for balancing, and FP8 against BF16 at two scales (§4.5, Appendix B).
  • The R1-series expert models that generated V3's reasoning data (§5.1); R1's own later report gives its RL cost, quoted on the DeepSeek lab page.
  • Hardware, power, staff and data. The 2,048 H800s cost far more to buy than $5.6M; the lab page quotes SemiAnalysis's estimate of DeepSeek's hardware. The paper never claims otherwise: $2 an hour is a rental-equivalent price.

The fair one-line version: "the final training run used 2.788M H800 GPU hours, worth about $5.6M at rental prices". That claim checks out.

Table 1, recomputed

From GPU hours to utilisation. Training costs about 6 FLOPs per active parameter per token (the 6ND rule and what it leaves out are on Performance math). For V3 that is 36.6B (37.55B active minus the 0.93B input embedding, which is a lookup, not a multiply; recounted from config.json). Divide by GPU-seconds and by the H800's peak and you get the run's model FLOPs utilisation (MFU); Meta reported 38 to 43% BF16 MFU for Llama 3.1 405B (Llama 3, Table 4). Predict before ticking the boxes beside this paragraph: does counting attention and the MTP module push V3 above or below Meta's band?

What this shows

How the utilisation is counted, the cost per unit of work, and the wall clock

Peaks: H100 SXM, 1,979 and 3,958 TFLOPS "with sparsity", halved for dense (NVIDIA); the H800 has the H100's compute with less interconnect bandwidth (planetbanatt). Llama: 405B parameters, 15.6T tokens (Llama 3 §1), 30.84M GPU hours (model card). Attention FLOPs per token per layer, training: 3 × 2 × heads × (key + value dimension) × average causal context. V3 pre-training hours only (2,664K); Llama's figure is its model card's training time for 405B. Assumptions are first-order: no recomputation, no pipeline bubble, no failed steps.

The same work, costed per unit: GPU hours per billion active parameters per trillion tokens, the price of one unit of "6ND" work on each cluster.

Wall clock and stages:

Derived from Table 1 and §4.3 at 2,048 GPUs. Context extension: 1,000 steps of 1,920 sequences of 32K plus 1,000 steps of 480 sequences of 128K (§4.3).

The cheapness, then, is mostly the architecture: an MoE does a dense 405B model's job with a tenth of the arithmetic per token. What FP8, DualPipe and the kernels bought is that the MoE's communication overhead did not eat that saving: counting attention and the MTP module, V3 reached about 41% of the BF16 peak (about 20% of FP8's), in line with the 38 to 43% BF16 utilisation Meta reported for Llama 3 (Llama 3, Table 4). planetbanatt's Fermi estimate reaches the same verdict from the other side: plausible.

Llama 3.1 405B did 11.5× the work for 11.6× the hours

Sources: Llama 3.1 hours from the model card, tokens from the Llama 3 paper; peak 989 TFLOPS dense BF16 from the H100 datasheet (1,979 with sparsity); same compute on the H800 per planetbanatt. V3 pre-training hours only (2,664K).

Post-training

§5.1, §5.2, §5.4

Supervised fine-tuning (§5.1): 1.5M instances. Reasoning data (maths, competition code, logic puzzles) comes from an internal DeepSeek-R1 model, whose answers are accurate but overthink, are poorly formatted and run long. So DeepSeek first trains a domain expert (code, maths, general reasoning) with SFT and RL on two kinds of samples, <problem, original response> and <system prompt, problem, R1 response>, the system prompt asking for reflection and verification; RL with high-temperature sampling teaches the expert to blend R1's patterns into answers even without the prompt; rejection sampling from the experts then produces the final SFT data. Non-reasoning data (creative writing, role-play, simple QA) comes from DeepSeek-V2.5 and is checked by human annotators.

Reinforcement learning (§5.2): rule-based rewards where an answer can be checked (a boxed final answer for maths, compiler test cases for LeetCode problems), because they resist reward hacking; elsewhere a reward model trained from V3's SFT checkpoints, either matching a free-form reference answer or judging open-ended answers, trained on preference data that includes the chain of thought behind each reward. The optimiser is GRPO (Eq. 26 to 28), introduced in DeepSeekMath; how its group baseline replaces PPO's critic is taught on RL for LLMs. For open-ended questions V3 judges itself, with voting, in the style of Constitutional AI (§5.4.2); Table 8 shows why it can: on RewardBench V3 scores 87.0 (89.6 with six-vote majority), level with the best GPT-4o and Claude 3.5 Sonnet versions.

SFT settings and RL prompt domains

SFT: two epochs, cosine learning rate from 5 × 10−6 to 1 × 10−6, packed sequences with sample masking (§5.1). RL prompts span coding, maths, writing, role-play and QA (§5.2).

Distillation, measured (Table 9): on DeepSeek-V2.5, R1-style data lifted LiveCodeBench-CoT from 31.1 to 37.4 and MATH-500 from 74.6 to 83.2, while MATH-500 answers nearly doubled in length (769 to 1,510 tokens). The settings for V3 were chosen to balance accuracy against length (§5.4.1).

Results

§4.4, §5.3

Base model (Table 3, all models run in DeepSeek's internal harness with the same settings): MMLU 87.1, BBH 87.5, HumanEval 65.2, MATH 61.6. Counting with the caption's rule that gaps of 0.3 or less are a tie, V3-Base beats LLaMA-3.1 405B Base on 20 of 32 rows, ties 7 and loses 5 (PIQA, RACE-Middle, RACE-High, NaturalQuestions, C3), with 11 times fewer active parameters; it beats Qwen2.5 72B Base on 28. The paper calls it the strongest open base model, "especially in code and math".

Chat model (Table 6, output capped at 8K tokens, AIME and CNMO averaged over 16 samples at temperature 0.7): MMLU 88.5, MMLU-Pro 75.9, GPQA-Diamond 59.1, MATH-500 90.2 (above o1-preview, per §1), AIME 2024 39.2, LiveCodeBench 40.5 with chain of thought, Codeforces 51.6th percentile, SWE-bench Verified 42.0 (below Claude 3.5 Sonnet's 50.8, far above the other open models). V3 has the best score in 13 of the 22 rows and the best open-model score in 20; Claude 3.5 Sonnet leads on MMLU-Pro, IF-Eval, GPQA, SWE-bench and Aider-Edit, GPT-4o on SimpleQA and FRAMES. Open-ended (Table 7): Arena-Hard 85.5, the first open model above 85, level with Claude 3.5 Sonnet's 85.2; AlpacaEval 2.0 length-controlled 70.0.

Efficiency: the whole run in 2.788M H800 hours; 1.8× decoding speed from MTP drafts; and an end-to-end generation speed more than twice V2's (§6).

Every row of every table, sortable, with deltas and win counts: The paper's tables, rebuilt.

How much of this to believe

the evidence in §3.3, §4.5, §5.3 and the appendices

What holds up. The bill is internally consistent and externally plausible: Table 1's sums, the 180K hours per trillion tokens and the 3.7 days all recompute, and a FLOPs count at 6 × active parameters × tokens gives the same utilisation (about 34% of BF16 peak) as Llama 3.1 405B's published hours, so nothing about the GPU-hour figure needs special explanation (The bill). The model is open: the weights and config are public, the parameter counts recompute exactly (671.03B, 37.55B active, 684.5B with the MTP module), and the infrastructure has since been released and used by others (DeepGEMM, DeepEP, DualPipe, EPLB). The training detail is unusually complete, down to SM counts and accumulation intervals. The authors also name their own limitations: a large deployment unit, and room to speed decoding further (§6).

Where to be careful.

  • The $5.576M is a rental-price conversion of one run's GPU hours. The paper says so; the number is a theoretical estimate, not money spent. The R1-series expert models that generated the reasoning SFT data are not counted, and post-training's 5K hours (2.4 hours on the cluster) covers V3's own SFT and RL only.
  • The ablations are single runs with no error bars, and several gains are smaller than run-to-run noise usually is (TriviaQA +0.2, Pile BPB −0.001). MTP lowers large-scale MMLU by 0.9 and the bias rule lowers it by 1.1 (Table 4, Table 5).
  • The ablation baselines are not V3. They are 15.7B and 228.7B models on 0.5 to 1.3T tokens, and the large MTP and balancing ablations used different token counts (540B against 578B), so they are two separate experiments, not one grid. The aux-loss baselines used V2's loss strengths, untuned for these runs.
  • The balancing gain is about scope, by the paper's own test. A batch-wise auxiliary loss matched the bias rule exactly (2.253 and 2.080) at 1B and 3B (§4.5.3). The bias rule is a cheap way to balance by batch, not evidence that losses are harmful as such. To the authors' credit, they ran and printed this.
  • FP8 is shown on smaller models, about 16B and 230B for about 1T tokens, not on V3 itself, where no BF16 twin exists. The 0.25% figure has no curve values printed, only Figure 10. One recipe variant diverged (block-wise activation gradients), which they report.
  • The "nearly 2%" accumulation error is under-specified: no input distribution, metric or precise hardware model. The page's simulator, built from the v2 text's description, gives 0.3% or 6.8% at K = 4,096 depending on how the description is read, bracketing 2%; promotion every 128 elements cuts either by one to two orders of magnitude (the accumulation animation). The v1 and v2 texts of §3.5.2 describe the mechanism differently.
  • The benchmark tables are the authors' harness. Base models were all run in DeepSeek's internal framework; closed models through their APIs, with an 8K output cap that may not suit every model (§5.3.1). LongBench v2 appeared weeks before the release, so contamination is unlikely there, but most suites are older.
  • Some text claims do not match the tables. §5.3.3 says Arena-Hard "over 86%"; Table 7 prints 85.5. "About 10% above Qwen2.5 72B" on AIME, MATH-500 and CNMO is 15.9, 10.2 and 27.3 points, and on AIME LLaMA-3.1 405B ties Qwen as second-best. AlpacaEval's "20%" over V2.5 is 19.5 points. None changes a conclusion (Every number checked).

Verdict: believe the engineering and the bill as defined; they check out and the artefacts are public. Treat the MTP and auxiliary-loss-free gains as real but modest single-run results, the second explained by balancing scope, and the benchmark comparisons as the authors' own measurements.

What it takes to use this

  • The model: weights on Hugging Face in FP8 only (FP8 is native to the training), with a script to convert to BF16; code under MIT, weights under the DeepSeek Model License, which allows commercial use (README). At one byte per weight the 685B release is about 685 GB, more than one 8 × 80 GB node holds (640 GB) but within one node of 141 GB GPUs (H200, 1,128 GB), before any KV cache (derived); the paper's own serving units are 32 GPUs for prefill and 320 for decode, which it lists as a limitation for small teams (§6).
  • The recipe: the bias balancing rule is a few lines of code; MTP adds one block and a loss term; FP8 with 1×128 and 128×128 scaling now ships as a stock recipe (versions in the dated block below).
  • When it pays off: FP8 and MoE help most when GEMMs dominate and the cluster is large enough for expert parallelism; DualPipe and the all-to-all kernels matter when communication is close to 1:1 with compute, as on bandwidth-limited H800s. On a small dense model they buy little.

Why it matters (beyond the paper)

The release collapsed the assumed cost floor for frontier-class training and, with DeepSeek-R1 a month later, triggered a broad repricing of AI-compute narratives, the "DeepSeek moment" (Stratechery's FAQ). Technically it is the reference blueprint for large-scale MoE efficiency: MLA, fine-grained experts with auxiliary-loss-free balancing, FP8 with tile and block scaling, and scheduling that hides the all-to-all behind compute have all been widely studied and adopted since. It normalised publishing real systems detail, SM counts, PTX-level tricks and hardware requests to NVIDIA, in an open model report. And it is the base model of DeepSeek-R1, the substrate of the 2025 wave of open reasoning models. V3 is a case study in what co-design buys when GPU supply is the binding constraint.

What came after, and where to run it (dated: checked 3 October 2026)
  • Serving stacks at release: SGLang (recommended; NVIDIA and AMD, MLA optimisations, FP8), LMDeploy, vLLM, TensorRT-LLM (BF16 and INT4/8 first), LightLLM, and Huawei Ascend via MindIE. MTP speculative decoding was "under active development within the community" (README).
  • The FP8 recipe, upstream: FP8 training with 1×128 and 128×128 scaling is now a stock recipe: Transformer Engine's Float8BlockScaling uses 1-D blocks for activations and gradients, 2-D for weights, and enforces split (promoted) accumulation "for numerical accuracy" (Transformer Engine recipe). DeepGEMM, the open FP8 kernel, reports up to 1,550 TFLOPS on an H800 (DeepGEMM).
  • The code, released: DeepSeek followed with the code itself in its February 2025 open-source week (open-infra-index: DeepGEMM, DeepEP, DualPipe, EPLB, all MIT).
  • The hardware caught up: its fine-grained scaling anticipated the hardware: Blackwell's MXFP8 scales every 32 values with a power-of-two (E8M0) factor (Transformer Engine MXFP8 recipe).
  • The line since: the DeepSeek lab page follows the line from V3 through V3.1 and V3.2 to V4, and Topic: llm-landscape lists the open MoE models that adopted the bias rule.

Connections