Dissecting DeepSeek V3: Four Engineering Secrets Behind Training a 671B Model for $5.576M

Four stacked engineering decisions let DeepSeek V3 train a 671B model for just $5.576M.
DeepSeek V3 is a 671B-parameter MoE model that activates only 37B parameters per token, decoupling knowledge capacity from compute cost. Four key engineering decisions make this possible: MoE routing for activation sparsity; bias-based expert load balancing without auxiliary loss penalties; MLA attention compression combined with the first validated FP8 mixed-precision training at 671B scale; and multi-token prediction for training efficiency. Together, these reduced the full pre-training run to 2.788 million GPU hours and $5.576M with zero rollbacks — though all cost and benchmark figures are self-reported and exclude failed experiments.
A technical report still hosted on arXiv — repeatedly cited by researchers — throws out a number that looks impossible: DeepSeek V3, a 671B-parameter model, completed its entire training run for just $5.576 million. This isn't a summary, a leak, or second-hand reporting. It's a conclusion drawn from dissecting the paper line by line. A YouTuber did a hardcore, line-by-line breakdown of this report, grounding that seemingly counterintuitive cost figure in four specific engineering decisions.
This article follows that complete breakdown, tracing how DeepSeekAd V3 used a "stacked architecture" to push GPU hours to their absolute limit. Keep one number in mind: 2.788 million GPU hours — every calculation in the analysis builds on it.
671B vs. 37B: Decoupling Parameter Count from Compute Cost
DeepSeek V3 is a Mixture of Experts (MoE) model with 61 Transformer layers, each with a hidden dimension of 7168. Every layer contains 1 shared expert plus 256 independent routed experts — each expert being a smaller, more specialized sub-network co-existing within the same layer.
The key mechanism: when the model generates each token, a small router activates only 8 of the 256 routed experts, plus the one shared expert that's always online. So while the model has 671B total parameters, generating any single token actually uses only 37B parameters worth of compute.
This gap is the fundamental reason the whole thing is affordable. Total parameter count describes how much the model "knows"; activated parameter count describes how much compute it actually takes to generate one word. You pay for the compute of a small model while storing the knowledge of a large one. This isn't a cost-cutting trick — it's the core logic of the MoE architecture.
MoE (Mixture of Experts) wasn't invented by DeepSeek. The idea traces back to a 1991 paper by Jacobs et al. and was revived at scale in recent years by Google in projects like Switch Transformer and GLaM. In a traditional dense model, all parameters in every layer participate in every forward pass — parameter count and FLOPs scale almost proportionally. MoE's fundamental breakthrough is decoupling these two: you can scale "total knowledge stored in the model" (total parameters) indefinitely, while inference cost is determined only by the number of experts activated per pass. The trade-offs are additional routing logic, inter-expert communication overhead, and the load-balancing problem — which is exactly what the next few engineering decisions address. Understanding this decoupling is a prerequisite for making sense of "671B but only 37B worth of compute."
Making All 256 Experts Work: Auxiliary-Loss-Free Load Balancing

Building this kind of system immediately runs into a problem: routers tend to "collapse" during training. They repeatedly rely on a few favored experts — because those experts happened to get more training early on, became slightly better, and the router starts routing more traffic toward them, creating a positive feedback loop. The result: 200+ other experts sit idle, undertrained, wasting the capacity you designed those 256 experts to provide.
The standard industry fix is to add a penalty term to the training loss that penalizes routing imbalance. But this penalty directly conflicts with the model's actual goal — predicting the next token.
DeepSeek V3 takes a different approach: it adds a bias term directly to each expert's routing score (rather than to the loss function), and continuously adjusts this bias during training to push traffic toward neglected experts. This is equivalent to nudging the decision itself in real time to achieve balance, rather than penalizing the model after the decision has already been made.
MLA and FP8: Cutting Memory and Precision Costs to the Bone

The second piece of the puzzle is about memory, not compute. DeepSeek V3 carries forward the attention mechanism from its predecessor DeepSeek V2 — MLA (Multi-head Latent Attention).
Standard attention caches full Key and Value vectors for every token during generation — the longer the response, the larger this cache grows. MLA instead caches only a single compressed latent vector per token, reconstructing the full Keys and Values only when needed. Think of it as storing a compressed archive and only decompressing the relevant part when you actually need it. According to DeepSeek's apples-to-apples comparison in the prior model's paper, this yields roughly 60% smaller cache and 5.76× higher generation throughput — with no performance degradation.
The third piece is the number format itself. Most large models train internal values in 16-bit precision for stability, at a real memory cost. DeepSeek V3 uses FP8 (8-bit floating point) across most of the network, roughly halving per-operation memory and compute cost compared to 16-bit — provided you can maintain numerical stability at this scale. And "provided" carries enormous weight here: 8-bit numbers have far less precision headroom, making overflow and rounding errors much more likely, and the larger the model, the more likely accumulated errors can completely derail training. The paper positions this as the first genuine validation that fine-grained 8-bit mixed-precision training remains stable at 671B scale.
The KV cache problem in standard multi-head attention (MHA) is especially acute for long-sequence inference: generating each new token requires retaining the Key and Value vectors of all previous tokens to compute attention weights. As sequence length grows, VRAM usage expands linearly, eventually becoming the bottleneck limiting batch size and throughput. MLA's compression approach belongs to the "low-rank projection" paradigm — projecting high-dimensional KV vectors into a smaller latent space for storage, then recovering them at inference time via a learned up-projection matrix. This is orthogonal to quantization as a compression strategy: quantization compresses the bit-width of each stored value; low-rank projection compresses the number of vectors that need to be stored at all. Using both together is the key path by which DeepSeek V3 simultaneously reduces memory footprint and bandwidth requirements.
The challenges of FP8 training deserve separate mention. IEEE 754 FP16 has a dynamic range of roughly 65,504 and approximately 3 significant decimal digits of precision, while FP8 (E4M3 format) has a dynamic range of only ~448 and further compressed mantissa bits — making it highly susceptible to underflow or overflow in gradient updates. The standard industrial response is "mixed-precision training": forward and backward passes in low precision for speed, with a master copy of weights and gradient accumulation maintained in FP32. DeepSeek V3 goes further by refining quantization granularity (per-tile/per-block rather than per-tensor) to maintain numerical stability at lower precision — which is why the paper lists 671B-scale FP8 stability as a standalone contribution.
Multi-Token Prediction and the "Zero Rollback" Training Miracle

