How Much VRAM Do I Need for Local LLMs?

By LLM Hardware team · Methodology ·

For a local LLM at 4-bit (Q4_K_M), plan on about 0.6 GB of VRAM per billion parameters, plus 2 GB. That is our formula, parameters × bytes per parameter × 1.2 + 2 GB, with Q4_K_M at 0.5 bytes. So 8 GB runs 7B to 8B models (8B: 6.8 GB), 12 GB runs 14B (10.4 GB), 24 GB runs 27B to 32B (up to 21.2 GB), and a 70B needs about 44 GB. Long context adds KV cache on top: about 8.6 GB for a 32K window on Qwen3-32B. Estimates as of 19 October 2026.

Key facts

Formula
VRAM (GB) = params(B) × bytes_per_param × 1.2 + 2 GB. Q4_K_M = 0.5, Q5_K_M = 0.625, Q8 = 1, FP16 = 2.
Worked example
8B at Q4_K_M is 8 × 0.5 × 1.2 + 2 = 6.8 GB at a short context
RTX 5070 check
Check current price on Amazon
Checked
2026-10-13

Checked 2026-10-13. Author: LLM Hardware team. This site does not store or show Amazon prices. Check current price on Amazon.

Checked 17 October 2026. The formula matches the VRAM calculator. Dory 1.0 4B at Q4 is 4.4 GB and fits 8 GB. Granite Switch 4.1 8B at Q4 is 7.3 GB and fits 8 GB. Granite Switch 4.1 30B at Q4 is 20.0 GB and fits 24 GB, not 16 GB.

Citeable facts

Key fact: An 8B model at Q4_K_M needs 6.8 GB.

How we got it: VRAM (GB) = params(B) × bytes_per_param × 1.2 + 2. Q4_K_M = 0.5, so 8 × 0.5 × 1.2 + 2 = 6.8.

Checked:

Key fact: A 70B model at Q4_K_M needs 44 GB and does not fit a 24 GB or 32 GB consumer GPU.

How we got it: 70 × 0.5 × 1.2 + 2 = 44.

Checked:

Methodology — parameter math, quantization bytes, and the source list.

Quick rule: VRAM (GB) = parameters (billions) × bytes per parameter × 1.2 + 2. Q4_K_M is 0.5, Q5_K_M is 0.625, Q8 is 1.0, FP16 is 2.0. A 7B model at Q4_K_M is 6.2 GB. A 70B model at Q4_K_M is 44 GB. The same math is on the VRAM calculator.

VRAM by Model Size and Quantization

Model Size Q4_K_M Q8_0 FP16 Minimum GPU
7B 6.2 GB 10.4 GB 18.8 GB 8 GB GPU for Q4 only. Q8 needs 12 GB.
8B (qwen3:8b) 6.8 GB 11.6 GB 21.2 GB RTX 4060 8 GB at Q4_K_M
13B 9.8 GB 17.6 GB 33.2 GB 12 GB for Q4. Q8 misses 16 GB.
14B (qwen3:14b) 10.4 GB 18.8 GB 35.6 GB 12 GB or 16 GB at Q4. Not Q8.
32B (qwen3:32b) 21.2 GB 40.4 GB 78.8 GB 24 GB at Q4. 16 GB misses it.
70B (llama3.3:70b) 44 GB 86 GB 170 GB Two 24 GB cards or 64 GB unified memory
405B 245 GB 488 GB 974 GB Multi-GPU workstation

Each cell is params × bytes × 1.2 + 2, rounded to one decimal. The 1.2 factor already includes a short context. Longer windows are the add-on in the next section, and on the VRAM calculator.

Ollama and LM Studio

Pull the tag that matches the VRAM you actually have. In LM Studio, download the Q4_K_M GGUF of the same size.

After the model loads, run ollama ps. GPU% under 100 means part of the model is in system RAM.

The Formula

VRAM (GB) = params(B) × bytes_per_param × 1.2 + 2

bytes_per_param:
  Q4_K_M = 0.5
  Q5_K_M = 0.625
  Q8     = 1.0
  FP16    = 2.0

The 1.2 covers a short context. The +2 GB is the OS.

Example: 13B at Q4_K_M = 13 × 0.5 × 1.2 + 2 = 9.8 GB. The old weight-only sum (13 × 0.5 + 2 = 8.5 GB) left out the 1.2 factor.

Context on top of the formula

The published formula already includes a short context inside the 1.2 factor. The VRAM calculator adds the same extra for a longer window on every model size: 0 GB at 4K, 2 GB at 16K, 6 GB at 32K, and 22 GB at 128K. That add-on is approximate KV cache beyond the short window. It is not a second copy of the weights.

Context 7B 13B–14B 32B–70B
4K+0 GB+0 GB+0 GB
16K+2 GB+2 GB+2 GB
32K+6 GB+6 GB+6 GB
128K+22 GB+22 GB+22 GB

A 32B Q4_K_M at 4K is 21.2 GB. The same model at 32K is 21.2 + 6 = 27.2 GB, which misses a 24 GB card. Check the context control on the calculator before you buy for long documents.

