Local AI Coding Assistant: Run Your Own Copilot
Written by Jakub Rusinowski · Last updated 2026-08-04 · Hardware figures computed by our VRAM engine
A local AI coding assistant is three choices: a model (Qwen3-Coder, Devstral-2, Qwen 3.6 — picked by your VRAM), a tool (Continue for Copilot-style assist, Cline or Aider for autonomous agents, Tabby for teams), and the hardware to serve it. This hub covers all three, with every hardware figure computed by the same engine as our GPU checker.
Coding is the local-AI use case where the argument is strongest — code is the data companies least want leaving the building, coding assistants are subscription products you can actually replace, and 2026's open coding models are good enough that the replacement isn't a downgrade for everyday work.
It's also where hardware questions get sharpest. An autocomplete model must answer in milliseconds; an agentic model must hold a repo's worth of context; both must fit your VRAM at once. The guides below are organized so you can enter anywhere — by model, by tool, or by hardware — and each one links the others.
One cluster deserves calling out. Beyond picking a model and a tool there is the layer everyone discovers second: the loop the agent runs in, and the harness that runs it. On a frontier API you can get away with ignoring both. On your own GPU they are where most of the quality is — a verifier command, a raised context window and a rules file routinely move results further than a model-tier upgrade, and they cost no VRAM at all. That's the *Agent engineering* section.
The stack in 30 seconds
| Model | VRAM (Q4) | Runs on | Context | License |
Qwen3-Coder 8B Entry (8 GB GPU) — Current-gen coder + autocomplete on any modern GPU or 16 GB Mac.
ollama pull qwen3-coder:8b | 5.6 GB | 8 GB GPU (RTX 3060/4060) Mac: 16 GB unified | 125K | Apache-2.0 |
Devstral-2 22B Mid (16 GB GPU) — 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 |
Qwen 3.6 27B Sweet spot (24 GB GPU) — The realistic daily driver for local agentic coding on a 3090/4090.
ollama pull qwen3.6:27b | 17.6 GB | 24 GB GPU (RTX 3090/4090) Mac: 24 GB unified | 256K | Apache-2.0 |
Qwen3-Coder 80B-A3B (MoE) Workstation / Mac 96 GB+ — ~96% of the open flagship’s quality, self-hostable, fast MoE.
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 guides
Start here
Pick a model, pick a tool, get something running today.
Hardware, speed & cost
What your card runs, what to buy, and why the agent feels slow.
Agent engineering
The loop, the harness, the context and the tools — where local setups gain the most.
Run it safely, prove it works
Sandboxing, evaluation, and the read-only use case local models excel at.
Hands-on: specific models & tools
Per-tool and per-model setup, with the settings that actually matter.
- Run Qwen3-Coder Locally: 8B, 80B-A3B, and the 480B Question — The 8B, the 80B-A3B, the expert-offload trick, and when to just use the API for the 480B.
- Aider with Local Models: Setup and the Models That Actually Work — The terminal pair programmer on Ollama — config, context, and the models that follow its edit formats.
- Cline with Local Models: What Actually Works (and What Doesn’t) — The VS Code agent on local models — the context-window fix and the honest capability tiers.
- Terminal Coding Agents on Local Models: OpenCode, Qwen Code, Aider & Friends — OpenCode, Qwen Code and Aider pointed at your own GPU — config, model picks and honest limits.
Frequently asked questions
Can I really replace GitHub Copilot with a local model?
For autocomplete, chat, and inline edits — yes: Continue.dev plus a FIM-tuned local model (Qwen3-Coder, StarCoder2) reproduces the Copilot experience offline, and on a 16–24 GB GPU the quality gap has become marginal for mainstream languages. Frontier cloud models still lead on the hardest multi-file agent tasks, which is why many developers run local-first with an API fallback.
What hardware do I need for a local coding assistant?
Entry: any 8 GB GPU or a 16 GB Apple Silicon Mac runs Qwen3-Coder 8B plus autocomplete. Sweet spot: a 24 GB card (RTX 3090/4090) runs Qwen 3.6 27B — the tier where local agentic coding gets genuinely good. Workstation: 2×24 GB or a 96–128 GB Mac runs Qwen3-Coder 80B-A3B. Check your exact GPU with our free compatibility checker.
Which tool should I use: Continue, Cline, Aider, or Tabby?
Continue if you want a Copilot replacement (autocomplete + chat in VS Code/JetBrains). Cline if you want an autonomous agent that plans and edits multiple files. Aider if you live in the terminal and want git-native agent workflows. Tabby if you are provisioning one self-hosted server for a whole team. They are not mutually exclusive — Continue + Cline is a common pairing.
What is the best local coding model right now?
Per hardware tier: Qwen3-Coder 8B on 8 GB, Devstral-2 22B on 16 GB, Qwen 3.6 27B or Qwen 2.5 Coder 32B on 24 GB, and Qwen3-Coder 80B-A3B at workstation scale. The open frontier (DeepSeek V4-Pro, GLM, Kimi K2) is stronger still but needs datacenter hardware — see our dated Report #2 for the full landscape.
What is loop engineering, and why does it matter more for local models?
Loop engineering is designing the cycle an agent runs in — act, observe the result, check it against an objective condition such as a test suite or type check, then retry or stop — instead of prompting step by step. It matters disproportionately on local hardware because the deterministic check supplies the judgement a 22–32B model lacks, and local iterations cost time rather than money. Adding one test-command gate to an existing setup is usually a larger quality jump than moving up a model tier.
What is an agent harness?
The software layer around the model that makes it an agent: it assembles the prompt, parses output into tool calls, executes them, compacts context as the window fills, enforces permissions and persists state. The same open weights behave very differently under different harnesses, which is why model cards state which one produced their benchmark score. Locally the harness is the half you can still improve after your VRAM is fixed.
Is a local coding assistant cheaper than Copilot or Cursor?
If you already own a capable GPU — immediately: electricity for all-day coding inference is a few dollars a month versus $10/month (Copilot Pro) or $20/month (Cursor Pro) indefinitely. If you are buying hardware for it, a used RTX 3090 pays back against a Cursor subscription in roughly three years — so buy for the privacy and control, and treat the subscription savings as a bonus.
Keep going