Skip to content
Friendly disclaimer: flozi00 TechHub is a solo side-project next to a full-time job — personal learning notes, no official statements. Verify critical steps yourself.

Self-hosting DeepSeek V4 Pro: the actual math

What 1.6T parameters really cost to serve: the total-vs-active MoE asymmetry, weight-band tables per precision, KV-cache growth to 1M context, decode throughput ceilings, and the computed break-even against DeepSeek's own API — from primary sources only.

10 min readflozi00
aimachine-learninggpudeepseekmoeself-hostingdatacenter
Skip to the full article
Watch · explore · understand

MoE has a storage bill and a per-token work bill

Follow total weights, activated experts and per-request cache into a bounded hosting estimate.

AI-assisted learning visualization · schematic article explanation

Step 1 / 4Do not size storage by active weights

Experts are model branches chosen by routing. A resident deployment stores the full checkpoint even when a token uses only a subset.

Costs & resourcesCurrent stepSelect a block to explain it
All resident weights
Total parameters and storage format set the weight payload.
Active experts per token
Routing selects only part of the model for a token.
Runtime and interconnect
Communication and kernels affect achieved throughput.
  1. Active experts per token Runtime and interconnect
    selected work
What to remember

Active parameters help describe work; total resident parameters and request state determine memory fit.

The article’s cache-ratio estimates, rooflines and prices are dated assumptions or vendor claims, not deployment guarantees. Offloading changes the resident-memory model.

Terms and the complete walkthrough
MoE
Mixture of Experts: routing selects a subset of model branches.
Resident weights
Model data kept in the accelerator memory of the deployment.
Roofline
An idealized bound set by a resource such as memory bandwidth.
  1. Do not size storage by active weights

    Experts are model branches chosen by routing. A resident deployment stores the full checkpoint even when a token uses only a subset.

  2. Add each request’s state

    The KV cache stores attention state for each request. Leave room for it and runtime allocations after accounting for the weights.

  3. Turn a ceiling into a measurement

    Bandwidth divided by estimated bytes gives a simplified ceiling. Routing, communication and prompt processing must be present in the measured deployment.

  4. Compare the same token mix

    API prices distinguish input, output and cached input. Compare hosting costs with the same mix and include idle time and operations.

All connections

  • All resident weights → Fit and measure the deployment: resident bytes
  • Context and concurrent users → Fit and measure the deployment: request memory
  • Active experts per token → Runtime and interconnect: selected work
  • Runtime and interconnect → Fit and measure the deployment: measured rate
  • Fit and measure the deployment → Compare equal billing units: usable capacity
Set your own pace. Pause at any time or select a step directly.

DeepSeek-V4-Pro shipped with the two most seductive numbers in open-weights history: 1.6 trillion parameters and 1M-token context, under an MIT license. The internet's takeaway — "a frontier model you can run at home" — is wrong by roughly three orders of magnitude. This guide is the arithmetic that separates the two claims: total parameters set your memory bill, active parameters set your speed, and the 1M context sets your KV-cache bill. This is a multi-accelerator deployment; the required configuration depends on usable memory, topology and serving software.

Every figure below is either quoted from DeepSeek's own primary sources (release note, model card, tech report, config.json) or computed in the open, with assumptions labeled. Hardware reference figures (H200 = 141 GB @ 4.8 TB/s, H100 = 80 GB @ 3.35 TB/s, B200 = 180 GB @ 7.7 TB/s, MI355X = 288 GB @ 8.0 TB/s) are the site-audited constants from the VRAM deep dive.

The official config, pinned

From the model card and release note — not from anyone's benchmark 1 2:

PropertyDeepSeek-V4-ProSource
Total parameters1.6Tmodel card / release note
Activated parameters49Bmodel card / release note
Context length1,048,576 (1M)model card, max_position_embeddings
ArchitectureMoE (DeepSeekMoE, retained from V3)tech report
AttentionHybrid: Compressed Sparse Attention (CSA) + Heavily Compressed Attention (HCA), successor to V3's MLAtech report 3
Released precisionFP8 base; instruct = routed experts FP4, everything else FP8model card
Layers / KV heads / head dim61 / latent-compressed / 512config.json
LicenseMITmodel card

The instruct checkpoint you actually download is the FP4+FP8 mixed one: its 64 safetensors shards total 865 GB as published on Hugging Face 4 — before a single byte of KV cache, activation buffers, or CUDA graphs.

