How much VRAM do you need to run AI models locally?
How much VRAM you need for local LLMs: a simple formula for model weights, quantisation and KV cache, worked examples, and which GPU memory tier fits which model.
LandGadget Newsroom · · 6 min read

On this page
The first question anyone asks before running a chatbot on their own PC is "will it fit?". For local AI, video memory (VRAM) matters more than almost any other spec: if the model fits in the GPU's memory it runs fast; if it doesn't, it crawls or refuses to load. Here is how to work out what you need in five steps, with real examples and no guesswork.
Count the parameters
Every model name tells you its size: Llama 3.1 8B has about 8 billion parameters, Qwen 32B about 32 billion. Each parameter is a number that has to sit in memory while the model runs.
Watch out for mixture-of-experts (MoE) models. They only use a fraction of their parameters for each token, which makes them fast, but all of the parameters still have to be loaded. OpenAI's gpt-oss-20b, for example, has about 21 billion parameters in total but only around 3.6 billion active per token. For memory planning, count the total.
Pick a precision (quantisation)
Models are trained in 16-bit precision, but for local use you usually download a quantised version that stores each parameter in fewer bits. The rule of thumb is simple: memory for weights ≈ parameters × bits ÷ 8.
| Precision | Per billion parameters | 8B model | 32B model | 70B model |
|---|---|---|---|---|
| 16-bit (FP16/BF16) | ≈ 2 GB | ≈ 16 GB | ≈ 64 GB | ≈ 140 GB |
| 8-bit (Q8, FP8) | ≈ 1 GB | ≈ 8.5 GB | ≈ 34 GB | ≈ 75 GB |
| 4-bit (Q4, INT4) | ≈ 0.55–0.6 GB | ≈ 4.5–5 GB | ≈ 18–20 GB | ≈ 40–43 GB |
4-bit is the usual sweet spot for home use: quality loss is small for most chat and coding tasks, and memory needs drop by about three-quarters compared with 16-bit. Going below 4 bits saves more space but quality falls faster, especially on smaller models.
Add memory for context (the KV cache)
While it generates text, a model keeps a KV cache, a running memory of the conversation. It grows with every token in the context window, and with long documents it can rival the model itself.
The size depends on the model's architecture: 2 × layers × KV heads × head size × bytes per value, per token. Two worked examples at 16-bit:
- Llama 3.1 8B (32 layers, 8 KV heads, head size 128): about 128 KB per token. That is roughly 1 GB for 8K tokens, 4 GB for 32K and 16 GB for the full 128K window.
- Llama 3.1 70B (80 layers, 8 KV heads, head size 128): about 320 KB per token, so roughly 2.5 GB at 8K and 10 GB at 32K.
This is why a GPU maker can say that an 8B model with a 128K context needs a 32 GB card even though the 4-bit model itself is under 5 GB. If you don't need huge documents, cap the context in your app (Ollama, LM Studio and llama.cpp all let you set it) and you save a lot of memory. Many tools can also store the KV cache at 8-bit to halve it.
Leave headroom
Add 10–20% on top for the runtime, temporary buffers and, on a desktop, whatever the screen and other apps already use. A model that fits "exactly" on paper often fails to load in practice.
If you go over, tools such as llama.cpp can offload some layers to system RAM and the CPU. The model will still run, but every token waits for the slower memory; ASUS, for example, says inference can drop by up to 90% when that happens. Offloading is fine for trying a model, not for daily use.
Match the model to your GPU
Putting it together, with 4-bit models and a moderate context of around 8K tokens:
| VRAM | Comfortable model size | Typical use |
|---|---|---|
| 8 GB | 7–8B | chat, summaries, light coding help |
| 12 GB | up to ~14B | better reasoning, longer chats |
| 16 GB | up to ~20B, incl. gpt-oss-20b | strong all-round assistant |
| 24 GB | ~27–32B | near cloud quality for many tasks |
| 32 GB | ~32B with long context | big documents, agents, several small models |
| 48 GB+ (two cards or unified memory) | 70B | the largest common open models |
Some practical notes:
- Two GPUs can share one model in llama.cpp, vLLM and similar tools, so 2 × 16 GB can run what 32 GB runs, a little slower than a single card.
- Unified memory (Apple M-series Macs, AMD Ryzen AI Max) lets the GPU use a large share of system RAM. A 64 GB or 128 GB machine can load 70B models that no single consumer card can hold, though it generates tokens more slowly than a top GPU.
- Software support matters as much as gigabytes. Nvidia's CUDA works with almost everything; AMD and Intel cards now work in llama.cpp, Ollama and others, but check your favourite app first.
If you are buying hardware for this, our laptop for local AI guide covers notebooks and NPUs, and the graphics card buying guide explains power, size and other specs. New to running models yourself? Start with what open-weight AI models are. For a recent example of a card built around memory, see the ASUS UGen Arc Pro B70 with 32 GB.
Frequently asked questions
How much VRAM do I need for a 7B or 8B model?
At 4-bit, the weights take about 4.5 to 5 GB, so an 8 GB GPU runs it comfortably with a normal context. At 16-bit you need about 16 GB plus room for context.
Can I run a 70B model on a 24 GB GPU?
Not fully. A 4-bit 70B model needs about 40 GB for the weights alone. You can offload part of it to system RAM, but it will be much slower. Two 24 GB cards or a machine with 64 GB or more of unified memory are more practical.
Does system RAM count as VRAM?
Not on a PC with a separate graphics card. Tools can spill layers into RAM, but that is far slower. On Apple Silicon and other unified-memory designs, the GPU can use a large part of system memory directly.
Why does my model run out of memory with long documents?
The KV cache grows with every token of context. For Llama 3.1 8B it is about 128 KB per token at 16-bit, roughly 16 GB at 128K tokens. Lower the context length or use an 8-bit KV cache to save memory.
Is 16 GB of VRAM enough for local AI?
For most people, yes. It runs 4-bit models up to about 20 billion parameters with a reasonable context, which covers capable general assistants and coding models.
More from Computers & AI
View all →Read next

Record gamma-ray burst kept flaring for 27 days
Astronomers say GRB 220706A's central engine stayed active for about 27 days, flaring in X-rays far later than any burst before. What may power it and why it matters.

Samsung reportedly cuts Galaxy A output 20% on memory costs
ETNews says Samsung is cutting Galaxy A production by about 20%, roughly 10 million phones, to favour flagships as memory and chip costs squeeze margins.

Lidar vs cameras for self-driving cars: which is better?
Lidar vs cameras vs radar: how each self-driving sensor works, why Tesla uses cameras only while Waymo, Mercedes and the Rivian R2 add lidar, and what it means.