Local AI hardware guide
What does it take to run coding models locally?
RTX graphics cards, Apple silicon Macs with lots of unified memory and AI mini PCs can now run capable coding models on your desk. Four things decide how well it goes. The table below applies them to hardware measured with the DevBench AI test.
1 · Memory decides what loads
A model has to fit in graphics memory (VRAM), or in the share of unified memory the graphics side can use on a Mac or an AMD Ryzen AI Max mini PC. Add ~1 GB for an 8–16K-token context, more for long agent sessions.
2 · Bandwidth decides how fast it writes
Every new token reads the whole model (or its active experts) once. Writing speed ≈ memory bandwidth ÷ bytes read per token, which is why a GPU with fast GDDR memory beats system RAM by a wide margin.
3 · MoE models change the math
Mixture-of-experts models like Qwen3-Coder 30B-A3B or gpt-oss 120B need memory for all weights but read only 3–5B parameters per token. With enough memory they write like a small model and code like a big one.
4 · Compute decides how fast it reads
Coding agents send 10–50K tokens of context with each request. Reading them (prompt processing) is compute-bound: dedicated NVIDIA and AMD cards are much faster at it than Macs, integrated graphics and CPUs.
Measured hardware × popular models
| Hardware | gpt-oss 20B 12 GB · MoE |
Qwen3-Coder 30B-A3B 19 GB · MoE |
Qwen3.8 27B 17 GB · dense |
Qwen3-Coder-Next 80B-A3B 49 GB · MoE |
gpt-oss 120B 63 GB · MoE |
|---|---|---|---|---|---|
|
NVIDIA GeForce RTX 5080 GPU · Vulkan
1 result · median AI score 10429
|
≈ 255 tok/s |
≈ 48.4 tok/s
card + RAM
|
≈ 11.7 tok/s
card + RAM
|
–
doesn't fit
|
–
doesn't fit
|
|
NVIDIA GeForce RTX 4060 Laptop GPU GPU · Vulkan
1 result · median AI score 3474
|
≈ 23 tok/s
card + RAM
|
≈ 19.6 tok/s
card + RAM
|
≈ 3.4 tok/s
card + RAM
|
–
doesn't fit
|
–
doesn't fit
|
|
Quadro T1000 GPU · Vulkan
2 results · median AI score 995
|
≈ 16 tok/s
card + RAM
|
≈ 15.9 tok/s
card + RAM
|
≈ 2.6 tok/s
card + RAM
|
–
doesn't fit
|
–
doesn't fit
|
Estimated writing speed per device, from the median of its published AI results. Green runs well (20+ tok/s and reads a 10,000-token prompt within 30 s), amber is usable, grey is slow. Memory: free graphics memory and RAM, or the share of unified memory the graphics side can use.
How much memory does each model need?
| Model | File | Needs | Graphics card | Mac |
|---|---|---|---|---|
| Qwen2.5-Coder 7B Q4_K_M | 4.7 GB | 5.7 GB | 8 GB | 16 GB |
| Qwen3.5 9B Q4_K_M | 5.7 GB | 6.7 GB | 8 GB | 16 GB |
| Qwen2.5-Coder 14B Q4_K_M | 9 GB | 10 GB | 12 GB | 16 GB |
| gpt-oss 20B MXFP4 | 12 GB | 13 GB | 16 GB | 24 GB |
| Devstral Small 2 24B Q4_K_M | 14 GB | 15 GB | 24 GB | 24 GB |
| Qwen3.8 27B Q4_K_M | 17 GB | 18 GB | 24 GB | 32 GB |
| Gemma 4 26B-A4B Q4_K_M | 17 GB | 18 GB | 24 GB | 32 GB |
| Qwen3-Coder 30B-A3B Q4_K_M | 19 GB | 20 GB | 24 GB | 32 GB |
| Qwen2.5-Coder 32B Q4_K_M | 20 GB | 21 GB | 24 GB | 32 GB |
| Qwen3.6 35B-A3B Q4_K_M | 22 GB | 23 GB | 32 GB | 36 GB |
| Qwen3-Coder-Next 80B-A3B Q4_K_M | 49 GB | 50 GB | 96 GB | 96 GB |
| gpt-oss 120B MXFP4 | 63 GB | 65 GB | 96 GB | 96 GB |
Smallest common configuration that holds the whole model plus ~1 GB of context. Graphics cards keep ~5% for the desktop; macOS gives the graphics side about two-thirds of memory up to 36 GB and three-quarters above. Models that don't fit on a card can still run split between card and system RAM (llama.cpp, Ollama and LM Studio do this), much slower for dense models and surprisingly well for MoE models.
Practical tips
- Prefer MoE models when memory allows. On the same hardware they write several times faster than dense models of similar size.
- More RAM helps a graphics card. It lets bigger models load by spilling into system memory. It doesn't make anything faster; more VRAM does.
- On a Mac, memory size is the upgrade. Bandwidth grows with the chip (Pro, Max, Ultra); macOS lets you raise the graphics limit with
sudo sysctl iogpu.wired_limit_mb=<MB>. - 4-bit is the sweet spot. Q4_K_M (or MXFP4 for gpt-oss) keeps quality close to the original at under a third of the memory of 16-bit weights.
- Long contexts cost memory. Agents that keep 64–128K tokens need several extra GB for the context cache.
- Plug in laptops. On battery, graphics cards and processors slow down a lot.
Estimates come from the DevBench AI test (Qwen2.5-Coder 1.5B Instruct (Q4_K_M) with llama.cpp): writing follows the memory bandwidth measured on each device and the bytes each model reads per token, reading follows compute. Real speeds depend on drivers, runtime, context length and settings. Methodology