Skip to content

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.

CalculatorCan my GPU run this model?Ollama default quantization
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)

Ollama library · Qwen/Qwen3-8B

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.json on 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 set OLLAMA_KV_CACHE_TYPE to q8_0 (about half) or q4_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_LENGTH or /set parameter num_ctx 8192 for 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 ps shows something like 48%/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.

Discussion

Sign in with GitHub to comment. When asking for help, include your OS and the exact error message.

Updated:

gaodong.aiAboutPrivacyTermsContact

Created and maintained by Haorui Li, co-author of the KiT candlestick foundation model.

Independent tutorials, not affiliated with any product mentioned. Product names and trademarks belong to their owners. Check official pages for prices and policies.