LLM VRAM calculator: how much GPU memory a model needs, with a table by model size
Work out the VRAM an LLM needs in two steps: weights from parameters and quantization, plus context cache. Table for 8B to 405B models and matching hardware.
By Agent Team Plan editorial team · Published 2026-11-25 · Updated 2026-11-25
Research-based buying guidance. We have not hands-on tested the machines mentioned. Product links may earn us a commission where marked.
The short answer
An LLM VRAM calculator only needs two numbers: the model's weights and its context cache. The weights are the parameter count times the bits per weight of your quantization. At the popular 4-bit setting, that is about 0.6GB per billion parameters, so a 70-billion-parameter model needs about 43GB for weights alone. Add the context cache and 10–20% for the runtime, and you have your answer.
The table below does that arithmetic for common model sizes. After it, we show how to calculate it yourself and which kind of machine each size needs.
The formula
The basic rule is simple: memory equals the number of parameters times the bytes per parameter (Mistral AI). For a quantized model, use the measured bits per weight of the format. The llama.cpp project lists these on Llama-3.1-8B (llama.cpp quantize README):
| Format | Bits per weight | GB per billion parameters |
|---|---|---|
| FP16 / BF16 (unquantized) | 16 | 2.0 |
| Q8_0 | 8.5 | 1.06 |
| Q6_K | 6.56 | 0.82 |
| Q5_K_M | 5.70 | 0.71 |
| Q4_K_M | 4.89 | 0.61 |
So the full calculation is:
Total memory ≈ (parameters × bits per weight ÷ 8) + context cache + 10–20% runtime overhead
The weights are fixed once you choose the model and format. The context cache is the part people forget, and it is the part that grows with use.
How much VRAM each model size needs
Weights only, in GB, from the bits-per-weight values above. Add the context cache and overhead from the next section.
| Model size | FP16 | Q8_0 | Q4_K_M | Smallest common hardware for Q4_K_M |
|---|---|---|---|---|
| 8B | 16 | 8.5 | 4.9 | Any 8GB GPU |
| 14B | 28 | 15 | 8.6 | 12–16GB GPU |
| 32B | 64 | 34 | 20 | 24GB GPU |
| 70B | 140 | 74 | 43 | 48GB+ GPU or 64GB unified memory |
| 120B | 240 | 128 | 74 | 96GB GPU or 128GB unified memory |
| 235B | 470 | 250 | 144 | 256GB unified memory |
| 405B | 810 | 430 | 248 | 512GB unified memory or a GB300 workstation |
Mixture-of-experts models are listed by total parameters here, because every expert has to be in memory even if only some are active per token. They run faster than a dense model of the same size, but they need the same memory.
Editorial view: Q4_K_M is the sensible default for local use. Q8_0 roughly doubles the memory for a quality gain most business tasks will not notice. Go below 4 bits only when it is the difference between a model fitting or not.
Do not forget the context cache
Every token in the conversation keeps a key-value (KV) cache in memory. Its size depends on the model's architecture, the context length and how many requests run at once: cache per token × context tokens × number of parallel requests (Sebastian Raschka's memory calculator).
A worked example from that calculator: Qwen3 8B uses about 144 KiB of cache per token. At a 32,768-token context, that is about 4.5 GiB of cache, nearly as much as the 4-bit weights of the same model.
This matters for agent teams. If three agents call the same local model in parallel, each with a long context, the cache multiplies by three. A model that "fits" in a single chat can run out of memory once several agents use it at the same time. Leave at least 20–30% of memory free beyond the weights if you plan to serve more than one user.
GPU VRAM or unified memory?
There are two ways to get the memory a model needs.
A dedicated GPU keeps the model in its own VRAM. It is the fastest option, but the capacity is fixed: 24GB on an RTX 5090 Laptop GPU, 32GB on a desktop RTX 5090, 96GB on an RTX PRO 6000 Blackwell. If the model does not fit, part of it falls back to system RAM and speed drops sharply. The same cards are gaming GPUs; our GTA 6 PC requirements guide looks at which RTX 5090 desktops and laptops suit both jobs.
Unified or shared memory lets the CPU and GPU use one large pool. Apple Silicon Macs such as the Mac Studio, NVIDIA GB10 machines such as the DGX Spark and AMD Ryzen AI Max+ systems such as the Framework Desktop offer 128GB or more. Large models fit, but memory bandwidth is lower than on a high-end GPU, so text is generated more slowly.
A practical rule for unified memory: plan for about 75% of the total for model weights. The operating system, your other applications and the context cache need the rest.
Which machine for which model
- Up to 14B at 4-bit: almost any recent laptop or desktop with a 12–16GB GPU, or a 32GB unified-memory machine.
- 32B at 4-bit: a 24GB GPU, or 48–64GB of unified memory if you want long contexts.
- 70B at 4-bit: 64GB of unified memory as a minimum, 128GB for comfortable contexts and parallel agents, or a 96GB workstation GPU for speed.
- 120B at 4-bit: a 128GB unified-memory machine or a 96GB GPU. This is where GB10 systems and Ryzen AI Max+ machines earn their place.
- 235B and larger: 256GB to 512GB of unified memory, or a GB300 DGX Station for the largest open models.
You can filter machines by memory in our AI hardware directory and put two configurations side by side with the comparison tool. For the background on RAM, VRAM and unified memory, see our local LLM hardware requirements guide.
Bottom line
To size memory for a local LLM: multiply billions of parameters by about 0.6GB for 4-bit or 1.06GB for 8-bit, add the context cache for your longest conversations and number of parallel users, then add 10–20% for the runtime. If the total is close to what a machine offers, pick the next size up, because the cache will grow before the model does.
Frequently asked questions
How much VRAM do I need to run a 70B model?
About 43GB for the weights at 4-bit (Q4_K_M), 74GB at 8-bit and 140GB unquantized, plus the context cache and 10–20% overhead. In practice that means a 48GB+ GPU or a machine with at least 64GB of unified memory, and 128GB for long contexts.
How do I calculate how much memory an LLM needs?
Multiply the parameter count by the bits per weight of your quantization and divide by 8 to get the weights in bytes. Add the KV cache (cache per token × context length × parallel requests) and about 10–20% for the runtime.
Does quantization reduce VRAM requirements?
Yes. Q4_K_M uses about 4.9 bits per weight instead of 16, so the weights need roughly 30% of the unquantized memory. It does not shrink the context cache, which is set by the model architecture and context length.
Is unified memory as good as GPU VRAM for LLMs?
It fits larger models for the money, because 128GB or more is shared by the CPU and GPU. It is usually slower than a high-end GPU’s VRAM, so models generate text more slowly. Plan for about 75% of unified memory for model weights.
Sources and verification
- llama.cpp quantize README ↗ · Provider documentation · checked 2026-11-25
Bits per weight measured on Llama-3.1-8B: Q4_K_M 4.89, Q5_K_M 5.70, Q6_K 6.56, Q8_0 8.50.
- Mistral AI: concept deep dive on quantization ↗ · Provider documentation · checked 2026-11-25
Gives the basic formula: required bytes = number of parameters × bytes per parameter, with worked examples.
- Sebastian Raschka: LLM memory calculator ↗ · External measurement · checked 2026-11-25
Gives the KV-cache formula (cache bytes per token × context tokens × batch size) and the example of Qwen3 8B: 144 KiB per token, 4.5 GiB at 32,768 tokens.
Where to buy the machines in this article
Affiliate links: we may earn a commission at no extra cost to you. It never changes which machines we cover or how we compare them. As an Amazon Associate we earn from qualifying purchases.
- NVIDIA DGX Spark (NVIDIA GB10 · 128GB / 4TB SSD) · Check price at Amazon US ↗
- ASUS Ascent GX10 (NVIDIA GB10 · 128GB) · Check price at Amazon US ↗