KV cache math: exact per-model numbers, cache quantization, and parallel chats

The flat add-on above is a shortcut. The real KV cache size depends on the model's layer count and attention heads, which are published in each model's config.json on Hugging Face. Per token it is:

KV bytes per token = 2 (K and V) × layers × KV heads × head dim × bytes per value

At the default f16 cache that is 2 bytes per value. Two worked examples from the official configs:

So the flat +6 GB at 32K is generous for an 8B model and too small for Qwen3-32B. For a 32B model at a full 32K window, plan on roughly 21.2 + 8.6 ≈ 30 GB at the default cache. That is a 32 GB card such as the RTX 5090, not a 24 GB card.

Quantizing the KV cache

Both main runtimes can store the cache at lower precision. The Ollama FAQ documents OLLAMA_KV_CACHE_TYPE: f16 is the default, q8_0 uses about half the memory with a very small precision loss, and q4_0 uses about a quarter with a loss that may be more noticeable at long context. It needs Flash Attention and applies to every model the server loads. In llama.cpp the same switch is --cache-type-k / --cache-type-v (-ctk / -ctv) on llama-server.

32K-token KV cache f16 (default) q8_0 (≈ ½) q4_0 (≈ ¼)
Qwen3-8B≈ 4.8 GB≈ 2.4 GB≈ 1.2 GB
Qwen3-32B≈ 8.6 GB≈ 4.3 GB≈ 2.1 GB

With a q8_0 cache, Qwen3-32B Q4_K_M at 32K comes to roughly 21.2 + 4.3 ≈ 25.5 GB. That still misses a 24 GB card. At q4_0 it is about 23.3 GB, which loads on 24 GB with almost no headroom. For long documents on 24 GB, a 27B-class model such as Qwen3.8-27B (18.2 GB at Q4) with a q8_0 cache is the safer pick.

Parallel requests multiply the cache

Serving more than one chat at a time, for example an Open WebUI box shared by a family or an agent that runs tool calls in parallel, multiplies the cache. The Ollama FAQ says memory scales with OLLAMA_NUM_PARALLEL × OLLAMA_CONTEXT_LENGTH. In llama-server the slot count is --parallel. Two parallel 32K chats on Qwen3-32B need about 17.2 GB of f16 cache on top of the weights. Size for the number of users first, then pick the GPU in the best GPU for LLMs guide or the 24 GB GPU guide.

MoE models: total parameters set the size, CPU offload can move the experts

A Mixture-of-Experts model has to store every expert, so size it on the total parameter count, not the active one. Qwen3.6-35B-A3B is 35B total and 3B active, so Q4 is 35 × 0.5 × 1.2 + 2 = 23.0 GB, a tight fit on 24 GB. Only about 3B parameters are read per token, which is why it generates much faster than a dense 32B.

If the whole model does not fit, llama.cpp can keep the expert weights in system RAM and the rest on the GPU. The llama-server README lists --cpu-moe (all MoE weights on the CPU) and --n-cpu-moe N (the experts of the first N layers on the CPU). That lets a 16 GB card run a 35B-A3B model with the rest in RAM. Expect it to be slower than a full GPU fit, because those experts are read from system memory. A dense model gains far less from offload, since every weight is used for every token.

Q4 vs Q8: Is Quality Affected?

Q4_K_M is the sweet spot for most users. It cuts VRAM roughly in half compared to Q8 while retaining 95-98% of the model's quality. The difference is imperceptible in normal use. Q8 is only worth it if you need maximum accuracy for tasks like math or coding benchmarks.

Format VRAM vs FP16 Quality loss Use when
Q2_K~88% lessNoticeableDesperate for VRAM
Q4_K_M~75% lessMinimalMost users (recommended)
Q5_K_M~69% lessNegligibleYou have headroom
Q8_0~50% lessNoneAccuracy-critical tasks
FP16BaselineNoneFine-tuning / training

What Can I Run on My GPU?

GPU / Memory Best model at Q4 Notes
8 GB VRAM7B Q4 (6.2) or qwen3:8b (6.8)Q8 of an 8B model is 11.6 GB and does not fit. 13B Q4 is 9.8 GB and does not fit.
12 GB VRAMqwen3:14b Q4 (10.4)14B Q8 is 18.8 GB. Qwen3.8-27B Q4 is 18.2 GB and does not fit. Check current price on Amazon.
16 GB VRAM14B Q4 (10.4) and 20B Q4 (14.0)14B Q8 is 18.8 GB. 27B Q4 is 18.2 GB. 32B Q4 is 21.2 GB. None of those fit.
24 GB VRAMqwen3:32b Q4 (21.2) and 34B Q4 (22.4)70B Q4 is 44 GB and does not fit. See the 24 GB GPU guide.
32 GB VRAM32B Q5 (26.0) and 34B Q4 (22.4)Qwen3.6-35B-A3B Q4 is 23.0 GB and fits. 70B Q4 is 44 GB and does not. Flash-Next does not. Liquid d1-3B Q4 is 3.9 GB and fits every row in this table. Check current price on Amazon.
48 GB or 64 GB unified70B Q4 (44 GB)Two 24 GB cards, or a 64 GB unified-memory Mac. 405B Q4 is 245 GB.