The fourth piece is a change that sounds significant but is physically small. Standard training has the model predict only the immediately next token — one word at a time, repeated trillions of times. DeepSeek V3 adds a second parallel training objective: additionally predicting one token further ahead (what the paper calls prediction depth 1). This seemingly minor change on paper produces measurable real improvements to both training quality and generation speed.
The hardware running all of this: 8 H800 GPUs per node, with NVLink and NVSwitch for intra-node communication and InfiniBand for inter-node. And the most striking single sentence in the paper explicitly states: throughout the entire pre-training run, there were no unrecoverable loss spikes and no rollbacks were performed. For a run of this scale, using a training format never previously validated at this magnitude, this is no small thing — a single unrecoverable spike mid-run could mean weeks of lost work.
The $5.576M Cost Breakdown, and the Skepticism It Deserves

Spelling out the opening number in full: pre-training consumed 2.664 million GPU hours at $5.328 million; extending the context window from 32K to 128K tokens added 119,000 GPU hours at $238,000; post-training and alignment consumed 5,000 GPU hours at $238,000. Total: 2.788 million GPU hours, $5.576 million.
The paper's own disclaimer also needs to be reproduced faithfully: this number excludes all time spent on research exploration and failed experiments. It reflects only the cost of the final successful run — not the entire journey that got there.
What did $5.576 million buy? On MMLU, the general knowledge benchmark, DeepSeek V3 scored 88.5, surpassing Meta's Llama 3.1 405B at 84.4 — even though the latter activates roughly 10× more compute per token. On competition-grade math benchmarks, it scored 61.6. But all of these are self-reported figures, not results from independent leaderboards, and deserve the same level of skepticism as the cost number: this is a company grading itself on its own chosen exam.
Comparison benchmarks help calibrate the order of magnitude here. Industry estimates for GPT-4 training costs generally land in the hundreds of millions of dollars (sourced from independent analyses by firms like SemiAnalysis — OpenAI has not released official figures). Meta's publicly disclosed Llama 3 training used over 16 million H100 GPU hours, which at market rates far exceeds tens of millions of dollars. The H800 is a downgraded export-control version of the H100, with some reduction in NVLink bandwidth and FP8 throughput — so 2.788 million H800 hours and an equivalent number of H100 hours are not perfectly comparable in actual compute delivered. Additionally, the cost structure of "owned cluster" versus "cloud rental" differs enormously: High-Flyer, DeepSeek's parent company, purchased large quantities of GPUs in prior years, and different depreciation schedules can make the same hardware appear at radically different accounting costs. None of this invalidates the paper's figures, but it signals to readers: $5.576 million is a result under a specific accounting framework, not a universal industry benchmark.
A Stacked Architecture, Not a Single Silver Bullet
None of the four decisions alone explains the $5.576 million number. MoE routing determines which 37B parameters get activated; auxiliary-loss-free balancing ensures all 256 experts actually contribute; MLA compresses what the model needs to remember per request; FP8 and multi-token prediction compress the compute cost of training itself and let the entire run complete without a single rollback. Remove any one of them, and the remaining three can't reproduce the same number. This is a stacked architecture — not a magic bullet.
A few honest caveats to close: these are DeepSeek's self-reported numbers, with no external audit currently in existence; the cost excludes all ablation studies and failed runs; and the benchmark scores are likewise self-reported. But none of that makes the underlying engineering false — the architectural choices are documented in sufficient detail in the paper for anyone to verify independently. A number this clean deserves exactly this level of skepticism: not zero, and not excessive.
Related articles

Agent Skills Beginner's Guide: From Concepts to Multi-Agent Collaboration in Practice
A comprehensive guide to Agent Skills: core concepts, components, the importance of Description, standardization, beginner learning paths, and multi-agent collaboration.

One Neuron Detects Both Cats and Cars? We Reproduced It and Found a New Explanation
The cat-car neuron reinterpreted: researcher Cammarata argues it distinguishes pointy from round, not cats from cars. We reproduced the experiment and found the new explanation holds on most inputs—but cars are the exception. The interpretability debate continues on language models.

MCP Server + Python Assistant: A MicroStation Design Efficiency Revolution
Explore the early preview of the MCP Server and Python Assistant in MicroStation 2026: custom tools in five minutes, intelligent sheet index checks, and how AI is reshaping drawing workflows to unleash design creativity.