The MoE asymmetry: weights are total, compute is active

Mixture-of-Experts means each token is routed through a small subset of the network. DeepSeek's config: 384 routed experts, 6 selected per token, 1 shared expert. So per token, only roughly 49B of the 1.6T parameters are touched. This creates the asymmetry that makes V4-Pro look deceptively cheap:

Wbytes=Ptotal×beff8W_{\text{bytes}} = P_{\text{total}} \times \frac{b_{\text{eff}}}{8} decode bytes/token≈Pactive×beff8\text{decode bytes/token} \approx P_{\text{active}} \times \frac{b_{\text{eff}}}{8}

Weights VRAM scales with total parameters (1.6T) — every expert must sit in memory even if most are idle, because routing is data-dependent and unpredictable. Serving FLOPs and per-token weight reads scale with active parameters (49B) — the same byte level as a mid-size dense model. This is the entire "1.6T sounds like 49B" pitch: the marketing number (49B active, ~30 GB of bytes moved per token) and the memory number (1.6T, ~0.9–3.2 TB resident) are both true, simultaneously, and only one of them fits in your budget. It is the same quantization-vs-bits-per-weight math as for dense models — the twist is which parameter count each resource follows.

The asymmetry is real, not a trick: it is why DeepSeek can serve this at API prices we will pin below. But it transfers compute cost to you and keeps memory cost in full. Your 8-GPU node sits at ~77–88% of its memory just holding weights to win back a per-token speed of a small model.

Weight bands: what fits on what

Weight bytes at each precision (using PtotalP_{\text{total}}, per the formula above), plus the ~15% serving overhead (activation buffers, communication scratch, CUDA-graph allocations — the same overhead band our inference calculator uses) before any KV cache:

PrecisionRaw weights+15% servingFits on
fp16 / bf16 (2 B/param)3,200 GB3,680 GBnothing single-node; GB200 NVL72-class (13,392 GB) fits with room
fp8 (1 B/param)1,600 GB1,840 GBno 8-GPU node except 8×MI355X (2,304 GB); NVL72 comfortably
4-bit / FP4 (0.5 B/param)800 GB920 GB8×H200 (1,128 GB) or 8×B200 (1,440 GB), barely; 8×MI355X with headroom
Released FP4+FP8 checkpoint (actual, 865 GB)865 GB994 GB8×H200 node with ~12% headroom; no single GPU of any class fits 865 GB

Read that right-hand column carefully: not one shipping GPU holds even the FP4 weights — the 288 GB MI355X holds less than a third of the released checkpoint. The node math only closes because 8-GPU platforms pool memory via tensor/expert parallelism, and every one of those inter-GPU hops costs bandwidth — on H200 NVLink (~900 GB/s bidirectional per GPU) experts cross GPUs constantly, which is why MoE serving is far more parallelism-sensitive than dense models.

And for a 1M-context model, fp16 was never in the running: the released model is FP4+FP8 natively, quantizing it back up to fp16 buys quality margin nobody has measured yet and triples a bill you already cannot pay. The realistic bands are the last two rows: the published checkpoint on an 8×H200-class node (~994 GB total, KV budget ~50–130 GB) or fp8 on 8×MI355X / larger clusters.

The KV chain: where 1M context explodes

Weights are the fixed cost; KV cache is the per-user cost, and it scales linearly with context. The general formula is the same one derived in our KV-cache guide:

KV bytes=2×L×HKV×dhead×bdtype×s\text{KV bytes} = 2 \times L \times H_{\text{KV}} \times d_{\text{head}} \times b_{\text{dtype}} \times s

V4-Pro does not publish bare per-token KV bytes the way a GQA model does — its CSA/HCA hybrid compresses the cache along the sequence dimension with per-layer ratios (128×, 4×, plus 0 on some layers, all present in config.json 5). What DeepSeek does publish, as their own headline efficiency claim: at 1M context, V4-Pro needs only 10% of the KV cache of DeepSeek-V3.2, while using only 27% of the single-token FLOPs 3. V3.2 uses V3's MLA scheme at 68.6 KiB/token in bf16 (the same figure our KV guide derived from V3's config 6). So the honest, labeled estimate:

