The most important question before buying hardware: does my model fit in memory? If not, it either won't run at all or crawls. The good news: you can estimate the requirement quite accurately with a simple formula.
The formula
With the standard quantization Q4_K_M (about 4.85 bits per weight) the rule of thumb is: 0.6 GB per billion parameters, plus context and overhead.
Example Qwen3.6 27B: the model file is 17.0 GB at Q4_K_M. At 32,000 tokens of context, add 1.9 GB of KV cache, plus 1 GB overhead – about 19.9 GB. That fits on a 24 GB graphics card, but not on a 16 GB one.
Every term in the formula – quantization, KV cache, context – is explained briefly in the glossary.
Table: how much does each model need?
Memory with Q4_K_M and 32k context, plus the plain model size at Q8 (near lossless).
| Model | Parameters | Q4 total (32k) | Q8 weights | Suitable hardware |
|---|---|---|---|---|
| Qwen3.5 9B | 9B | 8.3 GB | 10.5 GB | 12 GB card |
| Gemma 4 12B | 12B | 9.3 GB | 12.9 GB | 12 GB card |
| gpt-oss-20b | 21B (MoE) | 15.3 GB | native MXFP4 | 16 GB (tight) / 24 GB |
| Qwen3.6 27B | 27B | 19.9 GB | 29.8 GB | 24 GB card |
| Qwen3-Coder 30B-A3B | 30B (MoE) | 22.7 GB | 32.6 GB | 24 GB card |
| Llama 3.3 70B | 70B | 53.4 GB | 74.5 GB | Mac / mini PC from 96 GB |
| gpt-oss-120b | 117B (MoE) | 66.2 GB | native MXFP4 | Mac / mini PC from 96 GB |
| Qwen3.5 122B-A10B | 122B (MoE) | 77.6 GB | 130 GB | 128 GB unified memory |
| Qwen3 235B-A22B | 235B (MoE) | 149 GB | 249 GB | Mac Studio 256 GB |
| DeepSeek V3.1 | 671B (MoE) | 407 GB | 708 GB | Mac Studio 512 GB |
All 29 models of the calculator, with memory bars for every device, are in the calculator under “Memory usage”.
Quantization: fewer bits, less memory
Quantization stores each weight with fewer bits. That saves memory and makes the model faster, at a small cost in quality.
- FP16 (16 bits): full precision, 2 GB per billion parameters – rarely sensible locally.
- Q8_0 (8.5 bits): practically lossless, about 1.1 GB per billion.
- Q4_K_M (4.85 bits): the default. Barely noticeable quality loss, about 0.6 GB per billion.
- Q3 / Q2: only as a last resort – quality drops noticeably.
Rule of thumb: a larger model at Q4 is almost always better than a smaller one at Q8.
Context: the underrated memory hog
Every token in context takes space in the KV cache. How much depends heavily on the architecture: for Llama 3.3 70B, 32,000 tokens cost about 10 GB extra; for Qwen3.6 27B, thanks to leaner attention, only 1.9 GB. If you want to process long documents or whole code repositories, plan a few gigabytes of headroom. The calculator has a context slider from 4k to 128k.
Bandwidth: why fitting isn't enough
Memory decides whether a model runs – memory bandwidth decides how fast. For every new token, the active weights have to be read once in full:
Example: an RTX 4090 has 1,008 GB/s. Qwen3.6 27B reads about 17 GB per token → roughly 0.6 × 1,008 ÷ 17.4 ≈ 35 tok/s.
MoE models (mixture of experts) are the trick to make large models fast: Qwen3.6 35B-A3B needs memory for all 35 billion parameters but reads only about 2 GB per token. So on the same card it writes many times faster than a dense 27B model.
If a model doesn't fully fit in graphics memory, part of it can spill into PC memory. But regular DDR5 only manages about 60 to 90 GB/s – speed then drops many times over.
Special case: Macs and mini PCs
Macs, the DGX Spark and mini PCs with Ryzen AI Max share memory between CPU and GPU. That makes very large models possible, but not all of it is usable: by default macOS gives the GPU only about 67% (up to 36 GB) or 75%. A 96 GB Mac therefore has about 72 GB for the model; with the limit raised it's about 90 GB. More in the comparison RTX 5090 vs Mac Studio M5 Ultra.
How the DGX Spark and Mac Studio do in practice is covered in DGX Spark vs Mac Studio.
In short
12 GB for models up to 12B · 16 GB for up to 14B and gpt-oss-20b with short context · 24 GB for 27B models and 30B MoE · 32 GB for more context · 96–128 GB unified memory for 70B and gpt-oss-120b · 256 GB and up for the really big MoE models.
Matching hardware is in the GPU buying guide 2026 – or let the buying advisor suggest three devices.
Run the numbers yourself
The numbers in this article are calculator estimates for Q4_K_M. With your model, context and budget the result may differ.