How much VRAM does DeepSeek V3 671B need at Q4_K_M with full 128K context?

By TechCompare · Updated · How we check

DeepSeek V3 671B needs about 461 GB to host locally, which suits organizations with serious infrastructure budgets. For everyone else the hosted API is usually cheaper. DeepSeek V3's MLA keeps the KV cache to 9.3 GB, against 230 GB for a standard transformer of the same shape.

Calculator

Estimated VRAM required

461 GB

671B params at Q4_K_M, 131,072 token context, batch 1, inference.

Weights
410 GB
KV cache
9.3 GB
Overhead
41.9 GB

Estimate accuracy: Weights within ~3% of most GGUF files from Q4_K_M up, ~7% for Q3_K_M and Q2_K. KV cache within ~5% for standard GQA models, ~10% for MLA or hybrid state estimates. Real VRAM may vary with framework (vLLM vs llama.cpp vs Transformers), Flash Attention, and driver overhead.

Hardware that fits

Unified memory machines show a model budget, not their installed memory. We hold back 8 GB for the system, or use the vendor's GPU limit when that's lower. It's a planning estimate, not a hard limit.

Apple M5 Ultra 512GB
Unified
~504 GB
92% of estimate

Multi-GPU setups

8× RTX PRO 5000 72GB
Pro · 58.5 GB per card
576 GB
82% used
2× NVIDIA B300
Datacenter · 231 GB per card
576 GB
81% used

Pooled cards show up once a model outgrows the biggest single card of that kind. Each card past the first keeps about 1 GB for its own buffers, and that's counted here. Your inference engine has to support the split, and speed also depends on how the cards connect.

DeepSeek V3 ships with a 128K native context, so that's the deployment target used here. At Q4_K_M with 128K context, the practical VRAM footprint is around 461 GB. The full 671B parameter count must be resident in memory even though only 37B activate per token, which puts this in multi-GPU datacenter territory: 6x H100 80GB, 4x H200 141GB, or 3x MI300X 192GB.

How this is calculated

DeepSeek V3 uses Multi-head Latent Attention (MLA), which is the main reason 128K is even runnable. MLA caches one latent of 576 values per layer per token (512 compressed values plus 64 for rope) instead of the standard 2 x layers x hidden x bytes that a vanilla transformer pays.

In practice DeepSeek V3 at 128K context needs roughly 9.3 GB of KV cache. Weights still dominate at 410 GB regardless. The inference economics are unusual: per-token compute matches a ~37B dense model thanks to sparse expert activation, but the memory footprint matches a 671B dense model.

Verdict

MLA is what makes this deployable. It compresses the KV for each layer to a 576 value latent per token, which at the 128K context keeps the cache at roughly 9.3 GB instead of the 230 GB a vanilla transformer with 61 layers at hidden 7168 would need.

Overhead adds about 42 GB, totaling roughly 461 GB resident. Any of the multi-GPU layouts above needs NVLink for tensor parallelism. Moving expert weights to system RAM cuts VRAM, but the host then has to hold them and every token gets slower. Hosted per-token pricing makes self-hosting the niche case rather than the default.

More DeepSeek scenarios

Kimi K3.1 Pro at Q4_K_M
A 2.78T expert pool with 24 latent attention layers and fixed state in the other 69.
View details
Mistral Large 4 at Q4_K_M
A 1T expert pool with 63 latent cache owners and 44 layers that also store an index key.
View details
Muse Spark Open at Q4_K_M
Only 16 of its 62 layers grow with context, and the other 46 hold a 2,048 token window.
View details

Frequently asked questions

Why is the KV cache so high in this calculator?
DeepSeek V3 and R1 use Multi-head Latent Attention (MLA), which stores one 576 value latent per layer per token instead of full keys and values for every attention head. We model that latent directly, which is why the 128K KV cache sits at 9.3 GB rather than the 230 GB a naive computation gives.
Can DeepSeek V3 run on a single MI300X?
No. Even with MLA reducing the KV cache, the 410 GB of Q4 weights alone exceeds a single 192 GB MI300X. You need either 3x MI300X, 6x H100 80GB, or 4x H200 141GB with NVLink for tensor parallelism.
Does sparse activation reduce DeepSeek V3 memory?
It reduces compute, not memory. All experts must be resident in VRAM, and sparse activation just means only some are used per forward pass.
What about DeepSeek-R1-Distill models?
The R1-Distill variants (Qwen 7B/14B/32B and Llama 8B/70B) are dense models that drop into standard VRAM math. R1-Distill-Llama-70B at Q4 needs about 50 GB at 8K context. That's very different from the 671B parent.