What Can I Run AI?

How much VRAM does context length need?

Long chats, big codebases and long documents need memory for the KV cache, on top of the model weights. This page shows the cache size per token and at 8k, 32k and 128k tokens for 535 open models, total memory at Q4_K_M, and the cheapest current GPU and Mac or mini PC that fits popular models at 32k and 128k.

Formula
2 × layers × KV heads × head size × 2 bytes per token, FP16
Q8_0 cache
~53% of FP16
Q4_0 cache
~28% of FP16
Models modeled
535

Short answer: an 8B model adds about 4.8 GB for 32k tokens; a 70B dense model adds 10.7 GB. Models that cache only some layers (sliding-window or hybrid attention) stay far leaner. Quantizing the cache to Q8_0 roughly halves it.

KV cache for popular models

FP16 cache. Totals = Q4_K_M weights plus overhead (our formula), which already covers ~4k tokens, plus the extra cache. Estimates from each model's published config.json.

KV cache size and total memory by context length for popular models
ModelCache per tokenCache at 8kCache at 32kCache at 128kTotal Q4, 32kTotal Q4, 128k
Qwen3-8B8.2B params · 6.7 GB at Q4 with ~4k144 KiB1.2 GB4.8 GB19.3 GB10.9 GB25.4 GB
Llama-3.1-8B-Instruct8.0B params · 6.6 GB at Q4 with ~4k128 KiB1.1 GB4.3 GB17.2 GB10.4 GB23.2 GB
Qwen3-14B14.8B params · 11.3 GB at Q4 with ~4k160 KiB1.3 GB5.4 GB21.5 GB16.0 GB32.1 GB
gpt-oss-20b20.9B params · 15.6 GB at Q4 with ~4k24 KiB+ sliding window0.2 GB0.8 GB3.2 GB16.3 GB18.7 GB
Mistral-Small-3.2-24B-Instruct-250624.0B params · 17.7 GB at Q4 with ~4k160 KiB1.3 GB5.4 GB21.5 GB22.4 GB38.5 GB
Qwen3-30B-A3B30.5B params · 22.3 GB at Q4 with ~4k96 KiB0.8 GB3.2 GB12.9 GB25.1 GB34.8 GB
Qwen3.8-27B27.8B params · 20.4 GB at Q4 with ~4k64 KiB0.5 GB2.1 GB8.6 GB22.2 GB28.7 GB
Qwen3-32B32.8B params · 23.8 GB at Q4 with ~4k256 KiB2.1 GB8.6 GB34.4 GB31.4 GB57.1 GB
Nanbeige4.3-33B33.1B params · 24.1 GB at Q4 with ~4k208 KiB1.7 GB7.0 GB27.9 GB30.2 GB51.1 GB
Llama-3.3-70B-Instruct70.6B params · 50.2 GB at Q4 with ~4k320 KiB2.7 GB10.7 GB42.9 GB59.6 GB91.8 GB
gpt-oss-120b116.8B params · 82.5 GB at Q4 with ~4k36 KiB+ sliding window0.3 GB1.2 GB4.8 GB83.5 GB87.1 GB

Cheapest hardware for 32k context

The cheapest current device (at its dated price) that fits each model at Q4_K_M with 32k tokens and an FP16 cache, with headroom to spare. A Q8 cache can drop you a tier.

Cheapest GPU and Mac or mini PC for each model at 32k context
ModelCheapest GPUCheapest Mac / mini PC
Qwen3-8Bneeds ~10.9 GB at Q4, 32kRadeon RX 7600 XT$329 · 16 GB usableMac mini M6 24GB$1,299 · 18 GB usable
Llama-3.1-8B-Instructneeds ~10.4 GB at Q4, 32kIntel Arc B580$249 · 12 GB usableMac mini M6 16GB$899 · 12 GB usable
Qwen3-14Bneeds ~16.0 GB at Q4, 32kRadeon RX 7900 XT$899 · 20 GB usableMac mini M6 24GB$1,299 · 18 GB usable
gpt-oss-20bneeds ~16.3 GB at Q4, 32kRadeon RX 7900 XT$899 · 20 GB usableMac mini M6 32GB$1,799 · 24 GB usable
Mistral-Small-3.2-24B-Instruct-2506needs ~22.4 GB at Q4, 32kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3-30B-A3Bneeds ~25.1 GB at Q4, 32kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3.8-27Bneeds ~22.2 GB at Q4, 32kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3-32Bneeds ~31.4 GB at Q4, 32kNVIDIA RTX 6000 Ada 48GB$6,799 · 48 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Nanbeige4.3-33Bneeds ~30.2 GB at Q4, 32kNVIDIA RTX 6000 Ada 48GB$6,799 · 48 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Llama-3.3-70B-Instructneeds ~59.6 GB at Q4, 32kNVIDIA RTX Pro 6000 Blackwell 96GB$8,565 · 96 GB usableFramework Desktop (Ryzen AI Max+ 395) 128GB$3,449 · 96 GB usable
gpt-oss-120bneeds ~83.5 GB at Q4, 32kNVIDIA RTX Pro 6000 Blackwell 96GB$8,565 · 96 GB usableFramework Desktop (Ryzen AI Max+ 395) 128GB$3,449 · 96 GB usable

