How much VRAM do I need for local AI?

A rough guide: an 8B model at 4-bit quantization needs about 6 GB, a 14B model about 10 GB, a 32B model about 22 GB and a 70B model about 46 GB, with an 8,192-token context. Longer contexts and higher-quality quantizations need more.

By Anjam JavedUpdated How we choose

The short answer

Memory needed ≈ model weights + KV cache + a little working space. The weights depend on the number of parameters and the quantization. The KV cache depends on the model’s design and how much context you use.

For a quick check, use the LLM VRAM calculator.

These estimates add the model weights at each quantization to a 16-bit KV cache. They leave out the app’s own working buffers, so leave a little memory free.

Model Q4_K_M, 8K context Q8_0, 8K context 16-bit, 8K context Q4_K_M, 32K context
Qwen3 4B 3.7 GB 5.5 GB 9.2 GB 7.3 GB
Llama 3.1 8B 6.0 GB 9.6 GB 17.1 GB 9.2 GB
Qwen3 8B 6.2 GB 9.9 GB 17.6 GB 9.8 GB
Phi-4 (14B) 10.2 GB 16.6 GB 29.7 GB 15.3 GB*
Qwen3 14B 10.4 GB 17.1 GB 30.9 GB 14.4 GB
Mistral Small 3.1 24B 16.0 GB 26.8 GB 49.3 GB 20.1 GB
Qwen3 32B 22.2 GB 37.0 GB 67.7 GB 28.7 GB
Llama 3.3 70B 45.5 GB 77.1 GB 142.7 GB 53.6 GB

* Phi-4’s model card lists a 16K context, so 32K is beyond what it supports. The figure shows the memory trend only.

Model sizes and architecture for each model are in our LLM model sizes table.

What uses the memory

Model weights

Every parameter is stored as a number. At full 16-bit precision, each takes 2 bytes, so an 8-billion-parameter model needs about 16 GB just for its weights. Quantization stores each weight in fewer bits. The llama.cpp project measured these average sizes on Llama 3.1 8B:

Quantization Bits per weight 8B model weights
Q4_K_M 4.89 4.9 GB
Q5_K_M 5.70 5.7 GB
Q6_K 6.56 6.6 GB
Q8_0 8.50 8.5 GB
F16 16.00 16.0 GB

Fewer bits means less memory but some loss of quality. Q4_K_M takes less than a third of the memory of the 16-bit model. It is what Ollama downloads by default for Qwen3 8B: its qwen3:8b tag is the same 5.2 GB file as qwen3:8b-q4_K_M.

KV cache

While a model works through your conversation, it keeps “keys” and “values” for every token so it does not have to recompute them. That store is the KV cache, and it grows with the context:

KV cache = 2 × layers × KV heads × head size × bytes per value × tokens

Qwen3 8B, with 36 layers, 8 KV heads and a head size of 128, uses 147,456 bytes per token at 16-bit. That is about 1.2 GB for 8,192 tokens and 4.8 GB for 32,768 tokens. Some apps can store the KV cache at 8-bit, which roughly halves it.

Working space

The app also needs memory for its own buffers, and your desktop and browser use some graphics memory too. Those vary, so treat any estimate as a minimum.

How to choose

  • 8 GB cards: 4B models comfortably, 8B models at Q4_K_M with a short or moderate context.
  • 12 GB cards: 8B models at higher quality or with long contexts, and 14B models at Q4_K_M with a moderate context.
  • 16 GB cards: 14B models with room for longer contexts. 24B models at Q4_K_M are right at the limit.
  • 24 GB cards: up to about 32B models at Q4_K_M with a moderate context.
  • More than 24 GB: 70B models need about 45 GB or more, which means two cards, a large unified-memory computer or splitting with system RAM.

These groupings follow from the estimates above. Check your exact model and context in the calculator before buying hardware.

Sources

Questions

Is 8 GB of VRAM enough for local AI?

For small models, yes. Qwen3 4B at Q4_K_M needs about 3.7 GB with an 8,192-token context, and 8B models need about 6 GB, so they fit an 8 GB card with a little room left. Larger models need more memory or must be split with system RAM, which is much slower.

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

About 45 GB at Q4_K_M with an 8,192-token context, by our estimate for Llama 3.3 70B. That much memory usually means two graphics cards, a computer with a large pool of unified memory, or running part of the model in system RAM.

Does context length really matter that much?

Yes. The KV cache grows with every token of context. For Llama 3.3 70B, it takes about 10.7 GB at 32,768 tokens on its own, on top of the model weights.

Can I use system RAM instead of VRAM?

Apps like Ollama and LM Studio can put part of a model in system RAM when it does not fit on the graphics card, but that part runs much more slowly. Apple Silicon Macs and some newer PCs share one pool of memory between the processor and graphics, which avoids the split.

Anjam JavedAnjam Javed has used PCs for 20 years, upgrades his own laptops and runs AI tools on local hardware. He holds master's degrees in IT and Marketing Management.More from the author