KV/tokenV4-Pro≈0.10×70,272 B≈7,027 B≈6.9 KiB\text{KV/token}_{\text{V4-Pro}} \approx 0.10 \times 70{,}272\ \text{B} \approx 7{,}027\ \text{B} \approx 6.9\ \text{KiB}

— an estimate derived from their published ratio applied to a known V3 config, not a figure they print directly. Now the table for one user:

ContextUncompressed MLA (V3.2-equivalent)Effective (10% claim)
4,0960.29 GB0.03 GB
32,7682.30 GB0.23 GB
131,072 (128k)9.21 GB0.92 GB
1,048,576 (1M)73.69 GB7.37 GB

Two readings, and you need both:

  • The compression is genuinely remarkable. A 1M-token conversation for 7.4 GB would have been ~74 GB on V3.2 and would be measured in terabytes on an uncompressed GQA model at this scale. The architecture is doing real work.
  • 1M context is still a full H200 of memory per couple of users. On the only realistic node (8×H200, ~130 GB free after the FP4 checkpoint + overhead), a fully-utilized 1M-context user costs 7.4 GB — but 32 concurrent 128k users cost 32×0.92=29.432 \times 0.92 = 29.4 GB, and the Think-Max mode DeepSeek itself recommends at ≥384K context 2 triples that per user. Your concurrency ceiling on the flagship config is dozens, not hundreds, unless you buy more nodes.

The prefill bill matters too: processing 1M input tokens means ~1M × (49B active × 2 FLOP/param) ≈ 101710^{17} FLOPs of compute — a FLOP estimate, not a time prediction. Attention, routing and achieved utilization must be included to estimate prefill latency; large prompts also allocate KV state and compete with other requests for memory.

Throughput ceiling: bandwidth ÷ bytes-moved