Recommended GPUs by VRAM

Checked 17 October 2026. The 4090 page said currently unavailable, so no price is shown. The 4060 page showed Buy New with only 1 left. The 4060 Ti page said currently unavailable. Check current price on Amazon.

Links to Amazon are affiliate links. No extra cost to you.

RTX 4060 8 GB
MSI Ventus 2X 8G OC (B0C8BPW1SP). Fits qwen3:8b at Q4_K_M (6.8 GB). Does not fit 13B Q4 (9.8 GB).
View on Amazon
RTX 4060 Ti 16 GB
MSI Ventus 2X 16G OC (B0CBK7BRL9). Fits qwen3:14b Q4 (10.4 GB) and 20B Q4 (14.0 GB). 14B Q8 is 18.8 GB and does not fit.
View on Amazon
RTX 4090 24 GB
MSI Gaming X Trio 24G (B0BG94PS2F). On 17 October 2026 the listing said currently unavailable, so no price is shown. Qwen3.8-27B Q4 is 18.2 GB and fits. Granite Switch 4.1 30B Q4 is 20.0 GB and fits. Fits qwen3:32b Q4 (21.2 GB). Beam Q4 is 302.8 GB and does not fit. 70B Q4 is 44 GB and does not fit.
View on Amazon

Frequently Asked Questions

Does a MoE model need VRAM for all its parameters?

For a full GPU fit, yes: size it on total parameters. Qwen3.6-35B-A3B is 23.0 GB at Q4 by our VRAM formula. llama.cpp can keep expert weights in system RAM with --cpu-moe or --n-cpu-moe N, so a smaller GPU can run it, more slowly.

Does quantizing the KV cache save VRAM?

Yes. Ollama documents OLLAMA_KV_CACHE_TYPE: q8_0 uses about half the memory of the f16 default and q4_0 about a quarter. llama.cpp uses --cache-type-k and --cache-type-v. For Qwen3-32B a 32K cache drops from about 8.6 GB at f16 to about 4.3 GB at q8_0.

How much VRAM do I need for a 7B LLM?

A 7B model at Q4_K_M is 7 × 0.5 × 1.2 + 2 = 6.2 GB. Q8 is 10.4 GB and FP16 is 18.8 GB. An 8 GB GPU fits Q4_K_M at a short context. Q8 needs 12 GB. The nearby Ollama tag is ollama run qwen3:8b (8B, 6.8 GB at Q4_K_M).

How much VRAM do I need for a 13B model?

A 13B model at Q4_K_M is 13 × 0.5 × 1.2 + 2 = 9.8 GB. Q8 is 17.6 GB and does not fit a 16 GB card. A 12 GB GPU fits Q4_K_M at a short context. qwen3:14b is the practical Ollama tag and needs 10.4 GB.

How much VRAM do I need for a 70B model?

A 70B model at Q4_K_M is 70 × 0.5 × 1.2 + 2 = 44 GB. That does not fit a 24 GB or 32 GB consumer GPU. Two 24 GB cards, or a 64 GB unified-memory Mac, can hold it. CPU offload runs, and tokens per second collapse.

Does VRAM include context window memory?

The published formula already includes a short context inside the 1.2 factor, plus 2 GB for the OS. A 32K or 128K window is extra KV cache on top of that, and it depends on layer count. Use the VRAM calculator context control for a rough add-on. It is not inside the weight-only table.

Why did RTX 50-series prices explode if VRAM did not?

Tokens per second, once a model fits, follow memory bandwidth. A 27B Q4_K_M is 18.2 GB, so the 16 GB cards miss it. A 24 GB card still wins on fit. None of these cards fit Qwen3.8-Flash-Next. Size that model on the Flash-Next hardware guide and the VRAM calculator.

What happens if my model does not fit in VRAM?

The model falls back to CPU offloading, which is 10-50x slower. A 13B Q4_K_M is 9.8 GB, so an RTX 4060 8 GB is short by about 2 GB and tokens per second collapse. Fitting the entire model in VRAM is the single biggest factor for inference speed.

Related Guides

Sources & methodology

VRAM figures on this page come from the site’s VRAM formula and model cards. The sitewide formula and the full source list are on the methodology page. For this guide specifically we used:

Spot a number that does not match the linked source? Contact us and we will update the guide.

Sources & last reviewed

Last reviewed by the LLM Hardware team. The date changes only when the numbers or sources on this page change.

Model cards

Quantization, KV cache, MoE offload and runtime docs

GPU specs

VRAM estimates use params × bytes per parameter × 1.2 + 2 GB (Q4_K_M ≈ 0.5 bytes), explained on the methodology page. Found a mismatch? Tell us on the contact page.