Choose a GPU for a local LLM by VRAM first: the model's weights plus its KV cache must fit in video memory, so work out what the models you want need, then buy the card whose memory covers it with room to spare. As a rule from the arithmetic below, 8 GB runs 7B to 8B models at 4-bit, 16 GB runs 14B models comfortably, and 24 to 32 GB is the step that makes 32B models fit.
VRAM needed ≈ parameters × bits_per_weight ÷ 8 (weights)
+ 2 × layers × kv_heads × head_dim × 2 bytes × context_tokens (FP16 KV cache)
+ runtime overhead
This article deliberately does not rank cards. Speed, price and availability change monthly; the arithmetic doesn't. Memory figures are from vendor spec pages as of October 2026. All sizes are in GB (109 bytes).
Why VRAM is the deciding spec
When a model fits entirely in VRAM, the GPU does all the work. When it doesn't, runtimes like llama.cpp and Ollama put the overflow layers in system RAM and run them on the CPU, which is much slower. Ollama's ollama ps shows this as a split such as 48%/52% CPU/GPU instead of 100% GPU. So the first question for any card is not how fast it is, but whether your model fits on it.
Hugging Face's Transformers guide gives the base rule: a model with X billion parameters "requires roughly 2 * X GB of VRAM in bfloat16/float16 precision". Local runtimes mostly use quantized files instead, which store fewer bits per weight. llama.cpp's quantize README measures the common Q4_K_M format at 4.8944 bits per weight and Q8_0 at 8.5008 on Llama-3.1-8B; those are the figures used below, as estimates for other models.
Step 1: compute the weights
Weights (GB) = parameters (billions) × bits per weight ÷ 8. Using the exact parameter counts from three Qwen2.5 model cards:
| Model | Parameters | Q4_K_M (4.89 bpw) | Q8_0 (8.50 bpw) | FP16 |
|---|---|---|---|---|
| Qwen2.5-7B-Instruct | 7.61B | 4.66 GB | 8.09 GB | 15.22 GB |
| Qwen2.5-14B-Instruct | 14.7B | 8.99 GB | 15.62 GB | 29.40 GB |
| Qwen2.5-32B-Instruct | 32.5B | 19.88 GB | 34.53 GB | 65.00 GB |
Check a row: 14.7 × 4.8944 ÷ 8 = 8.99. For larger models, llama.cpp's README lists Llama 70B at Q4_K_M as 43.1 GB, which no single consumer card in the table further down can hold.
Step 2: add the KV cache for your context length
The KV cache stores attention keys and values for every token in the conversation, and it grows linearly with context length. Per token it takes 2 × layers × KV heads × head dimension × 2 bytes at FP16. From each model's config.json (head dimension = hidden size ÷ attention heads = 128 for all three):
| Model | Layers | KV heads | KV cache per token | at 8,192 tokens | at 32,768 tokens |
|---|---|---|---|---|---|
| 7B | 28 | 4 | 57,344 bytes | 0.47 GB | 1.88 GB |
| 14B | 48 | 8 | 196,608 bytes | 1.61 GB | 6.44 GB |
| 32B | 64 | 8 | 262,144 bytes | 2.15 GB | 8.59 GB |
Check the 14B row: 2 × 48 × 8 × 128 × 2 = 196,608 bytes per token; × 8,192 = 1.61 GB. Long contexts cost real memory: at 32k tokens the 14B model's cache is about 72% the size of its 4-bit weights.
Your runtime may choose the context for you. Ollama's documentation says it defaults to a 4k context below 24 GiB of VRAM, 32k from 24 to 48 GiB, and 256k at 48 GiB or more, and you can override it with OLLAMA_CONTEXT_LENGTH.
Step 3: add a margin, then compare with cards
Runtime overhead (working buffers) depends on the engine and settings, and there is no single published figure, so leave headroom rather than plan to the last gigabyte. Your desktop and browser also use some VRAM if the same card drives your monitor.
Totals at an 8,192-token context with Q4_K_M weights (weights + KV cache, before overhead):
- 7B: 4.66 + 0.47 = 5.13 GB. Fits on 8 GB.
- 14B: 8.99 + 1.61 = 10.60 GB. Tight on 12 GB, comfortable on 16 GB.
- 32B: 19.88 + 2.15 = 22.03 GB. Very tight on 24 GB; comfortable on 32 GB.
Now compare with the memory vendors list. As of October 2026:
| Card (vendor spec page) | Memory | Interface | Largest model in the examples that fits at 8k context, Q4_K_M |
|---|---|---|---|
| NVIDIA RTX 5060 | 8 GB GDDR7 | 128-bit | 7B |
| NVIDIA RTX 5060 Ti | 8 GB or 16 GB GDDR7 | 128-bit | 7B (8 GB) / 14B (16 GB) |
| Intel Arc B580 | 12 GB GDDR6, 456 GB/s | 192-bit | 14B, with little headroom |
| NVIDIA RTX 5070 | 12 GB GDDR7 | 192-bit | 14B, with little headroom |
| NVIDIA RTX 5070 Ti / 5080 | 16 GB GDDR7 | 256-bit | 14B |
| NVIDIA RTX 4090 / 3090 | 24 GB GDDR6X | 384-bit | 32B, very tight |
| NVIDIA RTX 5090 | 32 GB GDDR7 | 512-bit | 32B, with room for longer context |
Note the memory variants. The RTX 5060 Ti is sold with 8 GB or 16 GB, and NVIDIA lists the RTX 3060 as 12 GB or 8 GB. For LLM work the memory size is the specification that matters, so read the exact model before buying.
Bandwidth decides speed once the model fits
After capacity, the next spec is memory bandwidth. Generating text is one token at a time, and for a dense model each new token uses every weight once, so the weights have to be streamed from VRAM for every token. The Transformers guide describes the "memory bandwidth" needed for constant reloading during autoregressive decoding as "a serious time bottleneck". That gives a rough ceiling you can compute:
max tokens/s ≈ memory bandwidth ÷ bytes read per token (about the weight size)
Intel Arc B580: 456 GB/s ÷ 4.66 GB (7B, Q4_K_M) ≈ 98 tokens/s ceiling
That number is an upper bound from arithmetic, not a measurement: real generation is slower because of the KV cache reads, compute and overhead. It is useful for comparing cards with each other, and it explains why a wider memory interface (128-bit vs 256-bit vs 512-bit in the table) matters for LLMs. NVIDIA's consumer spec pages list memory size and interface width but not bandwidth; Intel and Apple list bandwidth directly.
Apple Silicon: unified memory instead of VRAM
On Apple Silicon the GPU uses the same unified memory as the CPU, so the memory you configure is the budget, minus what macOS and your apps use. Apple's Mac Studio spec page (October 2026) lists:
| Chip | Unified memory options | Memory bandwidth |
|---|---|---|
| M5 Max | 36 GB base; 48, 64 or 128 GB in the top configuration | 460 GB/s, or 614 GB/s in the top configuration |
| M5 Ultra | 96 GB base; 256 or 512 GB in the top configuration | 1.2 TB/s |
That capacity is far beyond any consumer graphics card in the table above; a 70B model at Q4_K_M (43.1 GB) fits in 64 GB of unified memory. The trade-off is bandwidth per dollar and software: check that your runtime supports Metal (Ollama does) or MLX (LM Studio does on Apple Silicon).
Check software support before you buy
A card with enough memory is useless if your software can't use it. Ollama's hardware documentation, as one example:
- NVIDIA: compute capability 5.0 or higher and driver 550 or newer (cards at compute capability 5.0 to 6.2 need driver 570 or later).
- AMD Radeon: through ROCm v7 on Linux and a ROCm v7 / HIP7-capable driver stack on Windows; the RX 7900 XTX is among the listed cards.
- Apple: GPU acceleration through Metal.
- Other cards: Vulkan is enabled by default on Windows and Linux for additional GPU support.
Other tools have their own lists. If you plan to use LM Studio, PyTorch or a specific fine-tuning tool, look up its supported hardware for your exact card. LM Studio vs Ollama compares the two most common local runtimes.
A buying checklist
- Write down the largest model you want to run and the context length you need.
- Compute weights + KV cache with the formulas above, using the exact parameter count and
config.jsonvalues from the model card. - Add headroom for runtime buffers and your desktop, and pick the memory tier above that total.
- Among cards with that memory, compare bandwidth (or interface width), then price and power.
- Confirm your runtime supports the card's vendor and generation.
If a model still doesn't fit
Before buying more VRAM, try the cheaper levers: a lower-bit quantization (see what LLM quantization and GGUF are), a shorter context, or a smaller model in the same family. Then load the model and measure: ollama ps shows the CPU/GPU split, and nvidia-smi shows memory used on NVIDIA cards. How much VRAM you need to run an LLM locally has more on bits per weight and a worked 72B example.
Frequently asked questions
- Is 8 GB of VRAM enough for a local LLM?
- For 7B to 8B models at 4-bit quantization, usually yes. A 7.61-billion-parameter model at Q4_K_M needs about 4.7 GB for its weights and about 0.5 GB of KV cache at an 8,192-token context, which leaves room on an 8 GB card. A 14B model at the same quantization needs about 9 GB for weights alone and does not fit.
- Should I buy a faster GPU with less VRAM or a slower one with more?
- For running LLMs, more VRAM first, as long as the model you want fits only on the larger card. A model that spills into system RAM runs partly on the CPU, which is much slower than any GPU. Once both cards hold your model with headroom, memory bandwidth becomes the better tie-breaker, because generating each token streams the weights from memory.
- Do I need an NVIDIA GPU to run LLMs locally?
- No. Ollama documents support for NVIDIA cards with compute capability 5.0 or higher, AMD Radeon cards through ROCm v7, Apple Silicon through Metal, and Vulkan for additional cards on Windows and Linux. NVIDIA has the broadest support across tools, so check that the specific software you plan to use supports your card before buying.
- Is a Mac with lots of unified memory a good alternative to a GPU?
- It can be, because the GPU on Apple Silicon uses the same unified memory pool as the CPU, and Mac Studio configurations go far beyond consumer graphics card VRAM. As of October 2026 Apple lists up to 128 GB for the M5 Max and up to 512 GB for the M5 Ultra. The operating system and apps share that pool, and token speed depends on memory bandwidth, which Apple lists per chip.
Sources
- NVIDIA: Compare GeForce graphics cards (memory configuration)
- NVIDIA: GeForce RTX 5090 specifications
- NVIDIA: GeForce RTX 5060 family specifications
- Intel: Arc B580 Graphics specifications
- Apple: Mac Studio technical specifications
- llama.cpp: tools/quantize README (bits per weight)
- Hugging Face Transformers: Optimizing LLMs for speed and memory
- Qwen2.5-7B-Instruct model card
- Qwen2.5-14B-Instruct model card
- Qwen2.5-32B-Instruct model card
- Ollama docs: Hardware support (GPU)
- Ollama docs: Context length