DeepSeek-V3 reached frontier open-weights scores while spending 2.788 million H800 GPU-hours on its official training run, or $5.576 million at the report’s assumed $2 per GPU-hour rate. That budget covers pretraining a 671B-parameter Mixture-of-Experts model (37B activated per token) on 14.8 trillion tokens, extending context to 128K, and completing post-training with zero irrecoverable loss spikes or rollbacks.
Rather than relying on one algorithmic trick, four co-designed layers reinforce each other: sparse architecture choices shrink compute and KV memory, DualPipe hides cross-node communication behind math, fine-grained FP8 keeps 8-bit matrix multiplies accurate on Hopper silicon, and DeepSeek-R1 distillation transfers verification habits without runaway output length. For teams building or evaluating large training stacks today, the report is a blueprint for removing hardware bottlenecks before buying faster interconnects.
- 2.788M H800 GPU-hours total: 2.664M hours for pretraining on 14.8T tokens (180K GPU-hours, or 3.7 days per trillion tokens on 2,048 H800s), 119K hours for context extension, and 5K hours for post-training.
- 671B total / 37B active parameters: 61 Transformer layers combining Multi-Head Latent Attention (
d_c = 512) with 256 routed experts and 1 shared expert (8active routed experts per token, capped at 4 nodes). - Under 0.25% FP8 loss gap: tile-wise (
1x128) activation scaling, block-wise (128x128) weight scaling, and FP32 CUDA-core promotion every 128 elements match BF16 loss across 16B and 230B ablations. - Frontier open scores: 88.5 on MMLU, 75.9 on MMLU-Pro, 59.1 on GPQA-Diamond, 90.2 on MATH-500, 42.0% resolved on SWE-bench Verified, and 51.6th percentile on Codeforces.
Why standard MoE routing and pipelines stall
Conventional Mixture-of-Experts models face two structural taxes: routing interference and cross-node communication stalls. DeepSeek-V3 attacks both without sacrificing token coverage or resorting to expensive tensor parallelism.
On the routing side, layers 4 through 61 replace dense feed-forward networks with DeepSeekMoE: 1 always-on shared expert and 256 routed experts of width 2048, activating 8 routed experts per token. In earlier MoE designs such as GShard and Switch Transformer, teams prevented routing collapse (where a few experts hoard every token and leave other GPUs idle) by adding a large sequence-wise auxiliary load-balancing loss. That penalty forces each individual sequence to spread tokens evenly across experts, creating a competing gradient that pulls math, code, and prose tokens onto the same experts and degrades accuracy.
DeepSeek-V3 removes that tug-of-war with an auxiliary-loss-free balancing bias. Each routed expert maintains a scalar bias b_i added only during Top-K selection (s_{i,t} + b_i), while the gating weight that scales the expert’s output still comes from the clean sigmoid affinity s_{i,t}. After each training step, the runtime monitors batch-wide expert loads and nudges b_i down by γ = 0.001 on overloaded experts or up by 0.001 on underloaded ones (freezing γ = 0 for the final 500B tokens), paired with a tiny sequence-wise balance loss (α = 0.0001) only to block extreme single-sequence spikes. In controlled 228.7B-parameter ablations trained for 578B tokens (Table 5), switching from purely auxiliary-loss balancing to auxiliary-loss-free lifted HumanEval from 40.2% to 46.3%, GSM8K from 70.7% to 74.5%, and MATH from 37.2% to 39.6%, with zero token dropping.
On top of cleaner routing, DeepSeek-V3 attaches a sequential depth-1 Multi-Token Prediction (MTP) head during pretraining. Each MTP depth keeps the full causal chain by projecting the concatenated hidden state and next-token embedding through one Transformer block sharing the main model’s embedding and output head (λ = 0.3 for the first 10T tokens, 0.1 for the final 4.8T). On a 228.7B MoE trained for 540B tokens (Table 4), MTP raised HumanEval from 44.5% to 53.7% and DROP from 68.5 to 70.6 (with MMLU dipping from 67.5 to 66.6). At inference, the MTP head can be dropped for zero cost or kept for speculative decoding, yielding 85% to 90% acceptance on the second token and 1.8x tokens per second.
On the systems side, splitting 256 fine-grained experts across 64 GPUs (8 H800 nodes) creates a roughly 1:1 computation-to-communication ratio. Naive 1F1B pipelines leave (PP - 1)(F + B) idle bubbles and serialize cross-node transfers. DualPipe launches micro-batches from both ends of the 16-stage pipeline and splits backward passes into input (B) and weight (W) chunks. Overlapping one forward chunk with one backward chunk lets custom PTX kernels hide InfiniBand transfers behind attention and MLP math, cutting bubbles to (PP/2 - 1)(F&B + B - 3W) at the cost of two parameter replicas and PP + 1 activations. With node-limited routing (M = 4 nodes max), warp-specialized communication on 20 of 132 SMs saturates 50 GB/s InfiniBand and 160 GB/s NVLink, eliminating tensor parallelism alongside ZeRO-1 sharding and selective recomputation.
Why Hopper FP8 needed fine-grained scaling and CUDA-core accumulation
DeepSeek-V3 is the first openly documented 671B-scale training run to execute its core Linear GEMMs (Fprop, Dgrad, and Wgrad) in FP8, and Section 3.3 explains why off-the-shelf Hopper FP8 recipes failed before they got there.
First, standard per-tensor quantization chooses one scale factor per activation or weight tensor. A single outlier channel blows up that scale and pushes normal values toward zero. DeepSeek-V3 switches to online fine-grained E4M3 quantization everywhere (avoiding the lower-mantissa E5M2 format used in backward passes by prior hybrid schemes): activations are scaled per 1x128 tile (one token across 128 channels) and weights per 128x128 block. Notice the asymmetry: in Appendix B.2, when the authors tried 128x128 block scaling on activation gradients during Dgrad to simplify matrix transposes, a 16B MoE diverged around 300B tokens because token-correlated outliers in backward gradients overwhelm 2D blocks.
Second, NVIDIA H800 Tensor Cores do not accumulate FP8 matrix multiplies in full FP32 internally. The report documents that Hopper WGMMA right-shifts products and retains only about 14 mantissa bits during accumulation. On inner dimension K = 4096, DeepSeek’s preliminary test measured nearly 2% maximum relative error from truncation alone. To fix this, their kernels interrupt Tensor Core MMA every N_C = 128 elements (4 WGMMAs), promote partial sums to CUDA Core FP32 registers, multiply by the group scaling factors there, and overlap that promotion on one warpgroup with Tensor Core math on a second warpgroup. Sensitive modules (embeddings, output head, MoE gates, normalizations, and attention operators) stay in BF16 or FP32, while attention-linear backward inputs use a custom E5M6 format and AdamW moments sit in BF16 alongside FP32 master weights. The payoff, verified in Appendix B.1 across 16B (1.33T tokens) and 230B (0.9T tokens) models, is a relative loss error under 0.25% versus BF16.
After pretraining at 4K context, two 1,000-step YaRN stages stretch rotary position embeddings on the decoupled key k_t^R to 32K and 128K. Post-training then uses domain expert checkpoints trained with high-temperature RL to distill DeepSeek-R1’s reflection and verification chains into 1.5M SFT examples without R1’s verbose formatting, followed by Group Relative Policy Optimization (GRPO) (which drops the critic network and scores rollouts against group mean and standard deviation) using deterministic math/compiler verifiers plus generative CoT reward models.
Inspect all five engineering bets side by side
No single trick explains DeepSeek-V3’s $5.576M price tag or its 42.0% SWE-bench Verified and 90.2 MATH-500 scores. Switch through the five tabs below to compare the bottleneck each mechanism targets, why the obvious alternative fails, and the measured evidence reported in the paper.
Select a subsystem (or use Left and Right arrow keys) to inspect the naive failure mode, DeepSeek-V3's mechanism, and the measured result or deployment cost.
Auxiliary-loss-free MoE routing
ArchitectureKeeps 256 routed experts balanced across 64 GPUs without adding a competing balance gradient to the loss.
- Why naive fix breaks
- Sequence-wise auxiliary losses push every sequence to spread across experts equally, degrading domain specialization and benchmark accuracy.
- Paper's mechanism
- Adds dynamic bias b_i (+/- 0.001 per step) only inside Top-K selection, leaving gating weights computed from clean sigmoid scores s_{i,t}.
- Measured evidence
- On 228.7B MoE (578B tokens), HumanEval rises from 40.2% to 46.3%, GSM8K from 70.7% to 74.5%, and MATH from 37.2% to 39.6% with zero dropped tokens.
- Deployment link
- Batch-wise balance can still skew on skewed live traffic, so serving periodically swaps redundant copies of hot experts every ~10 minutes.
Fine-grained E4M3 with FP32 promotion
ComputeRuns forward, activation-backward, and weight-backward GEMMs in FP8 while matching BF16 loss within 0.25%.
- Why naive fix breaks
- Per-tensor FP8 clips around outliers, H800 14-bit internal accumulation hits ~2% error at K=4096, and 128x128 block Dgrad diverges at 300B tokens.
- Paper's mechanism
- Online 1x128 activation tiles and 128x128 weight blocks in E4M3, promoting partial sums to CUDA Core FP32 registers every N_C = 128 elements.
- Measured evidence
- Relative loss error stays below 0.25% against BF16 on both 16B (1.33T tokens) and 230B (0.9T tokens) ablations.
- Hardware caveat
- Requires frequent Tensor-Core-to-CUDA-Core transfers and HBM round-trips for online transpose; DeepSeek proposes fused TMA/cast hardware fixes.
Bidirectional pipeline and custom PTX overlap
DistributedEliminates tensor parallelism during training and hides 1:1 cross-node MoE all-to-all transfers behind math.
- Why naive fix breaks
- 1F1B pipelines stall for (PP - 1)(F + B) bubble time and expose cross-node InfiniBand dispatch/combine latency on the critical path.
- Paper's mechanism
- Feeds micro-batches from both pipeline ends, splits B into input/weight grads, and dedicates 20 of 132 SMs via PTX to IB-NVLink forwarding.
- Measured evidence
- Shrinks bubble to (PP/2 - 1)(F&B + B - 3W) and saturates 50 GB/s IB and 160 GB/s NVLink, hitting 180K GPU-hours per trillion tokens.
- Memory tradeoff
- Stores 2x parameter copies (mitigated by 64-way EP) and PP + 1 activations, plus loses 20 SMs per GPU from compute to communication.
Causal Multi-Token Prediction
ObjectiveTrains the model to predict t_{i+2} through a causal chain from t_{i+1}, then discards or reuses the head.
- Why naive fix breaks
- Independent parallel heads predict future tokens without seeing the intermediate token embedding, weakening causal coherence.
- Paper's mechanism
- Concatenates normalized h_i with Emb(t_{i+1}) through one Transformer block sharing main embeddings and output head (lambda 0.3 then 0.1).
- Measured evidence
- On 228.7B MoE (540B tokens), HumanEval improves 44.5% to 53.7%; in speculative decoding, 2nd-token acceptance hits 85% to 90% for 1.8x TPS.
- Placement trick
- DualPipe collocates the first and last layers on the same PP rank so the MTP head physically shares embedding and lm_head weights.
Disaggregated prefill and 320-GPU decode
InferenceSplits prefill and decode onto differently sized H800 pods with redundant hot experts.
- Why naive fix breaks
- Small pods cannot keep all 256 routed experts resident without starving batch size or paying heavy cross-node decode latency.
- Paper's mechanism
- Prefills on 32 GPUs (TP4/DP8/EP32, 1 redundant expert per GPU) and decodes on 320 GPUs (TP4/DP80/EP320, 1 expert per GPU + 64 redundant/shared).
- Measured evidence
- Two-micro-batch overlap plus IBGDA point-to-point transfers deliver over 2x DeepSeek-V2 end-to-end generation speed.
- Practical burden
- Section 6 notes the large minimum deployment unit is a serious hurdle for small teams wanting to self-host at peak efficiency.
Source: DeepSeek-AI (2025), Sections 2 through 5 and Appendix B.
Without clicking through the tabs, the five choices split into training wins and hosting limits:
- Auxiliary-loss-free balancing replaces per-sequence penalties with step-level bias nudges inside Top-K routing, lifting 228.7B HumanEval by 6.1 points with zero dropped tokens.
- Fine-grained E4M3 FP8 avoids outlier clipping and Hopper’s 14-bit accumulation truncation via
1x128activation tiles,128x128weight blocks, and periodic CUDA-core FP32 promotion, matching BF16 within 0.25%. - DualPipe and 20-SM PTX kernels hide cross-node MoE traffic behind overlapped forward/backward chunks, reaching 180K H800 GPU-hours per trillion tokens without tensor parallelism.
- Causal Multi-Token Prediction improves base coding and reasoning scores and doubles as a speculative draft head with 85% to 90% second-token acceptance (1.8x TPS).
- Disaggregated H800 serving achieves 2x V2 speed only on large clusters (32 GPUs minimum for prefill, 320 GPUs for decode).
What the $5.576M figure leaves out
Three caveats separate DeepSeek-V3’s headline economics from what an engineering team faces when reproducing or hosting it.
First, the $5.576M price tag counts only the final successful run. Table 1 explicitly excludes prior architecture exploration, failed or baseline ablations (such as the 16B and 230B runs in Tables 4, 5, and Appendix B), synthetic data generation from DeepSeek-R1 and DeepSeek-V2.5, and cluster ownership costs. Treating $5.576M as the total R&D budget of building a frontier model misreads the paper’s accounting.
Second, the recipe is tightly coupled to Hopper H800 hardware. DualPipe assumes NVLink (160 GB/s) is roughly 3.2x InfiniBand (50 GB/s) and burns 20 of 132 SMs on custom PTX warp-specialized communication; the FP8 pipeline works around Hopper’s 14-bit WGMMA accumulation defect, a workaround unnecessary on Blackwell microscaling hardware and non-trivial to port to clusters with slower interconnects. Even attention kernel overlap techniques like FlashAttention-3 rely on Hopper-specific asynchronous TMA instructions.
Third, cheap per-token FLOPs do not mean cheap self-hosting. DeepSeek-V3 activates 37B parameters per token, yet inference still must hold 671B weights in memory across experts. DeepSeek’s own production topology dedicates 4 nodes (32 GPUs) as the minimum prefill unit and 40 nodes (320 GPUs) for decode so each GPU hosts one expert and avoids memory-bandwidth bottlenecks. Smaller teams serving DeepSeek-V3 on fewer nodes face quantization, heavy expert offloading, or lower throughput per dollar.
For infrastructure and ML engineers, the lasting lesson of DeepSeek-V3 is not that frontier training suddenly became cheap for everyone. It is that hardware limits, from Hopper’s 14-bit FP8 accumulators to 50 GB/s InfiniBand links, are solvable inside the co-design boundary between routing math, pipeline scheduling, and kernel numerics, provided your team owns the full stack from PTX kernels up to post-training data.


