With local AI, one number matters most for what runs on your PC: the memory on your graphics card, VRAM. An AI model consists of billions of numbers, the parameters. For it to compute quickly, those numbers have to live in VRAM. If the model does not fit, the program moves part of it into normal RAM — and then it often gets several times slower. This guide explains how to estimate the need, what Q4, Q8, and fp8 mean, why long chats need more memory, and which card size is enough for which use case. Reading time: about 6 minutes.
In short: More VRAM is almost always more important for local AI than more compute power. The calculator shows you what runs on your card for each model.
What is stored in VRAM
While a model is working, several things share the VRAM:
- The model weights — the biggest chunk. Their size depends on the number of parameters and the precision (see below).
- The context for language models: Everything already in the chat is kept by the model in a cache, the KV cache. The longer the chat, the bigger it gets.
- Intermediate results while computing, and for images and videos depending on the resolution and the length of the video.
- Windows itself: Desktop, browser, and other programs also use some graphics memory. The calculator here subtracts 0.6 GB flat for that.
The rule of thumb for language models
Memory needed ≈ parameters (in billions) × bytes per parameter + about 10% + context
A model with 8 billion parameters needs a good 16 GB just for the weights at full precision (2 bytes per parameter). With 4-bit quantization, it’s only about 5 GB. That’s exactly how our calculator works too: weights plus 10% for the program plus about 1 GB for a context of 8,000 tokens.
Quantization: computing smaller
Quantization stores each number with less precision. The model gets smaller and a bit less accurate. With good methods, you only notice the difference once you shrink it a lot. More on this in the glossary under Quantization.
| Name | Bytes per parameter | Quality |
|---|---|---|
| FP16, BF16 | 2 | full quality |
| FP8, Q8_0 | about 1 | barely any difference |
| Q6_K | about 0.82 | very good |
| Q5_K_M | about 0.71 | good |
| Q4_K_M | about 0.61 | good, the most popular compromise |
The values for the Q variants come from the llama.cpp documentation, which Ollama and LM Studio are based on. For text models, the variants are usually called Q4_K_M or Q8_0 (file format GGUF). For image models in ComfyUI, you’ll more often see fp8, bf16, or GGUF as well.
Examples for language models
This is how much VRAM a model needs according to the rule of thumb, with a context of 8,000 tokens (estimated, rounded):
| Model | Q4_K_M | Q8_0 | FP16 |
|---|---|---|---|
| Qwen3 8B | 6.5 GB | 10.6 GB | 19.0 GB |
| Qwen3 14B | 10.4 GB | 17.3 GB | 31.8 GB |
| Gemma 3 27B | 19.1 GB | 32.5 GB | 60.4 GB |
| Qwen3 32B | 22.5 GB | 38.3 GB | 71.4 GB |
That leads to the well-known rule of thumb: With 8 GB, an 8B model runs in Q4; with 12 GB, a 14B model; and for 27B to 32B, you need 24 GB.
Long chats need more memory: the context
Every word already in the chat, or every document you load in, takes up space in the KV cache. How much depends on the model architecture. Two examples, calculated with the models’ actual architecture data (16 bits per value):
| Model | 8,000 tokens | 32,000 tokens |
|---|---|---|
| Qwen3 8B | about 1.1 GB | about 4.5 GB |
| Qwen3 32B | about 2.0 GB | about 8.0 GB |
An 8B model that fits easily into 8 GB with a short chat can suddenly become too large when you load a long document. That’s why programs usually set the context fairly small by default — Ollama, for example, uses 4,000 tokens as long as the card has less than 24 GB. For long documents, you have to raise it yourself (in the Ollama app with the slider in settings). The context calculator shows you how much a specific model needs at a given length. More on the term under context length.
Image and video models
With image and video models, there is no simple formula, because besides the main model a text encoder and a VAE are loaded too, and resolution also matters. That’s why we list the manufacturers’ data or our own estimates here:
| Model | Variant | Requirement according to our data |
|---|---|---|
| Stable Diffusion XL | Standard | 8 GB card (official) |
| [FLUX.2 [klein] 4B](/modelle/flux2-klein-4b/) | fp8 | about 8.4 GB (official) |
| Wan 2.2 TI2V 5B (Video) | ComfyUI | 8 GB card (official) |
| Z-Image Turbo | bf16 | 16 GB card (official) |
| Qwen-Image | fp8 | about 21.5 GB (estimated) |
| [FLUX.2 [dev]](/modelle/flux2-dev/) | fp8 | 24 GB card (official) |
ComfyUI is much better at offloading than text programs: It loads the text encoder and main model one after the other and moves parts that are not needed into RAM. That’s why many models also run on cards a bit below the stated requirement — just slower. In the calculator, that shows up as “tight.”
What happens if it does not fit?
- Language models (Ollama, LM Studio): Part of the layers then runs on the processor (offloading). Even a few offloaded layers can reduce answer speed a lot, because RAM is connected much more slowly than VRAM. In Ollama,
ollama psshows in the PROCESSOR column how the model is split across GPU and CPU. - MoE models are the exception: With Mixture of Experts models like Qwen3 30B-A3B, only a few billion parameters compute per word (here 3 out of 30). All weights still have to live somewhere, but offloading them into RAM costs much less speed than with a normal model of the same size.
- Image and video models: ComfyUI offloads on its own. If that is not enough, you’ll get the message CUDA out of memory — then you need a smaller variant (fp8 or GGUF), a smaller resolution, or a shorter video.
How to see how full your VRAM is
- Task Manager (Ctrl + Shift + Esc) → Performance → GPU: “Dedicated GPU memory” is the VRAM. “Shared GPU memory” is RAM that Windows provides as a fallback — once that fills up, things get slow.
- NVIDIA: In Command Prompt,
nvidia-smishows the used memory and which programs are using it. - Ollama:
ollama psshows loaded models and whether they are fully on the GPU.
Which card size for what?
| VRAM | What runs well |
|---|---|
| 8 GB | Language models up to about 8B in Q4, SDXL, FLUX.2 [klein] 4B in fp8 (tight), small video models like Wan 2.2 5B |
| 12 GB | Language models up to about 14B in Q4, most current image models in fp8 or GGUF |
| 16 GB | 14B models with long context, Z-Image Turbo at full precision, many video workflows |
| 24 GB | Language models from 27B to 32B in Q4, FLUX.2 [dev] and Qwen-Image in fp8, larger video models |
| 32 GB | the same, with more breathing room: longer context, higher resolution, fewer compromises |
| 96–128 GB shared memory | very large language models (70B and MoE models over 100B) — slower per word, but they fit at all |
The last row refers to systems with shared memory for processor and graphics, such as those with AMD Ryzen AI Max+ 395 or NVIDIA DGX Spark. They have a lot of memory, but less memory bandwidth than a big graphics card. More on this under AI systems.
What this means for buying
For local AI, a card with more memory is almost always the better choice than a faster one with less. An RTX 4060 Ti with 16 GB can handle larger models than an RTX 4070 with 12 GB, even though the 4070 is faster in games. Only when both cards have the same amount of memory does compute power decide the speed.
More help:
- The calculator shows which models fit your card, are tight, or are too large.
- The graphics card overview also sorts cards by VRAM per euro, and in the comparison you can see two cards side by side.
- The buying guide asks about your use case and suggests suitable cards.
Sources
- llama.cpp: Quantization levels and sizes (README to quantize)
- Hugging Face: Qwen3-8B config.json (architecture data for context)
- Hugging Face: Qwen3-32B config.json
- Ollama documentation: FAQ (ollama ps, PROCESSOR column)
- Ollama documentation: context length (default values depending on VRAM)
- Memory figures for the image and video models: see the sources on the respective model pages
As of: Oct 26, 2026