Local AI by VRAM Tier - 8GB | 12GB | 16GB | 24GB | 32GB
Deep dives: Chat | Coding | Translation | Vision | Speech | Agents
A cloud coding assistant sends the code you are working on to the provider’s servers and bills per seat or per request. A coding model running on your own GPU costs nothing per query and keeps proprietary code on your machine. How close it gets to the cloud depends mostly on how much VRAM you have.
Jump to: 8 GB | 12 GB | 16 GB | 24 GB | 32 GB
Quick reference
Every benchmark figure on this page is reported by the lab that made the model, not measured by this site. HumanEval and the SWE-bench variants measure different things and are not comparable with each other.
| Tier | Autocomplete Pick | Agentic Pick | Key figure (vendor-reported) |
|---|---|---|---|
| 8GB | Qwen2.5-Coder 7B | - | 88.4% HumanEval |
| 12GB | Qwen2.5-Coder 14B | - | 89.6% HumanEval |
| 16GB | Qwen2.5-Coder 14B | Devstral Small 2 (alt: Qwen3.8-27B at IQ4_XS) | 68.0% SWE-bench Verified |
| 24GB | Qwen2.5-Coder 32B | Qwen3.8-27B (alt: Qwen3.6-27B, KAT-Coder-V2.5-Dev, Qwen3-Coder-30B-A3B) | 92.7% HumanEval; 61.7% SWE-bench Pro (Qwen’s refined task set) |
| 32GB | Qwen2.5-Coder 32B (Q6_K) | Qwen3.8-27B at Q6_K or Q8_0 | 92.7% HumanEval; 61.7% SWE-bench Pro |
Updated November 2026.
What changed in this update: Qwen3.8-27B, published on Hugging Face in August 2026 under Apache 2.0, replaces Qwen3.6-27B as the agentic pick from 24GB up. The 16GB agentic pick moves to Devstral Small 2, because the Qwen3.6 models this page previously recommended there do not fit a 16GB card at Q4. Every file size is now quoted in bytes from the Hugging Face file listing, with the free memory left on each card worked out in GiB.
The question is which model to run. There are two distinct jobs: autocomplete (fill-in-the-middle / FIM, the inline suggestions as you type) and agentic coding (asking questions, debugging, and having the model actually resolve issues across files). Some models do both. Most do one well.
The Benchmarks That Matter
- HumanEval - generate a Python function from a docstring. The classic test; the Qwen2.5-Coder instruct models score between 88.4% (7B) and 92.7% (32B) in their technical report, so it no longer separates strong models much
- SWE-bench Verified - fix a real GitHub issue autonomously. The closest thing to actual software engineering, and the benchmark that separates toys from tools
- FIM support - does the model support fill-in-the-middle for autocomplete? Not all chat models do
- Context window - how much of your codebase you can paste in at once
- License - whether you can use it in commercial work
Three grounding notes before the tables. SWE-bench ships in several variants - Verified, Multilingual and Pro among them - and they are different benchmarks with different task sets, so a score on one cannot be compared against a score on another. Labs also run them on their own harnesses, and Qwen’s model cards add “We correct some problematic tasks in the public set of SWE-bench Pro”, so even two SWE-bench Pro numbers from different labs do not line up. Second, file sizes are the GGUF file in bytes as listed on Hugging Face; a “16GB” card holds 16 GiB (17,179,869,184 bytes), and the “free” figures below are that card size minus the weights file, in GiB. That free room has to hold the KV cache, which grows with context length, plus runtime buffers, so a model with under about 1 GiB free does not run comfortably. Third, the Qwen3.6, Qwen3.8 and Devstral Small 2 models also accept images; the vision projector is a separate file and is only needed if you send images.
8GB VRAM
GPUs: RTX 4060, RTX 3060 8GB, RTX 3070
Candidates
| Model | Params | HumanEval (vendor-reported) | FIM | Q4_K_M file | Free on 8 GiB | License |
|---|---|---|---|---|---|---|
| Qwen2.5-Coder 7B | 7B | 88.4% | Yes | 4,683,073,536 bytes (4.36 GiB) | 3.64 GiB | Apache 2.0 |
For autocomplete: Qwen2.5-Coder 7B
The Qwen2.5-Coder 7B is still the best small autocomplete model. At 88.4% HumanEval for the 7B instruct model in the technical report it beats far larger older models, supports FIM natively, and its training data spans 92 programming languages. The model card lists a full context of 131,072 tokens, but the shipped config is set to 32,768 and longer inputs need YaRN rope scaling; Ollama’s tags list a 32K window. The Q4_K_M file is 4,683,073,536 bytes (4.36 GiB), which leaves about 3.6 GiB of an 8GB card for context. Plug it into Continue or Tabby for inline suggestions.
Smaller still: Ollama lists qwen2.5-coder:3b at 1.9 GB, qwen2.5-coder:1.5b at 986 MB and qwen2.5-coder:0.5b at 398 MB, all from the same FIM-trained family, for laptops or for leaving room for a second model. The 0.5B and 1.5B are Apache 2.0; the 3B is under Qwen’s research licence (qwen-research on Hugging Face), so check it before commercial use.
Not an 8GB model: DeepSeek Coder V2 Lite (16B total, 2.4B active, 81.1% HumanEval per DeepSeek, DeepSeek model licence) was listed here before, but its default deepseek-coder-v2:lite tag on Ollama is 8.9 GB, more than an 8GB card holds before any context. It belongs at 12GB.
The trade-off: 8GB coding models handle autocompletion well but struggle with complex refactoring, multi-file changes, and large-codebase understanding. Use them for routine completion and reach for a bigger model or the cloud for the hard cases.
For all use cases at this level, see the 8GB VRAM complete guide.
12GB VRAM
GPUs: RTX 3060 12GB, RTX 4070
Winner: Qwen2.5-Coder 14B
At 89.6% HumanEval in the technical report, with FIM support, the Qwen2.5-Coder 14B is the pick for this tier. Its Q4_K_M file is 8,988,110,272 bytes (8.37 GiB), leaving about 3.6 GiB of a 12GB card for context. It remains the strongest dedicated autocomplete model that fits a 12GB card.
DeepSeek Coder V2 Lite (8.9 GB on Ollama, Q4_0) also fits here as a FIM-capable mixture-of-experts alternative, with 81.1% HumanEval reported by DeepSeek against 89.6% for the Qwen model.
For agentic use (running the model through a tool that edits files), 12GB is tight; the models that resolve real issues well start at the 16GB tier below.
For all use cases at this level, see the 12GB VRAM complete guide.
16GB VRAM
GPUs: RTX 4060 Ti 16GB, RTX 5060 Ti 16GB, Intel Arc A770, AMD RX 7800 XT
Candidates
| Model | Params | Agentic score (vendor-reported) | FIM | Q4-class file | Free on 16 GiB | License |
|---|---|---|---|---|---|---|
| Devstral Small 2 | 24B dense | 68.0% SWE-bench Verified | not documented | Q4_K_M 14,334,446,752 bytes (13.35 GiB) | 2.65 GiB | Apache 2.0 (deprecated by Mistral 2026-02-27) |
| Qwen3.8-27B | 27B dense | 61.7% SWE-bench Pro (Qwen’s refined set) | not documented | UD-IQ4_XS 14,352,911,264 bytes (13.37 GiB) | 2.63 GiB | Apache 2.0 |
| Qwen3.6-27B | 27B dense | 77.2% SWE-bench Verified | not documented | Q4_K_M 16,817,244,384 bytes (15.66 GiB) | 0.34 GiB: needs CPU offload | Apache 2.0 |
| Qwen3.6-35B-A3B | 35B / 3B active (MoE) | 73.4% SWE-bench Verified | not documented | UD-Q4_K_M 22,134,528,992 bytes (20.61 GiB) | does not fit | Apache 2.0 |
| Qwen2.5-Coder 14B | 14B | (autocomplete model) | Yes | Q4_K_M 8,988,110,272 bytes (8.37 GiB) | 7.63 GiB | Apache 2.0 |
Winner (agentic): Devstral Small 2
Devstral Small 2 is the agentic model that actually fits this card. It is a 24B dense model under Apache 2.0 with a 256k context window, and Mistral reports 68.0% on SWE-bench Verified. The Q4_K_M GGUF is 14,334,446,752 bytes (13.35 GiB), which leaves 2.65 GiB of a 16GB card for the KV cache and buffers, so plan on a modest context rather than the full 256k. The model also accepts images; the F16 vision projector adds another 878,054,048 bytes (0.82 GiB) if you load it. On Ollama it is devstral-small-2:24b (15 GB); the older devstral tag is the first-generation 2505 model with a 128K window, not this one.
One thing to know before you build on it: Mistral’s docs mark Devstral Small 2 deprecated as of 2026-02-27 and point new integrations at Mistral Medium 3.5. Mistral has published Mistral Medium 3.5 weights (77.6% SWE-Bench Verified per Mistral, under a Modified MIT licence), but at about 128B parameters it is far beyond a single consumer GPU. The Apache-2.0 Devstral weights stay downloadable and keep working.
Alternative: Qwen3.8-27B at IQ4_XS, or Qwen3.6-27B with offload
Qwen3.8-27B is the newer and stronger 27B model (see the 24GB tier), and Unsloth’s UD-IQ4_XS build is 14,352,911,264 bytes (13.37 GiB), leaving 2.63 GiB on a 16GB card - the same tight margin as Devstral, at a lower-precision quant. The standard Q4_K_M builds do not fit: Qwen3.6-27B Q4_K_M is 16,817,244,384 bytes (15.66 GiB), which leaves 0.34 GiB, so on a 16GB card part of the model has to be offloaded to system RAM and generation slows accordingly. Qwen3.6-35B-A3B at 20.61 GiB is a 24GB model; a mixture-of-experts keeps every expert in memory even though only 3B parameters are active per token.
Autocomplete on the same card: keep Qwen2.5-Coder 14B (8.37 GiB) installed for fast FIM inline suggestions and switch to the agentic model for agentic sessions; the two do not fit in 16 GiB at the same time.
For all use cases at this level, see the 16GB VRAM complete guide.
24GB VRAM
GPUs: RTX 3090, RTX 4090
This is the first tier where the strongest open 27B agentic models run at Q4 with room for a real context window.
Candidates
| Model | Params | Score (vendor-reported) | FIM | Q4_K_M file | Free on 24 GiB | License |
|---|---|---|---|---|---|---|
| Qwen3.8-27B | 27B dense | 61.7% SWE-bench Pro (Qwen’s refined set) | not documented | UD-Q4_K_M 16,564,259,744 bytes (15.43 GiB) | 8.57 GiB | Apache 2.0 |
| Qwen3.6-27B | 27B dense | 77.2% SWE-bench Verified; 53.5% SWE-bench Pro | not documented | 16,817,244,384 bytes (15.66 GiB) | 8.34 GiB | Apache 2.0 |
| Qwen2.5-Coder 32B | 32B | 92.7% HumanEval | Yes | 19,851,335,872 bytes (18.49 GiB) | 5.51 GiB | Apache 2.0 |
| KAT-Coder-V2.5-Dev | 35B / 3B active (MoE) | 69.40% SWE-bench Verified | not documented | 21,391,448,480 bytes (19.92 GiB) | 4.08 GiB | Apache 2.0 |
| Qwen3-Coder-30B-A3B | 30.5B / 3.3B active (MoE) | not on model card | not documented | 18,556,689,568 bytes (17.28 GiB) | 6.72 GiB | Apache 2.0 |
| GLM-4.7-Flash | 30B-A3B (MoE) | 59.2% SWE-bench Verified | not documented | 18,312,339,808 bytes (17.05 GiB) | 6.95 GiB | MIT |
| Qwen3.6-35B-A3B | 35B / 3B active (MoE) | 73.4% SWE-bench Verified | not documented | UD-Q4_K_M 22,134,528,992 bytes (20.61 GiB) | 3.39 GiB | Apache 2.0 |
For agentic coding: Qwen3.8-27B
Qwen3.8-27B is a 27B dense model under Apache 2.0 with a native 262,144-token context; its Hugging Face repository was created 2026-08-05, and it is the next 27B release after Qwen3.6-27B. Qwen does not publish a SWE-bench Verified figure for it; on its own model card it reports 61.7% on SWE-bench Pro against 53.5% for Qwen3.6-27B, and 73.0% against 63.4% on Terminal Bench 2.1, all run by Qwen on the same harness. Unsloth’s UD-Q4_K_M GGUF is 16,564,259,744 bytes (15.43 GiB), which leaves 8.57 GiB of a 24GB card for context; on Ollama it is qwen3.8:27b (18 GB). Thinking mode is on by default and can be turned off per request. Run it through Aider or OpenHands to have it work through real issues across files.
Qwen3.6-27B, the previous pick, is the same size (Q4_K_M 15.66 GiB, 8.34 GiB free) and carries a Qwen-reported 77.2% SWE-bench Verified. That number cannot be set against Qwen3.8’s SWE-bench Pro figure; on the one benchmark Qwen reports for both, Qwen3.8-27B is ahead.
For autocomplete: Qwen2.5-Coder 32B
92.7% HumanEval for the 32B instruct model, with FIM and training data across 92 programming languages. The Q4_K_M file is 19,851,335,872 bytes (18.49 GiB), leaving 5.51 GiB of a 24GB card. Still the strongest dedicated FIM model in this lineup; it does not share the card with a 27B agentic model, so most setups run one or the other at a time.
Apache-licensed alternatives: KAT-Coder-V2.5-Dev from Kwaipilot is a 35B-total / 3B-active mixture-of-experts under Apache 2.0 with a native 262,144-token context; its Hugging Face repository was created 2026-07-23 and last updated 2026-07-28. Community GGUF builds exist; bartowski’s Q4_K_M is 21,391,448,480 bytes (19.92 GiB), leaving 4.08 GiB here, and even its Q3_K_M (15.11 GiB) is too tight for a 16GB card. Kwaipilot’s self-reported scores, kept in separate variants because they are not comparable to each other:
| Benchmark | Score (self-reported) |
|---|---|
| SWE-bench Verified | 69.40% |
| SWE-bench Multilingual | 63.00% |
| SWE-bench Pro | 45.96% |
| Terminal-Bench 2.1 | 41.02% |
Comparing it with Qwen’s models is harder than it looks. Qwen reports 73.4% for Qwen3.6-35B-A3B on SWE-bench Verified, while Kwaipilot re-ran that same model on its own harness and got 64.40%, behind KAT’s 69.40%, footnoting “an approximate 10 pp gap compared with the official results”. The two labs’ headline numbers disagree by about ten points on the same model and the same benchmark, so no ordering between them is claimed here.
Qwen3-Coder-30B-A3B (30.5B total, 3.3B active, 262,144-token native context, non-thinking only) is Qwen’s coding-specific MoE at this size; its model card does not list a SWE-bench Verified score, and its Q4_K_M file is 17.28 GiB (6.72 GiB free). GLM-4.7-Flash is an MIT-licensed 30B-A3B MoE with a Z.ai-reported 59.2% SWE-bench Verified; Ollama now lists it as glm-4.7-flash (19 GB, 198K context), and Unsloth’s Q4_K_M is 17.05 GiB. Devstral Small 2 (13.35 GiB, see the 16GB tier) also runs here with 10.65 GiB free for a much longer context.
For all use cases at this level, see the 24GB VRAM complete guide.
32GB VRAM
GPUs: RTX 5090
Winner: Qwen2.5-Coder 32B (Q6) for autocomplete, Qwen3.8-27B for agentic
At 32GB you can run Qwen2.5-Coder 32B at Q6_K (26,886,154,432 bytes, 25.04 GiB, 6.96 GiB free) for autocomplete at a higher precision than Q4. For agentic work, Qwen3.8-27B fits at UD-Q6_K (21,980,441,504 bytes, 20.47 GiB, 11.53 GiB free) or Q8_0 (29,047,086,048 bytes, 27.05 GiB, 4.95 GiB free); Q6_K leaves the more useful context headroom. Devstral Small 2 at Q8_0 (25,055,317,152 bytes, 23.33 GiB, 8.67 GiB free) is the option if you prefer its Apache-licensed 24B weights, keeping its deprecated status in mind, and KAT-Coder-V2.5-Dev at Q6_K (27.99 GiB, 4.01 GiB free) runs at a higher quant than a 24GB card allows.
The stretch: Qwen3-Coder-Next is an 80B / 3B-active MoE, Apache 2.0, 262,144-token context. Its model card publishes benchmarks only as images, so no score is quoted here. It does not fit a 32GB card: Unsloth’s Q4_K_M is 48,528,320,544 bytes (45.20 GiB), because a mixture-of-experts keeps every expert resident regardless of how few are active per token. Running it on a single 32GB card means offloading more than a quarter of the weights to system RAM, which slows generation.
For all use cases at this level, see the 32GB VRAM complete guide.
IDE Integration
Autocomplete with Continue (VS Code / JetBrains)
# Pull your autocomplete model
ollama pull qwen2.5-coder:7b # 8GB tier
ollama pull qwen2.5-coder:14b # 12-16GB tier
ollama pull qwen2.5-coder:32b # 24GB+ tier
Install Continue in VS Code or JetBrains, point it at your local Ollama server (http://localhost:11434), and enable tab autocomplete. Full walkthrough: Self-Host Code Completion with Continue + Ollama.
Autocomplete with Tabby
Tabby is purpose-built for self-hosted completion - model management, codebase indexing for context-aware suggestions, and plugins for VS Code, JetBrains, and Vim. Setup: Self-Host Tabby AI Code Completion.
Agentic coding with Aider
python -m pip install aider-install
aider-install
ollama pull qwen3.8:27b # 24GB+ tier; devstral-small-2:24b on 16GB
OLLAMA_CONTEXT_LENGTH=8192 ollama serve
aider --model ollama_chat/qwen3.8:27b
Aider sends your files to the local model, gets proposed changes, and applies them with git integration. Its Ollama docs recommend the ollama_chat/ prefix over ollama/ and warn that Ollama’s 2k default context window is very small for Aider; the OLLAMA_CONTEXT_LENGTH line above is their example, and on a 24GB card the free room in the tables above allows a larger value. Check the Ollama library for the exact current model tags.
What Local Coding Models Can’t Do (Yet)
- Full repository understanding - they see what you paste in, not your entire codebase. Indexing (Tabby) helps but is not the same as a cloud IDE agent
- Complex multi-file refactoring - models below the 24B-27B class struggle to stay consistent across many files
- Reliable test generation - they generate tests, but the tests often do not compile or test the wrong thing. Always review
- Unfamiliar frameworks - obscure libraries get hallucinated APIs
- Licence traps - most models here are Apache 2.0 or MIT, but Mistral’s older Codestral-22B-v0.1 ships under the MNPL-0.1 non-production licence, and DeepSeek Coder V2 Lite uses DeepSeek’s own model licence; read those before commercial use
From the 24GB tier up, Qwen3.8-27B for agentic work and Qwen2.5-Coder 32B for autocomplete cover most day-to-day coding. Below that, local models are best as a supplement to your own expertise rather than a replacement for it.
All eleven local-AI guides, by hardware tier and by task, are indexed at Local AI by VRAM: Which Models Fit Your GPU.