Overview
How much VRAM you need for an LLM is the size of the weight file plus the KV cache plus runtime overhead, so a 7B model at Q4_K_M needs roughly 6 to 7 GB at 4,096 context and a 70B needs more than 43 GB before cache. The weight formula and the KV formula are defined on llm-quantization-explained (the method is in methodology) and repeated below with the model each line uses. Mac unified memory is a different page: how much RAM for a local LLM.
How much VRAM does an LLM need?
Add three pieces. Weights are params × bits_per_weight ÷ 8 bytes. KV cache is 2 × layers × kv_heads × head_dim × context × bytes_per_value bytes. Overhead of 1 to 2 GB is an assumption, not a measured allocator reserve. Decimal GB on this page is bytes ÷ 1e9.
Bits per weight for the Qwen estimates are llama.cpp’s Q4_K_M value 4.8944 and Q8_0 value 8.5008, from the quantize README read on 2026-10-12. Parameter counts are the Qwen2.5 model cards. Llama 3.1 sizes below are the README’s published file sizes, not a recomputed estimate.
How much VRAM for a 70B model?
More than 43 GB for the weights alone. The quantize README lists Llama 3.1 70B Q4_K_M at 43.1 GB and the original checkpoint at 280.9 GB (GB in that table), so it does not fit in 24 GB or 32 GB of VRAM before KV cache is added. A round 70 × 4 ÷ 8 = 35 GB uses 4.000 bits and 70e9 parameters and is not the README file size. Qwen2.5-72B (72.7B parameters on its card) is 72.7e9 × 4.8944 ÷ 8 ÷ 1e9 = 44.4779 decimal GB at Q4_K_M and 77.2510 GB at Q8_0. Its KV cache (80 layers, 8 KV heads, head dimension 8192 ÷ 64 = 128, 2 bytes per value) is 327,680 × context bytes: 1.3422 GB at 4,096 tokens and 10.7374 GB at 32,768. The full 70B walk-through is on vram-for-70b-model.
How much VRAM for 7B, 13B/14B and 32B models?
Qwen card counts and the same bits per weight. KV uses each config.json: head dimension 128 in every case below, and 2 bytes per value because torch_dtype is bfloat16.
| Card | Layers | KV heads | Q4_K_M weights | Q8_0 weights | KV at 4,096 | KV at 32,768 |
|---|---|---|---|---|---|---|
| Qwen2.5-7B (7.61B) | 28 | 4 | 4.6558 GB | 8.0864 GB | 0.2349 GB | 1.8790 GB |
| Qwen2.5-14B (14.7B) | 48 | 8 | 8.9935 GB | 15.6202 GB | 0.8053 GB | 6.4425 GB |
| Qwen2.5-32B (32.5B) | 64 | 8 | 19.8835 GB | 34.5345 GB | 1.0737 GB | 8.5899 GB |
7B Q4_K_M example at 4,096 context: 4.6558 + 0.2349 + an assumed 1 to 2 GB overhead = 5.8907 to 6.8907 decimal GB. 32B Q4_K_M at 4,096: 19.8835 + 1.0737 + 1 to 2 = 21.9572 to 22.9572 GB. 32B Q8_0 weights alone are 34.5345 GB, which is already over 32 GB. Llama 3.1 8B Q4_K_M is the README’s 4.9 GB file (4.58 GiB in the other table), not the Qwen 7.61B estimate. The 32B case has its own page: vram-for-32b-model.
How much VRAM does Llama 3.1 8B need?
The llama.cpp quantize README lists Llama 3.1 8B at 4.9 GB for Q4_K_M (Memory/Disk table, GB) and 4.58 GiB for Q4_K_M, 7.95 GiB for Q8_0 and 14.96 GiB for F16 (quantization table, GiB). Those are weight files only. Add KV cache and the 1 to 2 GB overhead assumption. The README does not give a Llama 3.1 8B KV figure and this page has not read that model’s config.json, so the KV term for Llama 3.1 8B is unknown here. For the 8 GB card class see 8gb-vram-llm; for 16 GB see 16gb-vram-llm.
How does context length add to VRAM?
KV bytes scale in a straight line with context length. For Qwen2.5-32B the product is 2 × 64 × 8 × 128 × context × 2 = 262,144 × context bytes. At 4,096 tokens that is 1.0737 GB. At 32,768 it is 8.5899 GB. At the card’s 131,072-token maximum it is 34.3597 GB of KV cache alone, before weights. A card can hold the weights and still fail the long context.
Why do calculators give different answers?
They pick different bits per weight (4.000 versus the README’s 4.8944), different parameter counts (a round 70e9 versus the card’s 72.7B or the README’s 43.1 GB file), GB versus GiB, and different context lengths. Some add a KV term and some do not. This site shows each term. A calculator is planned at vram-calculator; until it ships there is no software-application listing for one. Exceeding the card is what produces cuda-out-of-memory-llm.
System RAM for a Mac is a different page: how much RAM for a local LLM. When the GPU does not hold the file, run-llm-on-cpu is the offload page.
How much VRAM do I need for an LLM?
Add weights, KV cache and overhead. Weights are params × bits ÷ 8, KV cache is 2 × layers × kv_heads × head_dim × context × bytes_per_value, and overhead is an assumed 1 to 2 GB. From the table above, a 7B model at Q4_K_M and 4,096 context is 5.8907 to 6.8907 GB, a 14B is 8.9935 + 0.8053 + 1 to 2 = 10.7988 to 11.7988 GB, a 32B is 21.9572 to 22.9572 GB, and a 70B-class model is over 43 GB of weights. Check your own card with how-to-check-vram.
How much VRAM for a 7B LLM?
About 6 to 7 GB at Q4_K_M and 4,096 context. For Qwen2.5-7B the weights are 4.6558 GB, KV cache is 0.2349 GB, and overhead is an assumed 1 to 2 GB, giving 5.8907 to 6.8907 decimal GB. At Q8_0 the weights alone are 8.0864 GB. This is the model card’s 7.61B, not every 7B model.
How much VRAM does Llama 3.1 8B need?
The weights are 4.9 GB at Q4_K_M per the llama.cpp quantize README, plus KV cache and overhead. The KV term for this model is unknown on this page, so the total is not stated. See the Llama 3.1 8B section above.
How much VRAM for a 13B or 14B model?
For Qwen2.5-14B (14.7B parameters) at Q4_K_M and 4,096 context, 8.9935 GB of weights plus 0.8053 GB of KV cache plus 1 to 2 GB of assumed overhead is 10.7988 to 11.7988 decimal GB. At Q8_0 the weights alone are 15.6202 GB. No Llama 13B row is on this page.
Why is VRAM important for an LLM?
The weights and KV cache must sit in memory the GPU can read quickly, and when they exceed VRAM the runtime has to offload to system RAM or fail. See ram-vs-vram for the difference and run-llm-on-cpu for partial offload. This page gives sizes only. Speed in tokens per second is unknown here because no figure is read from a vendor page for these cards.
My only real use case for local AI is document management, how much VRAM do I realistically need?
Plan for the model size plus the context your documents need, not the model alone. Using the sourced Qwen2.5-7B figures, Q4_K_M weights of 4.6558 GB plus KV cache of 1.8790 GB at 32,768 tokens plus 1 to 2 GB of assumed overhead is 7.5348 to 8.5348 decimal GB, which is tight on an 8 GB card, while 4,096 tokens fits in about 6 to 7 GB. A separate embedding model for search is not sized on this page and its VRAM is unknown here. See 8gb-vram-llm and 16gb-vram-llm.
Which figure should I plan a 70B Q4 download around?
Use 43.1 GB from the llama.cpp Memory/Disk table for Llama 3.1 70B Q4_K_M, and still add KV cache and overhead for VRAM. Do not plan that file as 35 GB.
Is the 1 to 2 GB overhead a measurement?
No. It is an assumption so a result that lands within 1 GB of the card size is not called a fit.
Sources read on 2026-10-13
- llama.cpp quantize README for bits per weight, GiB sizes, and the Memory/Disk table (re-read 2026-10-13: 8B 4.9 GB, 70B 43.1 GB Q4_K_M; Llama 3.1 8B 4.58 GiB Q4_K_M, 7.95 GiB Q8_0, 14.96 GiB F16).
- Qwen2.5-7B, 14B, 32B, and 72B model cards, plus each repo’s
config.json, for parameter counts, layers, heads, hidden size, andtorch_dtype. - RTX 5090, RTX 4090, RTX 3090 family, and RTX 4060 family.
- Radeon RX 7900 XTX and Radeon RX 9070 XT.
- Ollama GPU, Ollama FAQ, Ollama API, and llama.cpp CLI options.
- LM Studio system requirements.
- Intel Arc B580 specifications: returned HTTP 403 on 2026-10-12 and was read on 2026-10-13: 12 GB GDDR6, 192-bit, 456 GB/s, 190 W TBP, PCIe 4.0 x8.
Related
- llm-quantization-explained is the formula.
- vram-requirements applies it by model size.
- 24gb-vs-16gb-vs-12gb-vram applies it by card size.
- best-gpu-for-local-llm names the cards.
- rtx-3090-vs-4090-vs-5090-llm compares three NVIDIA cards.
- local-llm-pc-build covers the rest of the PC.
- run-llm-on-cpu covers CPU and partial offload.
- methodology is the citation rule.
- vram-for-70b-model and vram-for-32b-model go deep on two sizes.
- vram-calculator, 8gb-vram-llm, 16gb-vram-llm size by card.
- ram-vs-vram, how-to-check-vram and cuda-out-of-memory-llm cover memory types, checking, and failures.
- Mac memory questions: what fits my RAM and how much RAM for a local LLM.