GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
Technical report

DeepSeek-V3 Technical Report

A 671B mixture-of-experts model, 37B active per token, trained in FP8 for 2.788M H800 GPU-hours, with a compressed attention cache and bias-balanced experts. Read the cost line closely.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2024
AUTHORS
DeepSeek-AI
FROM
DeepSeek
PUBLISHED
Dec 2024 · Technical report
IN THIS BREAKDOWN · 10 SECTIONS

You can read 21% of this breakdown.

01

The paper in one minute

DeepSeek-V3 is a large mixture-of-experts (MoE) Transformer from DeepSeek-AI: 671B parameters in total, of which 37B are used for any one token. It was released with open weights in December 2024 alongside this technical report, which is unusually detailed about how a frontier-scale model was trained cheaply.

Two pieces come from DeepSeek-V2. Multi-head Latent Attention (MLA) compresses each token's keys and values into a 512-dimensional latent vector plus a small rotary-position key, and caches only those, shrinking the KV cache. DeepSeekMoE replaces most feed-forward layers with 256 small routed experts and 1 shared expert; each token goes to the shared expert and its top 8 routed experts.

Two pieces are new. Auxiliary-loss-free load balancing keeps experts evenly used by adding a per-expert bias to routing scores, raised for underused experts and lowered for overloaded ones after each training step, instead of adding a balancing term to the loss that can hurt quality. Multi-token prediction (MTP) adds a small module that predicts the token after next, which densifies the training signal; at inference it can be dropped or used as a draft for speculative decoding.

Training efficiency gets as much space as architecture: FP8 matrix multiplication with fine-grained scaling, a pipeline schedule called DualPipe that hides the cross-node traffic expert routing creates, custom all-to-all kernels, and memory savings that avoid tensor parallelism entirely. Pre-training used 2,048 H800 GPUs and 14.8 trillion tokens, with no irrecoverable loss spikes or rollbacks. Context was then extended to 128K tokens, and post-training included supervised fine-tuning and reinforcement learning, with reasoning distilled from DeepSeek-R1.

The report gives the total as 2.788 million H800 GPU-hours, $5.576 million at an assumed $2 per hour, for the final training run only.

THE IDEA, VISUALLY
ONE OF 61 LAYERS: 671B TOTAL, 37B ACTIVE PER TOKEN Multi-head Latent Attention 128 heads; cache only a 512-dim latent + 64-dim RoPE key per token: about 69 KiB, versus 3.8 MiB for plain attention DeepSeekMoE (layers 4 to 61) … 1 shared expert + top-8 of 256 routed; at most 4 nodes per token. Routing score + per-expert bias; bias ±0.001 after each step. Multi-token prediction (depth 1) also predict token t+2; reused as a speculative draft TRAINING FP8 matrix multiplies with fine-grained scaling and higher- precision accumulation; relative loss error under 0.25% vs BF16 at smaller scale. DualPipe overlaps all-to-all expert traffic with compute; no tensor parallelism. 14.8T tokens, 4K context, then 32K and 128K; SFT and RL with reasoning distilled from R1. No irrecoverable loss spikes or rollbacks, per the report. TRAINING COST, H800 GPU-HOURS (TABLE 1) pre-training 2,664K context extension 119K post-training 5K total 2,788K $5.576M at $2/GPU-hour; excludes research, ablations and R1 CHAT MODELS (TABLE 6) V3 Sonnet 3.5 GPT-4o MMLU-Pro 75.9 78.0 72.6 GPQA-Diamond 59.1 65.0 49.9 MATH-500 90.2 78.3 74.6 AIME 2024 39.2 16.0 9.3 Codeforces pct 51.6 20.3 23.6 SWE-bench Verified 42.0 50.8 38.8 SimpleQA 24.9 28.4 38.2 FRAMES 73.3 72.5 80.5 blue = best of the three V3's math and competition-code numbers come after distilling reasoning from DeepSeek-R1; the two closed models here are not reasoning models. Outputs capped at 8K tokens.
DeepSeek-V3 combines a compressed attention cache, a fine-grained mixture of experts balanced by routing biases, and an extra-token training objective, trained in FP8 for a reported 2.788M GPU-hours. It led open models in late 2024 and matched GPT-4o and Claude 3.5 Sonnet on many benchmarks, with reasoning distilled from R1.
Research notes: the problem, approach and results
2.788M

H800 GPU-hours for pre-training, context extension and post-training; excludes prior research, ablations and the R1 model used for distillation

≈69 KiB

KV cache per token with Multi-head Latent Attention, against about 3.8 MiB for standard attention with the same heads (our arithmetic)

85-90%

acceptance rate of the extra predicted token when reused as a speculative draft, giving 1.8 times the tokens per second

THE PROBLEM

Frontier-quality language models cost enormous compute to train and serve. Mixture-of-experts models cut compute per token but bring load-balancing losses that hurt quality, heavy cross-node communication, and large KV caches at inference.

THE IDEA

Keep DeepSeek-V2's Multi-head Latent Attention (cache a small latent instead of full keys and values) and DeepSeekMoE (many small routed experts plus a shared one). Balance experts primarily with routing biases, retain a small sequence-level balancing loss, add a multi-token prediction objective, train in FP8, and overlap expert communication with compute.

THE RESULT

A 671B-parameter model with 37B active per token, pre-trained on 14.8T tokens for 2.664M H800 GPU-hours (2.788M including later stages, about $5.6M at $2 per hour). It led open models on most benchmarks and was close to or ahead of GPT-4o and Claude 3.5 Sonnet on many.

02

Why it matters to an FDE

DeepSeek-V3 reset expectations about what a frontier-quality model costs to train, and its open weights made it a serious option for customers who need self-hosting.

Read cost claims precisely. $5.6M is the rental value of the final run's GPU-hours. It excludes the research, failed runs, ablations, data work, staff and the DeepSeek-R1 model whose reasoning was distilled into V3. Customers quoting it as "what a frontier model costs" are comparing different things.

Active parameters set compute, total parameters set memory. Per token, V3 computes like a 37B model, but all 671B parameters must be held somewhere. The report's recommended serving units are 32 GPUs for prefill and 320 for decoding: a large cluster, which the authors list as a limitation for small teams.

KV cache design changes long-context economics. MLA's small cache makes 128K-token contexts far cheaper to hold than standard attention would be.

Multi-token prediction pays at inference. Reused as a speculative draft, the extra prediction was accepted 85% to 90% of the time, giving 1.8 times the decoding speed.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 99 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦1 results table
  • ?5 interview questions with answers
  1. 03Key takeaways

    Configuration, training recipe, cost, headline results and the misreadings to avoid

    Free account
  2. 04How it works

    MLA, DeepSeekMoE routing and balancing, MTP, FP8 and DualPipe, and serving

    Premium
  3. 05The numbers that matter

    Cost breakdown, base and chat results, ablations, long context and decoding speed

    Premium
  4. 06Try it yourself

    Recompute the cost, rebuild the parameter count, size the KV cache and simulate bias-based balancing

    Premium
  5. 07Where it breaks

    Cost accounting, serving footprint, benchmark framing and ablation limits

    Premium
  6. 08Using it on a deployment

    Deciding whether and how to use a large open MoE model for a customer

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →