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.
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.
Multi-GPU setups
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
Related guides
Frequently asked questions
Why is the KV cache so high in this calculator?
Can DeepSeek V3 run on a single MI300X?
Does sparse activation reduce DeepSeek V3 memory?
What about DeepSeek-R1-Distill models?
Related tools
RAM Latency Calculator
Convert DDR3/DDR4/DDR5 timings (CL, tRCD, tRP, tRAS) into true latency in nanoseconds.
Use toolPower Cost Estimator
Estimate annual electricity costs for your PC, Server, or TV.
Use toolData Transfer Calculator
Calculate file transfer time or the speed you need over USB, Wi-Fi or Ethernet, with latency.
Use toolMemory and Storage Throughput Visualizer
Visualize the large speed gap between CPU cache, RAM, and storage.
Use tool