Written by Jakub Rusinowski · Last updated 2026-07-12 · Hardware figures computed by our VRAM engine
On a 24 GB card (RTX 3090/4090), the best local coding models are Qwen 3.6 27B and Qwen 2.5 Coder 32B, with Devstral-2 22B as the agentic specialist. The best downloadable coder overall is Qwen3-Coder 80B-A3B — workstation-class in VRAM, but its 3B active parameters keep it fast. On 8 GB, run Qwen3-Coder 8B. Every figure below comes from our compute module, not marketing pages.
Most "best coding LLM" lists rank models nobody can run. This one is sorted the other way around: by the hardware tier you actually have. Each table shows the model's real Q4_K_M VRAM requirement — the same math behind our GPU compatibility checker — plus the GPU tier and the smallest Mac unified-memory config that fits it.
Two things to know before the tables. First, coding models split into agentic coders (built to drive an editing loop in Continue, Cline, or Aider — SWE-bench is the benchmark that matters) and autocomplete models (small, fill-in-the-middle-tuned, judged on latency). Serious local setups run one of each. Second, the frontier moves fast: for a dated, citable snapshot of the whole landscape, see our Local AI Report #2: the best open-source coding models — this page tracks the evergreen question of what to run per tier.
Open-weights state of the art. These need multi-GPU rigs or big unified memory all-in-VRAM — but note the MoE offload trick below the table.
| Model | VRAM (Q4) | Runs on | Context | License |
|---|---|---|---|---|
| Qwen3-Coder 480B-A35B (MoE) Open state of the art — The best dedicated open coder — 69.6% SWE-bench Verified, which Qwen positions near Claude Sonnet 4. Apache 2.0. Realistically an API or datacenter model. ollama pull qwen3-coder:480b-a35b | 290.6 GB | Multi-GPU server — or use an API Mac: 512 GB unified | 256K | Apache-2.0 |
| Devstral-2 123B Agentic specialist — Mistral’s agentic flagship: 71.6% SWE-bench Verified, built for multi-file edits and repo navigation. Apache 2.0. Fits a 2×48 GB or 128 GB-Mac workstation. ollama pull devstral:123b | 75.1 GB | 2×48 GB GPUs / big unified memory Mac: 128 GB unified | 125K | Apache-2.0 |
| Qwen3-Coder 80B-A3B (MoE) Best self-hostable coder — ~96% of the 480B flagship’s quality with only 3B active parameters — fast tokens, single-workstation footprint, Apache 2.0. ollama pull qwen3-coder:80b-a3b-q4 | 49.1 GB | 2×48 GB GPUs / big unified memory Mac: 96 GB unified | 125K | Apache-2.0 |
The MoE offload trick. Small-active-parameter MoE models only need their *active* experts in VRAM. With llama.cpp expert offload, Qwen3-Coder 80B-A3B runs on as little as ~8 GB VRAM plus 32 GB system RAM — slower than the all-in-VRAM figure in the table, but it turns a "workstation model" into something a well-RAMed gaming PC can genuinely use. The table shows the all-in-VRAM (fastest) case.
The consumer sweet spot — RTX 3090/4090, RX 7900 XTX, or a 32 GB Mac. This is where "self-hosted and genuinely good at code" starts.
| Model | VRAM (Q4) | Runs on | Context | License |
|---|---|---|---|---|
| Qwen 3.6 27B Best on a 24 GB card — The strongest all-round coder that fits an RTX 3090/4090 comfortably at Q4 — the realistic daily driver for local agentic work. ollama pull qwen3.6:27b | 17.6 GB | 24 GB GPU (RTX 3090/4090) Mac: 24 GB unified | 256K | Apache-2.0 |
| Qwen 2.5 Coder 32B Proven classic — The 2024 benchmark king still holds up — rivals GPT-4o-era coding quality on a single 24 GB card, with mature GGUF and Ollama support. ollama pull qwen2.5-coder:32b | 20.1 GB | 24 GB GPU (RTX 3090/4090) Mac: 32 GB unified | 128K | Apache-2.0 |
| Devstral-2 22B Agentic on 16 GB — 52.3% SWE-bench Verified in a 16 GB footprint — the best dedicated coding agent under 24 GB. Apache 2.0. ollama pull devstral:22b | 14.1 GB | 16 GB GPU (RTX 4060 Ti 16GB / 5060 Ti) Mac: 24 GB unified | 125K | Apache-2.0 |
| Codestral 22B FIM autocomplete (license warning) — Excellent fill-in-the-middle quality across 80+ languages — but the MNPL license forbids commercial/production use. Hobby projects only. ollama pull codestral:22b | 14.2 GB | 16 GB GPU (RTX 4060 Ti 16GB / 5060 Ti) Mac: 24 GB unified | 32K | MNPL-0.1 (non-production) |
License check before you standardize on a model. Qwen3-Coder, Qwen 3.6, and Devstral-2 are Apache 2.0 — free for commercial use. Codestral 22B is MNPL (non-production): fine to evaluate at home, not fine inside a company workflow. StarCoder2 ships under BigCode OpenRAIL-M, which permits commercial use with use-based restrictions. If you’re picking a model for work, this column matters as much as the benchmark score.
Latency beats size for inline completions — a FIM-tuned small model next to your cursor outperforms a big chat model that takes two seconds to answer.
| Model | VRAM (Q4) | Runs on | Context | License |
|---|---|---|---|---|
| Qwen3-Coder 8B Best small coder — FIM-tuned, current-generation, and comfortable on any 8 GB GPU — the default pick for both autocomplete and light chat on modest hardware. ollama pull qwen3-coder:8b | 5.6 GB | 8 GB GPU (RTX 3060/4060) Mac: 16 GB unified | 125K | Apache-2.0 |
| StarCoder 2 15B Legacy mid-size — Still a competent 600-language code model for 12 GB cards, though Qwen3-Coder 8B beats it at half the size on most tasks. ollama pull starcoder2:15b | 10.2 GB | 12 GB GPU (RTX 3060 12GB / 4070) Mac: 16 GB unified | 16K | BigCode OpenRAIL-M |
| StarCoder 2 3B Fastest autocomplete — The autocomplete workhorse: ~180 tok/s on midrange GPUs means ghost text that keeps up with your typing. Pair it with a bigger chat model. ollama pull starcoder2:3b | 2.6 GB | 8 GB GPU (RTX 3060/4060) Mac: 16 GB unified | 16K | BigCode OpenRAIL-M |
The absolute open-weights leaders — DeepSeek V4-Pro (~80% SWE-bench Verified), GLM-5.x, and Kimi K2.x, all MIT-licensed — want 80 GB-class multi-GPU hardware. For a solo developer they’re API models, not local models. The pattern that wins in 2026: a fast local coder for the inner loop (autocomplete, quick edits, private code) plus a frontier model over an API for the hardest 5% of problems. Our cloud AI directory lists where each frontier model is hosted and what it costs per token.
How to choose from these tables. Start from your VRAM, not from the leaderboard: pick the largest agentic coder your tier runs comfortably, add StarCoder2 3B or Qwen3-Coder 8B for autocomplete if your card has headroom, and check the exact fit for your GPU — including quant options and context-length headroom — with the compatibility checker. Then wire it into an editor with our end-to-end setup guide.
The 24 GB tier is where local coding gets genuinely good, and two cards own it: the RTX 4090, and the used RTX 3090 as the budget route to the same VRAM. On a 16 GB budget, the RTX 4060 Ti 16GB runs Devstral-2 22B and Qwen3-Coder 8B side by side.
Hardware falls short of the model you want? Rent a 24–48 GB GPU by the hour for a few dollars and test-drive the exact model before buying anything.
Full list on the cloud AI directory.