CheckerWhat fits my GPU?ModelsWhat to buyEmbeddingsData & methodSubmitAPISponsor

Short answers

How much VRAM does context length use?

The KV cache grows linearly with context. For Llama 3.1 8B Instruct each token costs about 0.131 MB at f16, so 32k context adds about 4.3 GB and 128k about 17.2 GB (est.). A q8_0 KV cache halves it; q4_0 cuts it to about a quarter.

Checked 2026-10-22 · memory figures are estimates

KV cache for Llama 3.1 8B Instruct (est.)

Contextf16q8_0q4_0
4k0.54 GB0.29 GB0.15 GB
8k1.07 GB0.57 GB0.30 GB
32k4.29 GB2.28 GB1.21 GB
64k8.59 GB4.56 GB2.42 GB
128k17.18 GB9.13 GB4.83 GB

How we got this number

KV cache = 2 (keys and values) × layers × KV heads × head dimension × context × bytes per element. Llama 3.1 8B Instruct has 32 layers, 8 KV heads and head dimension 128 (config.json), so f16 at 32k is 2 × 32 × 8 × 128 × 32768 × 2 bytes ≈ 4.3 GB. Models with sliding-window or MLA attention need less; the checker handles those.

Llama 3.1 8B Instruct page · Try a context length in the checker

FAQ

Q4 vs Q8 KV cache: which should I use?

q8_0 halves KV memory and is the usual first step. q4_0 saves more but may cost more quality; we haven't measured that. Set it in llama.cpp with -ctk and -ctv.

How much VRAM does 256k context use?

It depends on the architecture. Models with few KV heads or hybrid attention need far less per token. Pick the model and 256k in the checker to see the estimate.

Does context change which quant fits?

Yes. A model that fits at 8k can fail at 128k, so the checker and What fits pages always state the context they assume.

Open the checker · What fits my GPU?

More short answers

Will It Run? Pro NOT BUILT YET

A personal setup for your exact hardware (Ollama / llama.cpp configs ready for your coding agent), an alert when a new model fits, and a one-click cloud fallback when it doesn't.

Not built yet. Join the waitlist, $10/mo planned, no charge now. What's planned

Email only. No payment info.