Cheapest hardware for 128k context

The cheapest current device (at its dated price) that fits each model at Q4_K_M with 128k tokens and an FP16 cache, with headroom to spare. A Q8 cache can drop you a tier.

Cheapest GPU and Mac or mini PC for each model at 128k context
ModelCheapest GPUCheapest Mac / mini PC
Qwen3-8Bneeds ~25.4 GB at Q4, 128kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Llama-3.1-8B-Instructneeds ~23.2 GB at Q4, 128kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3-14Bneeds ~32.1 GB at Q4, 128kNVIDIA RTX 6000 Ada 48GB$6,799 · 48 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
gpt-oss-20bneeds ~18.7 GB at Q4, 128kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M6 32GB$1,799 · 24 GB usable
Mistral-Small-3.2-24B-Instruct-2506needs ~38.5 GB at Q4, 128kNVIDIA RTX 6000 Ada 48GB$6,799 · 48 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3-30B-A3Bneeds ~34.8 GB at Q4, 128kNVIDIA RTX 6000 Ada 48GB$6,799 · 48 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3.8-27Bneeds ~28.7 GB at Q4, 128kIntel Arc Pro B70 32GB$949 · 32 GB usableMac mini M5 Pro 64GB$3,199 · 48 GB usable
Qwen3-32Bneeds ~57.1 GB at Q4, 128kNVIDIA RTX Pro 6000 Blackwell 96GB$8,565 · 96 GB usableFramework Desktop (Ryzen AI Max+ 395) 128GB$3,449 · 96 GB usable
Nanbeige4.3-33Bneeds ~51.1 GB at Q4, 128kNVIDIA RTX Pro 6000 Blackwell 96GB$8,565 · 96 GB usableFramework Desktop (Ryzen AI Max+ 395) 128GB$3,449 · 96 GB usable
Llama-3.3-70B-Instructneeds ~91.8 GB at Q4, 128kno single GPU we track; see multi-GPUMac Studio M5 Ultra 256GB$9,499 · 192 GB usable
gpt-oss-120bneeds ~87.1 GB at Q4, 128kno single GPU we track; see multi-GPUMac Studio M5 Ultra 256GB$9,499 · 192 GB usable

Every model, leanest cache first

All 535 models with a modeled cache, sorted by cache size at 128k. Sliding-window layers count only their window; linear/Mamba layers count as fixed state.

