Best Local LLMs for Aider
Terminal AI pair-programmer with its own edit-format leaderboard
Aider is a terminal AI pair-programmer that edits files in your local git repo and auto-commits. It drives models through structured edit formats, whole (rewrite the file) and diff (search/replace), and publishes its own leaderboard ranking models by how reliably they produce correct edits. For local open-weight models, the whole format is almost always the right call, and Qwen2.5-Coder dominates the open-weight rankings.
- Best pick
- Qwen2.5 Coder 14BBest practical local Aider pick: tops the open-weight edit leaderboard for its size, fits consumer hardware.
- What Aider needs
- Reliably emitting a correct, parseable edit format. For local models that means the whole-file format, since they frequently break diff search/replace blocks.
Aider local LLM tier list
12 models| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| Qwen2.5 Coder 14B | 14B | 16GB | Best practical local Aider pick: tops the open-weight edit leaderboard for its size, fits consumer hardware. |
| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| Qwen3.5 35B-A3B Instruct | 35B | 32GB | Large Qwen3.x MoE; strong coding quality in whole/no-think mode. | |
| Qwen3.6 35B-A3B | 35B | 32GB | Newest large Qwen3.x MoE, top-tier local quality at MoE-efficient speed. | |
| Qwen3.5 27B Instruct | 27B | 24GB | Dense large Qwen3.x; good edit-following for a single-host local model. | |
| Qwen3 30B | 30B | 32GB | Earlier Qwen3 MoE; a usable local coder in whole/no-think config. |
| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| Qwen2.5 Coder 7B | 7B | 8GB | Mid-50s% on Aider's edit leaderboard (whole); workable on low RAM, weaker on big multi-file edits. | |
| DeepSeek-R1 Distill Qwen 14B | 14B | 16GB | DeepSeek is Aider's strongest open family; this distill brings it to 14B (budget for reasoning tokens). | |
| Llama 3.3 70B Instruct | 70B | 64GB | Capable 70B; mid-to-high-50s% (whole) but no edit-format specialization. | |
| Mistral Small 22B | 22B | 32GB | Solid general coder in whole format; behind the Qwen Coders. |
| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| Gemma 3 27B Instruct | 27B | 32GB | Gemma scores very low on Aider's edit leaderboard; weak edit-following. | |
| Llama 4 Scout | 109B | 96GB | Llama 4 class scored poorly (~15% whole) on the leaderboard. | |
| Phi-4 14B | 14B | 24GB | Decent reasoning but inconsistent edit-format adherence. |
Tiers weigh tool-calling reliability, context window, and coding quality for Aider specifically. A model can rank higher for one tool than another. RAM figures are for Q4 quantization. Sources are listed below.
Local setup notes
Use the ollama_chat/<model> prefix and raise num_ctx (Ollama defaults to a tiny 2K window that truncates Aider's prompts; set 32K-64K). For open-weight models, configure the whole edit format in .aider.model.settings.yml.
Get told when a better model fits your MacBook Air M5 16 GB
Get one email when a new open-weight model is a better fit for this machine.
For: MacBook Air M5 16 GB
You'll also get the weekly ModelFit email. By signing up you agree to our Privacy Policy. Unsubscribe from either email anytime, in one click.
Frequently asked questions
What is the best local model for Aider?
Should local models use diff or whole edit format in Aider?
Why does Aider give wrong answers with my local model?
Sources
Other AI coding tools
- Claude CodeAnthropic's terminal coding agent, driven by a local modelCLI agent
- OpenCodeOpen-source terminal coding agent (Ollama / OpenAI-compatible)CLI agent
- OpenClawSelf-hosted agentic assistant with first-class Ollama supportSelf-hosted agent
- ClineAutonomous coding agent for VS Code (formerly Claude Dev)IDE extension
- Roo CodeAutonomous VS Code agent with modes (a Cline fork)IDE extension
- Continue.devOpen-source chat, edit & autocomplete for VS Code / JetBrainsIDE extension
- GooseBlock's open-source autonomous developer agent (MCP-driven)CLI agent
- Open Claude CodeOpen-source Claude Code CLI reimplementation, with an undocumented endpoint override for local modelsCLI agent
- CodexOpenAI's coding agent, driven by a local model via its built-in Ollama providerCLI agent