GPU VRAM calculator: can my GPU run this model?
Running a model locally with Ollama starts with one question: is there enough VRAM? Pick a model, a context length and your GPU memory.
- Model weights
- 5.20 GB
- KV cache
- 0.56 GB
- Headroom
- 1.00 GB
- Total
- 6.76 GB
Fits in GPU memory
Longest context that fits:32K tokens
Models that fit fully at this context(16 GB,4K)
How it is calculated
VRAM ≈ model weights + KV cache + headroom
- Weights: the download size listed in the Ollama library, i.e. the model file of Ollama's default quantization. For Gemma 4 tags Ollama lists a range; the larger number is used.
- KV cache: memory for the context, computed layer by layer from each model's official
config.jsonon Hugging Face. Full-attention layers grow with context; sliding-window layers (Gemma 4, gpt-oss) keep only the window; Qwen3.8's linear-attention layers keep a fixed-size state; Gemma 4 E2B/E4B reuse KV from earlier layers in their last layers. - KV cache type: Ollama defaults to
f16. Its FAQ says that with Flash Attention you can setOLLAMA_KV_CACHE_TYPEtoq8_0(about half) orq4_0(about a quarter). - Headroom: drivers, the runtime and your display also use some VRAM. This is our assumption, 1 GB by default; adjust it.
These are estimates; ollama ps shows the real usage.
Good to know
- Ollama's default context is 4096 tokens (official FAQ), so the calculator starts at 4K. Use
OLLAMA_CONTEXT_LENGTHor/set parameter num_ctx 8192for more. Longer context means a bigger KV cache. - Models that do not fit still run. Ollama loads part of the model into system memory and runs it on the CPU;
ollama psshows something like48%/52% CPU/GPU. It works, but slower. - MoE models (Qwen3 30B-A3B, Gemma 4 26B-A4B, gpt-oss) activate only part of their parameters per token, but all weights still have to sit in VRAM or RAM.
FAQ
What can I run on 8 GB of VRAM?
Set VRAM to 8 and context to 4K; the list under the calculator shows every model that fits entirely on the GPU. Quantized 7B/8B models of about 5 GB (such as qwen3:8b, llama3.1:8b, deepseek-r1:8b) are the usual choice for 8 GB cards; check the result for your setup.
Why is the model file much smaller than parameters × 2 bytes?
Ollama downloads quantized models that store each parameter in fewer bits. For example, qwen3:8b is a 5.2 GB download.
Does it work for Macs?
Macs share unified memory between CPU and GPU. Enter the amount of memory you can spare for the model as "GPU memory"; leave room for the system and other apps.
Where does the data come from?
Model sizes come from the Ollama library tag pages and architectures from each model's official config.json on Hugging Face, fetched on November 25, 2026.