DeepSeek-V3

DeepSeek-AI · 2024-12-27 · analysed 2026-08-08 · skill v0.3.0

sparse-MoE full-attention text-only open-weights frontier frontier-generalist

Design overview

DeepSeek-V3 is a 61-layer Transformer with a sparse mixture-of-experts block: the first three layers keep dense FFNs while the remaining 58 replace them with DeepSeekMoE layers of one shared expert and 256 fine-grained routed experts (per-expert width 2048), eight of which fire per token — 671B total, 37B active parameters. Attention is Multi-head Latent Attention (MLA) carried over from DeepSeek-V2: keys and values are jointly compressed into a 512-dimensional latent plus a 64-dimensional decoupled RoPE key per head, so the KV cache stores only the latent and the rotary key per token, and queries are low-rank compressed (1536-dim) to cut training activations. Load balancing is auxiliary-loss-free: per-expert biases steer sigmoid-gated top-8 routing and are nudged by a bias-update speed of 0.001, with a tiny sequence-wise auxiliary loss (alpha=0.0001) guarding against within-sequence imbalance; node-limited routing sends each token to at most four nodes, and no tokens are dropped in training or inference. A depth-1 Multi-Token Prediction module — shared embedding and output head with RMSNorm-gated fusion — adds a second-token loss and doubles as a speculative-decoding draft (85-90% acceptance, 1.8x tokens per second). Training on 2048 H800 GPUs combines FP8 mixed precision (E4M3, fine-grained tile/block quantization, CUDA-core accumulation), DualPipe 16-way pipeline parallelism, 64-way expert parallelism, and no tensor parallelism, over 14.8T tokens, then YaRN-based two-stage extension to 128K, then SFT and GRPO RL with reasoning distilled from DeepSeek-R1. The design's significance is cost: about 2.788M GPU hours (roughly $5.6M) for a frontier-competitive open-weight model.

What the report claims is novel

Atlas assessment: The core block is inherited from DeepSeek-V2 — MLA and DeepSeekMoE are adopted wholesale, so the genuinely new mechanisms are the auxiliary-loss-free bias-based load balancing (previously published by DeepSeek's own group, Wang et al. 2024a, per the report) and the sequential MTP objective (a causality-preserving variant of Gloeckle et al.'s parallel multi-token prediction). Against other atlas entries, DeepSeek-V3 is distinctive for low-rank latent KV compression versus GQA (Llama 3.1) or plain top-k MoE (Mixtral), for fine-grained 256-expert routing with a shared expert, and for a training scheme that avoids tensor parallelism; the FP8 framework and DualPipe are engineering contributions whose novelty lies mainly in the 671B-scale validation. The report's 'pioneers' and best-in-class open-source claims rest on its own internal evaluation harness, and the closed-source comparisons (GPT-4o, Claude-3.5-Sonnet) are self-reported, so headline numbers should be read with the same caution as any vendor report.

Relation to the atlas

Lineage in

Influence out

Notable omissions

Closest relatives in the atlas

Spec sheet

Identity

FamilyDeepSeek-V3[1]
OrganisationDeepSeek-AI[2]
Release date2024-12-27
Report URLhttps://arxiv.org/abs/2412.19437[3]
Licensenot disclosed
Open weightsyes[4]

Scale

Total parameters671B[5]
Active parameters / token37B[6]
Layers61[7]
Hidden dimension7168[7]
FFN inner dimension2048[7]
FFN ratio0.3
Query heads128[7]
KV headsn/a[8]
Head dimension512[7]
Vocabulary size131072
Embedding tyingnot disclosed

Core block

Block typesparse-MoE[7]
Attention variantMLA[9]
Attention layer patternuniform[9]
Depth mixingsequential-residual
ActivationSwiGLU[10]
Expert count256[7]
Experts per token8[7]
Shared experts1[7]
Routingsigmoid affinity scores (u_t^T e_i), top-8 selection, gating values normalized among selected experts[11]
Load balancingauxiliary-loss-free bias-based balancing (per-expert bias b_i, bias update speed γ=0.001) plus a complementary sequence-wise auxiliary loss (α=0.0001); no token dropping[12]
Expert granularityfine-grained[13]
MethodRoPE[15]
RoPE base frequencynot disclosed
Partial RoPEyes[16]
TypeRMSNorm[17]
Placementnot disclosed
QK-normyes[7]
Attention sinksnot disclosed
Softcappingnot disclosed
Othergradient clipping norm 1.0; FP8 training keeps embedding, output head, MoE gating, normalization and attention operators in BF16/FP32, with master weights and gradients in FP32; EMA of model parameters kept on CPU for early loss-decay estimates[18]

Context

Trained context length4,096[7]
Deployed context length131,072
Extension methodYaRN, two-stage: 4K to 32K then 32K to 128K, 1000 steps per phase (scale s=40)[14]

Tokenizer

AlgorithmByte-level BPE[19]
NotesExtended vocabulary of 128K tokens; pretokenizer and tokenizer training data modified for multilingual compression efficiency; pretokenizer adds combined punctuation-and-linebreak tokens, mitigated by randomly splitting a proportion of such tokens during training; Fill-in-the-Middle applied at rate 0.1 via the Prefix-Suffix-Middle (PSM) framework[19]

Training