KV cache size for every modeled model at 32k and 128k context
ModelPer token (FP16)32k (FP16)128k (FP16)128k (Q8 cache)
NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF1631.6B params · 6 of 52 layers keep a growing cache6 KiB0.2 GB0.8 GB0.4 GB
Qwen2.5-0.5B-Instruct0.5B params · all 24 layers cache12 KiB0.4 GB1.6 GB0.9 GB
Qwen3.5-0.8B0.9B params · 6 of 24 layers keep a growing cache12 KiB0.4 GB1.6 GB0.9 GB
LFM3-1.7B1.7B params · 6 of 24 layers keep a growing cache12 KiB0.4 GB1.6 GB0.9 GB
Muse-Glimmer-30B29.8B params · 13 of 52 layers keep a growing cache13 KiB0.5 GB1.8 GB1.0 GB
Mellum2.1-12B-A2.5B-Thinking12.1B params · 7 of 28 layers keep a growing cache14 KiB0.5 GB1.9 GB1.0 GB
LFM2.5-24B-A2B24.0B params · 10 of 40 layers keep a growing cache20 KiB0.7 GB2.7 GB1.4 GB
Ornith-1.5-35B-A3B36.0B params · 10 of 40 layers keep a growing cache20 KiB0.7 GB2.7 GB1.4 GB
Sage-A1.536.0B params · 10 of 40 layers keep a growing cache20 KiB0.7 GB2.7 GB1.4 GB
Qwen3.6-35B-A3B36.0B params · 10 of 40 layers keep a growing cache20 KiB0.7 GB2.7 GB1.4 GB
Qwen3.5-35B-A3B36.0B params · 10 of 40 layers keep a growing cache20 KiB0.7 GB2.7 GB1.4 GB
Kolibri-178.1B params · 10 of 50 layers keep a growing cache20 KiB0.7 GB2.7 GB1.4 GB
Ornith-1.5-122B125.1B params · 12 of 48 layers keep a growing cache24 KiB0.8 GB3.2 GB1.7 GB
gpt-oss-20b20.9B params · 12 of 24 layers keep a growing cache24 KiB0.8 GB3.2 GB1.7 GB
Qwen2.5-1.5B-Instruct1.5B params · all 28 layers cache28 KiB0.9 GB3.8 GB2.0 GB
Recursive Flint39.8B params · 14 of 49 layers keep a growing cache28 KiB1.0 GB3.8 GB2.0 GB
Llama-3.2-1B-Instruct1.2B params · all 16 layers cache32 KiB1.1 GB4.3 GB2.3 GB
Ornith-1.5-9B9.7B params · 8 of 32 layers keep a growing cache32 KiB1.1 GB4.3 GB2.3 GB
Qwen3.5-9B9.7B params · 8 of 32 layers keep a growing cache32 KiB1.1 GB4.3 GB2.3 GB
Qwen3.5-4B4.7B params · 8 of 32 layers keep a growing cache32 KiB1.1 GB4.3 GB2.3 GB
gpt-oss-120b116.8B params · 18 of 36 layers keep a growing cache36 KiB1.2 GB4.8 GB2.6 GB
Spark-X2.6-4B4.1B params · 9 of 36 layers keep a growing cache36 KiB1.3 GB4.9 GB2.6 GB
Beam-1.0-501B-A23B501.3B params · 9 of 52 layers keep a growing cache36 KiB1.3 GB4.9 GB2.6 GB
MiniCPM5-2B2.5B params · all 42 layers cache42 KiB1.4 GB5.6 GB3.0 GB
Qwen2.5-Coder-7B-Instruct7.6B params · all 28 layers cache56 KiB1.9 GB7.5 GB4.0 GB
DeepSeek-R1-Distill-Qwen-7B7.6B params · all 28 layers cache56 KiB1.9 GB7.5 GB4.0 GB
Qwen2.5-7B-Instruct7.6B params · all 28 layers cache56 KiB1.9 GB7.5 GB4.0 GB
Qwen2.5-VL-7B-Instruct8.3B params · all 28 layers cache56 KiB1.9 GB7.5 GB4.0 GB
Qwen3.8-27B27.8B params · 16 of 64 layers keep a growing cache64 KiB2.1 GB8.6 GB4.6 GB
Tess-4.5-27B27.8B params · 16 of 64 layers keep a growing cache64 KiB2.1 GB8.6 GB4.6 GB
Qwen3.6-27B27.8B params · 16 of 64 layers keep a growing cache64 KiB2.1 GB8.6 GB4.6 GB
Qwen3-30B-A3B30.5B params · all 48 layers cache96 KiB3.2 GB12.9 GB6.8 GB
Qwen3-Coder-30B-A3B-Instruct30.5B params · all 48 layers cache96 KiB3.2 GB12.9 GB6.8 GB
Hy-Memory-30B-A3B30.1B params · all 48 layers cache96 KiB3.2 GB12.9 GB6.8 GB
Qwen3-0.6B0.8B params · all 28 layers cache112 KiB3.8 GB15.0 GB8.0 GB
Qwen3-1.7B2.0B params · all 28 layers cache112 KiB3.8 GB15.0 GB8.0 GB
Llama-3.2-3B-Instruct3.2B params · all 28 layers cache112 KiB3.8 GB15.0 GB8.0 GB
Llama-3.1-8B-Instruct8.0B params · all 32 layers cache128 KiB4.3 GB17.2 GB9.1 GB
Mistral-7B-Instruct-v0.37.2B params · all 32 layers cache128 KiB4.3 GB17.2 GB9.1 GB
Phi-4-mini-instruct3.8B params · all 32 layers cache128 KiB4.3 GB17.2 GB9.1 GB
Qwen3-4B4.0B params · all 36 layers cache144 KiB4.8 GB19.3 GB10.2 GB
Qwen3-8B8.2B params · all 36 layers cache144 KiB4.8 GB19.3 GB10.2 GB
Qwen3-VL-8B-Instruct8.8B params · all 36 layers cache144 KiB4.8 GB19.3 GB10.2 GB
Qwen3-4B-Instruct-25074.0B params · all 36 layers cache144 KiB4.8 GB19.3 GB10.2 GB
Qwen3-14B14.8B params · all 40 layers cache160 KiB5.4 GB21.5 GB11.4 GB
Mistral-Nemo-Instruct-240712.2B params · all 40 layers cache160 KiB5.4 GB21.5 GB11.4 GB
Mistral-Small-3.2-24B-Instruct-250624.0B params · all 40 layers cache160 KiB5.4 GB21.5 GB11.4 GB
granite-3.3-8b-instruct8.2B params · all 40 layers cache160 KiB5.4 GB21.5 GB11.4 GB
Qwen2.5-Coder-14B-Instruct14.8B params · all 48 layers cache192 KiB6.4 GB25.8 GB13.7 GB
DeepSeek-R1-Distill-Qwen-14B14.8B params · all 48 layers cache192 KiB6.4 GB25.8 GB13.7 GB
phi-414.7B params · all 40 layers cache200 KiB6.7 GB26.8 GB14.2 GB
Nanbeige4.3-33B33.1B params · all 52 layers cache208 KiB7.0 GB27.9 GB14.8 GB
Qwen3-32B32.8B params · all 64 layers cache256 KiB8.6 GB34.4 GB18.2 GB
Qwen2.5-Coder-32B-Instruct32.8B params · all 64 layers cache256 KiB8.6 GB34.4 GB18.2 GB
DeepSeek-R1-Distill-Qwen-32B32.8B params · all 64 layers cache256 KiB8.6 GB34.4 GB18.2 GB
Inkling952.4B params · all 66 layers cache264 KiB8.9 GB35.4 GB18.8 GB
Qwen2.5-72B-Instruct72.7B params · all 80 layers cache320 KiB10.7 GB42.9 GB22.8 GB
Llama-3.3-70B-Instruct70.6B params · all 80 layers cache320 KiB10.7 GB42.9 GB22.8 GB
DeepSeek-R1-Distill-Llama-70B70.6B params · all 80 layers cache320 KiB10.7 GB42.9 GB22.8 GB
OLMo-2-1124-13B-Instruct13.7B params · all 40 layers cache800 KiB26.8 GB107.4 GB56.9 GB

