A>Terminal pair-programmer· 12 models ranked

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.

Aider — ModelFit

Best pick

Qwen2.5 Coder 14B

Best 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

SS — Best in class
Qwen2.5 Coder 14B14B· 22GB RAM

Best practical local Aider pick — tops the open-weight edit leaderboard for its size, fits consumer hardware.

AA — Strong, reliable
Qwen3.5 35B-A3B Instruct35B· 24GB RAM

Large Qwen3.x MoE; strong coding quality in whole/no-think mode.

Qwen3.6 35B-A3B35B· 24GB RAM

Newest large Qwen3.x MoE — top-tier local quality at MoE-efficient speed.

Qwen3.5 27B Instruct27B· 20GB RAM

Dense large Qwen3.x; good edit-following for a single-host local model.

Qwen3 30B30B· 28GB RAM

Earlier Qwen3 MoE; a usable local coder in whole/no-think config.

BB — Usable with caveats
Qwen2.5 Coder 7B7B· 10GB RAM

Mid-50s% on Aider's edit leaderboard (whole); workable on low RAM, weaker on big multi-file edits.

DeepSeek-R1 Distill Qwen 14B14B· 22GB RAM

DeepSeek is Aider's strongest open family; this distill brings it to 14B (budget for reasoning tokens).

Llama 3.3 70B Instruct70B· 48GB RAM

Capable 70B; mid-to-high-50s% (whole) but no edit-format specialization.

Mistral Small 22B22B· 26GB RAM

Solid general coder in whole format; behind the Qwen Coders.

CC — Works, but not recommended
Gemma 3 27B Instruct27B· 28GB RAM

Gemma scores very low on Aider's edit leaderboard; weak edit-following.

Llama 4 Scout109B· 80GB RAM

Llama 4 class scored poorly (~15% whole) on the leaderboard.

Phi-4 14B14B· 22GB RAM

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.

Aider official site ↗

The weekly local-AI refresh

New open-weight models, real Apple Silicon benchmarks, and the one model worth running on your Mac this week. Free, one email a week, unsubscribe anytime.

Frequently Asked Questions

What is the best local model for Aider?+
Qwen2.5-Coder is the strongest open-weight family on Aider's leaderboard. The 14B (and 32B if you have the RAM) is the most reliable local pick, topping open-weight edit accuracy in the whole-file format.
Should local models use diff or whole edit format in Aider?+
Use whole for local open-weight models. Aider's own testing shows whole beats diff for every variant, and local models frequently fail to negotiate diff and silently fall back, breaking search/replace edits.
Why does Aider give wrong answers with my local model?+
Usually the context window. Ollama defaults to a 2K window that truncates Aider's prompts; set num_ctx (e.g. 32768–65536) in .aider.model.settings.yml and use the ollama_chat/ prefix.

Sources

Other AI Coding Tools

Explore More