DeepSeek-Coder-V2-Instruct
deepseek-ai/DeepSeek-Coder-V2-InstructDeepSeek-Coder-V2-Instruct at Q4_K_M is exactly 142,453,964,736 bytes (132.67 GiB / 142.45 GB) — an effective 4.834 bits per weight, not the nominal 4. Its KV cache at 32K is 2.11 GiB.
Shipped quantizations
| Quant | Size● | Exact bytes● | Effective bpw● | Tensors● | Publisher |
|---|---|---|---|---|---|
| IQ1_S2 shards | 44.14 GiB | 47,392,224,928 | 1.608 | — | legraphista |
| IQ1_M2 shards | 49.06 GiB | 52,682,669,728 | 1.788 | — | bartowski |
| IQ1_M3 shards | 49.06 GiB | 52,682,669,856 | 1.788 | — | legraphista |
| IQ2_XXS3 shards | 57.28 GiB | 61,500,077,824 | 2.087 | — | legraphista |
| IQ2_XS2 shards | 63.99 GiB | 68,711,290,528 | 2.332 | — | bartowski |
| IQ2_XS3 shards | 63.99 GiB | 68,711,290,656 | 2.332 | — | legraphista |
| IQ2_S3 shards | 65.07 GiB | 69,866,895,136 | 2.371 | — | legraphista |
| IQ2_M4 shards | 71.64 GiB | 76,920,821,632 | 2.610 | — | legraphista |
| Q2_K_S4 shards | 74.13 GiB | 79,601,274,784 | 2.701 | — | legraphista |
| Q2_K3 shards | 80.04 GiB | 85,946,674,976 | 2.917 | — | bartowski |
| Q2_K3 shards | 80.04 GiB | 85,946,675,008 | 2.917 | — | second-state |
| Q2_K4 shards | 80.04 GiB | 85,946,675,072 | 2.917 | — | legraphista |
| Q2_K_L3 shards | 81.44 GiB | 87,441,714,976 | 2.967 | — | bartowski |
| IQ3_XXS4 shards | 84.61 GiB | 90,846,566,304 | 3.083 | — | legraphista |
| IQ3_XS5 shards | 89.69 GiB | 96,304,424,928 | 3.268 | — | legraphista |
| Q3_K_S4 shards | 94.70 GiB | 101,679,196,128 | 3.450 | — | second-state |
| Q3_K_S5 shards | 94.70 GiB | 101,679,196,160 | 3.450 | — | legraphista |
| IQ3_S5 shards | 94.70 GiB | 101,679,196,160 | 3.450 | — | legraphista |
| IQ3_M5 shards | 96.27 GiB | 103,371,253,792 | 3.508 | — | legraphista |
| Q3_K_M3 shards | 104.93 GiB | 112,665,528,128 | 3.823 | — | bartowski |
| Q3_K_M4 shards | 104.93 GiB | 112,665,528,256 | 3.823 | — | second-state |
| Q3_K5 shards | 104.93 GiB | 112,665,528,352 | 3.823 | — | legraphista |
| Q3_K_L5 shards | 113.97 GiB | 122,372,065,344 | 4.153 | — | second-state |
| Q3_K_L6 shards | 113.97 GiB | 122,372,065,440 | 4.153 | — | legraphista |
| IQ4_XS6 shards | 116.94 GiB | 125,563,453,568 | 4.261 | — | legraphista |
| Q4_05 shards | 123.78 GiB | 132,912,455,776 | 4.510 | — | second-state |
| IQ4_NL6 shards | 123.78 GiB | 132,912,455,808 | 4.510 | — | legraphista |
| Q4_K_S5 shards | 124.68 GiB | 133,875,834,944 | 4.543 | — | second-state |
| Q4_K_S6 shards | 124.68 GiB | 133,875,835,008 | 4.543 | — | legraphista |
| Q4_K_M4 shards | 132.67 GiB | 142,453,964,736 | 4.834 | — | bartowski |
| Q4_K_M5 shards | 132.67 GiB | 142,453,964,864 | 4.834 | — | second-state |
| Q4_K7 shards | 132.67 GiB | 142,453,965,024 | 4.834 | — | legraphista |
| Q5_K_S7 shards | 151.16 GiB | 162,308,464,576 | 5.508 | — | legraphista |
| Q5_K_S6 shards | 151.16 GiB | 162,308,464,768 | 5.508 | — | second-state |
| Q5_06 shards | 151.16 GiB | 162,308,464,768 | 5.508 | — | second-state |
| Q5_K8 shards | 155.74 GiB | 167,223,787,648 | 5.675 | — | legraphista |
| Q5_K_M6 shards | 155.74 GiB | 167,223,787,680 | 5.675 | — | second-state |
| Q6_K9 shards | 180.25 GiB | 193,541,724,384 | 6.568 | — | legraphista |
| Q6_K7 shards | 180.25 GiB | 193,541,724,512 | 6.568 | — | second-state |
| Q8_011 shards | 233.41 GiB | 250,623,467,968 | 8.505 | — | legraphista |
KV cache by context
| Context | KV cache (f16)● | Flat formula | Overstated by | Full / windowed / recurrent |
|---|---|---|---|---|
| 4,096 | 0.26 GiB | 18.75 GiB | 71.11× | 60 / 0 / 0 |
| 8,192 | 0.53 GiB | 37.50 GiB | 71.11× | 60 / 0 / 0 |
| 16,384 | 1.05 GiB | 75.00 GiB | 71.11× | 60 / 0 / 0 |
| 32,768 | 2.11 GiB | 150.00 GiB | 71.11× | 60 / 0 / 0 |
| 65,536 | 4.22 GiB | 300.00 GiB | 71.11× | 60 / 0 / 0 |
| 131,072 | 8.44 GiB | 600.00 GiB | 71.11× | 60 / 0 / 0 |
This model uses multi-head latent attention. No V cache is allocated at all, and the K cache stores a 512-wide latent plus 64 rope dimensions — so reading num_key_value_heads from config.json and multiplying, as every calculator does, overstates the cache by well over an order of magnitude.
Compare with
Will it run on your card?
Why other calculators give a different number
A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 123.50 GiB. The real file is 132.67 GiB, because a quantization is a mixture and some tensors are always kept at higher precision. The larger discrepancy is the cache: this model allocates no value cache at all, so any formula reading num_key_value_heads overstates it by more than an order of magnitude.
Architecture
Questions people ask
- How much VRAM does DeepSeek-Coder-V2-Instruct need?
- Q4_K_M is exactly 142,453,964,736 bytes (132.67 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
- How large is DeepSeek-Coder-V2-Instruct's KV cache?
- 2.11 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
- Is DeepSeek-Coder-V2-Instruct a mixture-of-experts model?
- Yes — 160 experts, 6 routed per token. Every expert must be resident, but only the routed ones are read per token, which is why its memory requirement and its speed behave very differently.
- Which quantization of DeepSeek-Coder-V2-Instruct should I use?
- Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.