Showing the 60 most popular of 535 models with a modeled cache. See all 535 in the model directory →

Try any memory size, context and cache type in the VRAM calculator. Each model page has its own "Memory by context length" table.

Quick answers

How much VRAM does context length use?
Every token in the context window stores a key and a value per attention layer (the KV cache). For Qwen3-8B that's about 144 KiB per token at FP16, so 32k tokens add ~4.8 GB and 128k add ~19.3 GB on top of the weights. Llama-3.3-70B-Instruct needs ~42.9 GB of cache at 128k.
How much VRAM do I need for 32k context?
It depends on the model. Qwen3-32B needs about 31.4 GB at Q4_K_M with an FP16 cache at 32k (vs 23.8 GB at ~4k); Qwen3.8-27B, which caches only 16 of 64 layers, needs 22.2 GB. See the table above for more models.
Does a quantized KV cache help?
Yes. llama.cpp and Ollama can store the cache at Q8_0 (about 53% of FP16) or Q4_0 (about 28%). A Q8 cache roughly halves the cache part with little quality loss; Q4 cache saves more but can hurt long-context accuracy. The weights' quantization (Q4_K_M etc.) is separate.
Which models use the least memory at long context?
Models with sliding-window or linear-attention layers only keep a growing cache on some layers. Of the 535 models we model, NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 needs the least cache at 128k (~0.8 GB) and OLMo-2-1124-13B-Instruct the most (~107.4 GB). gpt-oss-20b uses a 128-token sliding window on half its layers, so its 128k cache is just ~3.2 GB.
Is a model's maximum context the same as what I can run?
No. The model card states the longest context it was trained for; whether you can use it depends on memory. We don't track each model's maximum, so check the model card before relying on long contexts.
Why are some models missing?
120 models we track use attention layouts our formula doesn't model yet (for example multi-head latent attention, or Gemma 4's separate global layers), or their config is gated. Their pages say "cache not modeled".

How much VRAM do you need? · Q4 vs Q8 vs FP16 · Tokens per second · Best GPU for local LLMs · VRAM calculator

New models, and what they need to run

One short email a week: fresh open models with their VRAM numbers, plus hardware worth watching.