Training tokens14.8T[6]
Data composition14.8T tokens; versus DeepSeek-V2 the corpus raises the ratio of mathematical and programming samples and expands multilingual coverage beyond English and Chinese; processing pipeline refined to minimise redundancy while preserving diversity; document packing without cross-sample attention masking; FIM at rate 0.1 (PSM). Exact mixture percentages are not disclosed[19]
Curriculum / stagingSingle pre-training run at 4K sequence length with a phased LR schedule (linear warmup, constant, cosine decay, final constant); then two-stage context extension (32K, 128K); then post-training (SFT, RL)[20]
OptimizerAdamW (beta1=0.9, beta2=0.95, weight_decay=0.1, gradient clipping norm 1.0)[7]
LR schedulelinear warmup 0 to 2.2e-4 over the first 2K steps; constant 2.2e-4 until 10T tokens; cosine decay to 2.2e-5 over 4.3T tokens; final 500B tokens: constant 2.2e-5 for the first 333B then 7.3e-6 for the remaining 167B[7]
Batch schedulebatch size gradually increased from 3072 to 15360 over the first 469B tokens, then held at 15360[7]
PrecisionFP8 mixed precision: GEMMs in FP8 (E4M3 format on all tensors); embedding, output head, MoE gating, normalization and attention kept in BF16/FP32; master weights and gradients in FP32; optimizer first/second moments in BF16; activations cached FP8 (custom E5M6 for inputs of the Linear after attention); fine-grained quantization (1x128 activation tiles, 128x128 weight blocks) with online scaling; promotion to CUDA cores every Nc=128 elements for FP32 accumulation[21]
Parallelism16-way pipeline parallelism (DualPipe, bidirectional), 64-way expert parallelism spanning 8 nodes, ZeRO-1 data parallelism; no tensor parallelism in training[22]
Hardware2048 NVIDIA H800 GPUs; nodes of 8 GPUs with NVLink/NVSwitch (NVLink 160 GB/s); InfiniBand (50 GB/s) across nodes[23]
Disclosed compute2.788M H800 GPU hours total (2664K pre-training + 119K context extension + 5K post-training); ~$5.576M at $2 per GPU hour; 180K GPU hours per trillion tokens[24]

Post-training

SFTyes[25]
Preference optimisationGRPO[26]
Reasoning trainingLong-CoT reasoning data distilled from the DeepSeek-R1 series (reflection/verification patterns); SFT data curated from RL-trained expert model generators via rejection sampling; GRPO RL with rule-based and model-based reward models; self-rewarding via constitutional-AI-style voting[27]
DistillationDeepSeek-R1 series: reasoning capability distilled into DeepSeek-V3 via R1-generated SFT data and expert-model rejection sampling[28]

Modality

Typetext-only
Attachmentn/a[29]

Inference efficiency

KV-cache designMLA low-rank latent KV cache: only the compressed KV latent (dc=512) and the decoupled RoPE key (64 dims per head) are cached per token, sharply reducing KV cache versus MHA[9]
Quantisation shippednone disclosed[30]
Speculative decodingMTP modules repurposable for speculative decoding: second-token acceptance rate 85-90%, ~1.8x decoding speed (tokens per second)[31]
Serving optimisationsSeparate prefill/decode deployment: prefill TP4+SP with DP8 and EP32 (4 nodes/32 GPUs, 32 redundant experts); decode TP4+SP with DP80 and EP320 (40 nodes/320 GPUs, one expert per GPU, shared expert treated as always-selected routed expert); redundant high-load expert duplication with periodic rebalancing; dynamic redundancy explored; IBGDA; dual micro-batch overlap of attention and MoE dispatch/combine[30]

Evaluation

Benchmarks (report's own numbers only)

BenchmarkValueRef
MMLU (EM)88.5Table 6
MMLU-Redux (EM)89.1Table 6
MMLU-Pro (EM)75.9Table 6
GPQA-Diamond (Pass@1)59.1Table 6
SimpleQA (Correct)24.9Table 6
C-SimpleQA (Correct)64.8Table 6
DROP (3-shot F1)91.6Table 6
LongBench v2 (Acc.)48.7Table 6
HumanEval-Mul (Pass@1)82.6Table 6
LiveCodeBench (Pass@1-COT)40.5Table 6
Codeforces (Percentile)51.6Table 6
SWE Verified (Resolved)42.0Table 6
AIME 2024 (Pass@1)39.2Table 6
MATH-500 (EM)90.2Table 6
CNMO 2024 (Pass@1)43.2Table 6

Provenance references

  1. stated · Title / Abstract
  2. stated · Title page author line
  3. stated · pipeline
  4. stated · Abstract ('The model checkpoints are available at https://github.com/deepseek-ai/DeepSeek-V3')
  5. stated · Abstract / §4.2 / Table 3
  6. stated · Abstract / §4.2
  7. stated · §4.2
  8. n/a · §2.1.1
  9. stated · §2.1.1
  10. stated · §3.3.3 ('Inputs of the SwiGLU operator in MoE')
  11. stated · §2.1.2 (Eqs. 12-15)
  12. stated · §2.1.2 / §4.2
  13. stated · §2.1.2
  14. stated · §4.3
  15. stated · §2.1.1 (Eq. 3)
  16. stated · §2.1.1 (Eqs. 2-4, 7-9)
  17. stated · §2.2 (Eq. 21) / §3.2.3 / §4.2
  18. stated · §4.2 / §3.3.1 / §3.2.3
  19. stated · §4.1
  20. stated · §4.2 / §4.3
  21. stated · §3.3
  22. stated · §3.2
  23. stated · §3.1 / §3.2.2
  24. stated · Table 1 / §1
  25. stated · §5.1
  26. stated · §5.2.2
  27. stated · §5.1 / §5.2 / §5.4.2
  28. stated · §5.1 / §5.4.1
  29. n/a · §4.4.1
  30. stated · §3.4
  31. stated · §5.4.3 / §2.2