Decode is memory-bound (the KV guide's arithmetic model): each generated token requires reading the active weights from HBM. With Pactive=49P_{\text{active}} = 49B:

tok/sceiling≈aggregate HBM bandwidthPactive×bytes/param\text{tok/s}_{\text{ceiling}} \approx \frac{\text{aggregate HBM bandwidth}}{P_{\text{active}} \times \text{bytes/param}}
Serving configBytes moved/token (active)Ceiling (batch 1, fp8)Ceiling (released FP4+FP8, ~26.5 GB est.)
8×H200 @ 4.8 TB/s = 38.4 TB/s49 GB784 tok/s~1,450 tok/s
8×B200 @ 7.7 TB/s = 61.6 TB/s49 GB1,257 tok/s~2,325 tok/s
8×MI355X @ 8.0 TB/s = 64 TB/s49 GB1,306 tok/s~2,416 tok/s

Aggregate ceiling includes KV-read overhead: at full 1M context (7.37 GB KV re-read per token, effective) it drops to ~681 tok/s on 8×H200 fp8.

Caveats, stated: these are ceilings, not benchmarks — they ignore attention FLOPs, routing/communication overhead (large for 384 experts spread over 8 GPUs), kernel launch and dequantization cost. Actual throughput must be measured for the model, batch size, runtime and interconnect; no fixed efficiency percentage follows from this roofline. And per-user latency is what users feel: batching N users on one weights-read amortizes bandwidth but divides per-user speed by N. The FP4 column's 26.5 GB is our estimate (49/1600 of the 865 GB checkpoint). The important fact survives all caveats: the node behaves, per token, like a 30–50 GB model that takes 900+ GB to store.

The API you are competing against

DeepSeek's published peak rates for deepseek-v4-pro, checked 29 September 2026, are $1.32 per million cache-miss input tokens, $3.96 per million output tokens, and $0.044 per million cache-hit input tokens. Off-peak rates are half the peak rates; prices can change.7 For an illustrative 3:1 cache-miss input:output mix, one million total billed tokens costs:

(0.75×1.32)+(0.25×3.96)=1.98 USD.(0.75 × 1.32) + (0.25 × 3.96) = 1.98\ \mathrm{USD}.

Compare the same unit on both sides. Assume a rented 8×H200 node costs $22/hour and delivers 300 output tokens/second sustained, with exactly three input tokens per output. That corresponds to 1,200 total tokens/second, or 4.32 million total tokens/hour. Ignoring the extra compute and scheduling needed for prefill, its optimistic cost is $22 / 4.32 ≈ $5.09 per million total tokens. Against the $1.98 peak API example, that is about 2.6×, not 10×. The earlier comparison divided by output-token throughput and compared the result with a blended input-plus-output API price; those units were inconsistent.

At the theoretical 784 output-token/second H200 bandwidth ceiling above, the same mix would yield 3,136 total tokens/second and an optimistic $1.95 per million total tokens. The exact cost-parity point under these assumptions is about 772 output tokens/second (22 × 10^6 / (1.98 × 3600 × 4)). That is very close to the roofline, which omits communication, attention, prefill, power and utilisation losses. A measured deployment would normally need a lower hourly cost, cache-hit-heavy traffic, off-peak comparison, or a different workload mix to change this result. No universal self-hosting break-even follows from these figures.

These calculations are illustrative. The actual decision requires a hardware quote, measured throughput including prefill, the real input/output and cache-hit mix, utilisation, support and operational costs, and a current API price. Data-location or control needs may also matter independently of token price.

What "open weights" does and does not buy you

The critical view, primary-source edition:

  • Weights are open; the recipe is not fully reproducible. MIT-licensed weights, yes. But the 32T+ token pretraining corpus is unpublished, the full post-training pipeline (domain experts, GRPO reward models, on-policy distillation teachers) is described in the tech report 3 only at the level you can read above. "Open" here means usable and modifiable, not reproducible — you cannot retrain or even fully audit what you are deploying.
  • DeepSeek never claimed "beats every frontier model." Their own model card comparison tables 2 show V4-Pro-Max losing to Opus-4.6 Max and Gemini-3.1-Pro on most knowledge and agentic benchmarks (e.g. MMLU-Pro 87.5 vs Gemini's 91.0; Terminal Bench 67.9 vs GPT-5.4's 75.1), and winning on some coding and math ones. Claims of "beats frontier" circulating in third-party posts are community leaderboards and vibes — the release note itself says "performance rivaling the world's top closed-source models" and, notably, "please rely only on our official accounts for DeepSeek news" 1. DeepSeek's own honesty here is unusually good; borrow it.
  • Pin the version actually used. The original V4 announcement and model card describe a preview, but DeepSeek announced V4-Pro general availability in August 2026 and its pricing page lists DeepSeek-V4-Pro-0813 as the API version.87 An open-weight checkpoint and an evolving API endpoint should not be assumed byte-identical.
  • The efficiency claims are DeepSeek's, not yet independently verified at the byte level. The 10%-of-V3.2 KV and 27%-of-FLOPs figures come from their tech report's own Figure 1 estimates. Our KV table above inherits that uncertainty and says so.

The takeaway is not that V4-Pro is overhyped — on the primary sources, it is an extraordinary piece of engineering. The takeaway is that open weights transfers you a memory bill and an ops problem, not a frontier model you can park next to your desk. The 49B is what you pay per token; the 1.6T is what you buy upfront; and 1M context is the line item that decides your fleet size. Run your own numbers in the inference calculator before quoting anyone's cluster.

Footnotes

  1. DeepSeek, DeepSeek V4 Preview Release, api-docs.deepseek.com/news/news260424 (accessed 2026-09-24). ↩ ↩2

  2. DeepSeek-AI, DeepSeek-V4-Pro model card, huggingface.co/deepseek-ai/DeepSeek-V4-Pro (accessed 2026-09-24). ↩ ↩2 ↩3

  3. DeepSeek-AI, DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence, arXiv:2606.19348 (2026). ↩ ↩2 ↩3

  4. Sum of the 64 safetensors shards via the Hugging Face Hub API: 865 GB total; +15% serving overhead = 994 GB. ↩

  5. config.json of deepseek-ai/DeepSeek-V4-Pro on Hugging Face: 61 layers, 384 routed experts, 6 active per token, FP4 expert_dtype, max_position_embeddings 1,048,576, per-layer compress_ratios (128, 4, 0). ↩

  6. DeepSeek-V2 (MLA rank-512 latent + 64-dim RoPE key = 70,272 B/token bf16 at 61 layers), arXiv:2405.04434; V3 config as derived in our KV-cache guide. ↩

  7. DeepSeek, Models & Pricing (checked 2026-09-29; prices subject to change). ↩ ↩2

  8. DeepSeek, DeepSeek-V4-Pro GA Release, 13 August 2026. ↩