How much VRAM for a local LLM? Size table for 8B–70B models
How much VRAM for a local LLM? A size table for 8B–70B models at Q4, Q8 and 16-bit, a simple formula, and the commands that show whether a model will fit.
This article in other languages:العربيةDeutschEspañolFrançaisItaliano日本語Polski简体中文
In this article
How much VRAM for a local LLM? As much as the model file weighs, plus headroom for the context. An 8B model at 4-bit quantization takes about 5 GB, models in the 27–31B class take 17 to 20 GB, and a 70B is already at 43 GB.
This guide puts those numbers in one table, works out the size of any other model from a simple formula, and uses a few commands to check whether a model fits on your card. All sizes come from the Ollama library and the llama.cpp documentation (as of 26 November 2026).
What decides how much VRAM a local LLM needs?
Two things: the model’s weights and the context.
The weights are the file you download. The llama.cpp documentation notes that models are loaded into memory in full, so the disk and memory requirements are the same. That holds for MoE (mixture-of-experts) models too: only some of the parameters work on any one token, but all of them have to sit in memory.
The context is memory for the conversation, files and tool results. The longer the window you set, the more it needs, and with long windows it can be more than the weights themselves (more on that below).
The Ollama quickstart shows how thin that headroom can be in practice: for a model that is about a 7.2 GB download, it recommends 8 GB of free VRAM, or of unified memory on a Mac.
How big is the model? A table for 8B–70B
File sizes in GB from the Ollama library, at three quantization levels:
| Model | Q4_K_M | Q8_0 | 16-bit |
|---|---|---|---|
| Llama 3.1 8B | 4.9 | 8.5 | 16 |
| Qwen3.5 9B | 6.6 | 10 | 19 |
| Gemma 4 12B | 8.0 | 13 | 24 |
| Qwen3.5 27B | 17 | 30 | 56 |
| Gemma 4 31B | 20 | 34 | 63 |
| Llama 3.1 70B | 43 | 75 | 141 |
Hold that against the usual card sizes. An 8B model at Q4_K_M fits comfortably in 8 GB, while Gemma 4 12B, with its 8.0 GB file, fills the whole card and leaves nothing for the context. A 16 GB card takes that same 12B at Q8_0. With 24 GB you can run the 27B and 31B models at Q4_K_M and keep a few gigabytes spare. A 70B at Q4_K_M fits in none of these.
The table also shows that the number in the name is only a rough guide. Qwen3.5 9B at Q4_K_M is more than a third bigger than Llama 3.1 8B, even though the name promises just one billion more parameters. So before you download, look at the file size on the model page, not at the “9B”.
What do Q4_K_M, Q8_0 and F16 mean?
They are quantization levels: ways of storing the weights in fewer bits. The LM Studio documentation describes them as copies of the same model at different fidelity, and advises picking a 4-bit variant or higher if your hardware allows it.
How many bits each weight really gets is in a table from the llama.cpp documentation, calculated for Llama 3.1 8B:
| Quantization | Bits per weight | Size (GiB) |
|---|---|---|
| Q2_K | 3.16 | 2.95 |
| Q3_K_M | 4.00 | 3.74 |
| Q4_K_M | 4.89 | 4.58 |
| Q5_K_M | 5.70 | 5.33 |
| Q6_K | 6.56 | 6.14 |
| Q8_0 | 8.50 | 7.95 |
| F16 | 16.00 | 14.96 |
So the digit in the name isn’t the exact bit count: the “4-bit” Q4_K_M uses almost five. The second trap is units. The same Llama 3.1 8B file at Q4_K_M is 4.58 GiB in the llama.cpp table and 4.9 GB in Ollama, because a GiB is about 7% bigger than a GB.
The table gives a simple formula for any model:
size in GB ≈ parameters in billions × bits per weight / 8
For 8 billion parameters at 4.89 bits that comes to 4.9 GB, and for 70 billion to 42.8 GB, which matches what Ollama lists. Run the same sum for Inkling 2 Small with its 594 billion parameters and you get more than 360 GB, so it’s obvious straight away that this is a model for a server, not a desk.
Some methods go far below this table. On 24 November PrismML released Ternary Bonsai 2.5 27B, whose weights take 5.9 GB, roughly a third of Qwen3.5 27B at Q4_K_M (so far only the maker has measured the quality of that model).
How much memory does the context take?
Ollama picks the default window to match the card. According to its documentation, that is 4k tokens below 24 GiB of VRAM, 32k from 24 to 48 GiB, and 256k from 48 GiB up.
The same page recommends at least 64k tokens for agents, coding tools and web search. On a card under 24 GiB the default window is therefore sixteen times smaller than the recommended one, and a model that “fits” in the table may stop fitting once you raise the context. You set the window when starting the server:
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
A good sense of scale comes from Niels Rogge’s post on the Hugging Face blog from 25 November about Inkling 2 Mini, a model with a checkpoint of about 20 GB. On a card with 96 GB of VRAM, the vLLM server would not start with the default 1M-token window, because the context cache alone needed 52.6 GiB and only 48.1 GiB was free. Capping the window at 262,144 tokens fixed it.
In Ollama you can shrink the memory the context uses. The FAQ describes the OLLAMA_KV_CACHE_TYPE variable: q8_0 uses about half the memory of the default f16, and q4_0 about a quarter, at a cost in precision. It only works with Flash Attention turned on, and it applies to every model at once. Parallel requests count as well: a 2k-token context with four requests at a time is treated as 8k.
How to check how much VRAM your computer has
- NVIDIA card (Linux and Windows). Run
nvidia-smiin a terminal. Among other things it shows the card’s total and used memory (the “FB Memory Usage” section in the documentation).nvidia-smi -Llists the cards. - Mac with Apple Silicon. There is no separate VRAM here; models use unified memory, shared with the rest of the system (the Ollama quickstart counts it the same way as VRAM). Basic information about the machine is under Apple menu > About This Mac, and for memory details Apple’s help points to Activity Monitor.
- Older Mac with an Intel processor. Ollama runs on it on the CPU only, and LM Studio doesn’t support it at all.
How to check whether a model will fit
In LM Studio, before you even load the model. A command from the CLI documentation prints a memory estimate and exits, and it takes the context length you give it into account:
lms load --estimate-only <model_key> --context-length 64000
In the documentation’s example, the result for gpt-oss-120b is 65.68 GB of GPU memory. lms ls will give you the model key.
In Ollama you check after starting the model:
ollama ps
The PROCESSOR column shows where the model actually ended up: 100% GPU means all of it is in the card’s memory, 100% CPU that it is in system memory, and an entry like 48%/52% CPU/GPU that it was split. Next to it is the CONTEXT column with the allocated window.
What to do when the model doesn’t fit
- Lower quantization. Llama 3.1 70B in Ollama is 43 GB at Q4_K_M, 34 GB at Q3_K_M and 26 GB at Q2_K. LM Studio does advise staying with 4-bit variants or higher if your hardware allows it.
- A smaller model. Pick a row from the table above that fits with room for the context.
- A shorter context, or a quantized cache (
OLLAMA_KV_CACHE_TYPE=q8_0). - Splitting between the card and RAM. Ollama does this on its own, but according to the quickstart responses may be slower. In LM Studio you set the share of layers on the GPU by hand, e.g.
lms load <model_key> --gpu 0.5. - A second card. If the model doesn’t fit on any single GPU, Ollama spreads it across all the available ones. If it fits on one, it stays on one, because that is usually faster.
I covered installing Ollama and LM Studio step by step in the guide on how to run AI locally, and I wrote about the engine itself when llama.cpp 1.0 came out.
FAQ
How much VRAM does a 70B model need?
Llama 3.1 70B at Q4_K_M is 43 GB for the file alone, plus the context. At Q2_K the file is 26 GB.
Is 8 GB of VRAM enough for a local LLM?
For an 8B model at Q4_K_M (4.9 GB), yes. A 12B model at Q4_K_M is already 8.0 GB, so it fills the whole card before you add any context.
Can regular RAM replace VRAM?
Partly. When VRAM runs out, Ollama uses system memory, only the responses will be slower. You can see the split in the PROCESSOR column after running ollama ps.
How much memory does a Mac need for local models?
LM Studio recommends 16 GB or more and notes that Macs with 8 GB can handle smaller models and a shorter context. Bigger models have thresholds of their own; Inkling 2 Mini in Ollama, for example, requires a Mac with at least 32 GB.