Does CodeLlama-34b-instruct-hf fit in 12GB of VRAM?
Not at these settings. No indexed quantization of CodeLlama-34b-instruct-hf fits 12GB card at any context we compute, with f16 KV. The smallest shipped quantization is 13.23 GiB in weights alone, against 11.16 GiB usable. CPU offload can still run it, slowly.
Every quantization at every context
| Quant | Weights● | 4K◐ | 8K◐ | 16K◐ | 32K◐ | 64K◐ | 128K◐ |
|---|---|---|---|---|---|---|---|
| Q8_0 | 33.39 GiB | 35.0 | 35.8 | 37.3 | 40.3 | 46.3 | 58.3 |
| Q6_K | 25.78 GiB | 27.4 | 28.2 | 29.7 | 32.7 | 38.7 | 50.7 |
| Q5_K_M | 22.20 GiB | 23.8 | 24.6 | 26.1 | 29.1 | 35.1 | 47.1 |
| Q5_0 | 21.64 GiB | 23.3 | 24.0 | 25.5 | 28.5 | 34.5 | 46.5 |
| Q5_K_S | 21.64 GiB | 23.3 | 24.0 | 25.5 | 28.5 | 34.5 | 46.5 |
| Q4_K_M | 18.83 GiB | 20.5 | 21.2 | 22.7 | 25.7 | 31.7 | 43.7 |
| Q4_K_S | 17.83 GiB | 19.5 | 20.2 | 21.7 | 24.7 | 30.7 | 42.7 |
| Q4_0 | 17.74 GiB | 19.4 | 20.1 | 21.6 | 24.6 | 30.6 | 42.6 |
| Q3_K_L | 16.55 GiB | 18.2 | 18.9 | 20.4 | 23.4 | 29.4 | 41.4 |
| Q3_K_M | 15.17 GiB | 16.8 | 17.6 | 19.1 | 22.1 | 28.1 | 40.1 |
| Q3_K_S | 13.60 GiB | 15.2 | 16.0 | 17.5 | 20.5 | 26.5 | 38.5 |
| Q2_K | 13.23 GiB | 14.9 | 15.6 | 17.1 | 20.1 | 26.1 | 38.1 |
Figures are GiB of total memory: weights plus KV cache plus compute buffer and backend overhead. Weights and KV are near-exact; the overhead term is modeled. Hover any cell for the breakdown.
Why there are no speeds on this page
A capacity is not a card. Whether a model fits depends only on memory, so every figure above holds for any 12GB accelerator. How fast it runs depends on memory bandwidth, which varies several-fold between cards of the same capacity — so putting a tokens-per-second number here would be inventing one. Pick a specific card from hardware and the speed column appears.
Why other calculators disagree
A parameters × bits ÷ 8 estimate ignores two things that dominate at long context. First, the weights themselves are not the nominal rate — quantizations are mixtures, so the real file is consistently larger than the label implies. Second, the KV cache grows linearly with context and, past about 32K, becomes larger than the weights for many models.