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.
Table 1Tier list

Aider local LLM tier list

12 models
SS: Best in class1
ModelSizeRAMWhyRun
Qwen2.5 Coder 14B14B16GBBest practical local Aider pick: tops the open-weight edit leaderboard for its size, fits consumer hardware.
AA: Strong, reliable4
ModelSizeRAMWhyRun
Qwen3.5 35B-A3B Instruct35B32GBLarge Qwen3.x MoE; strong coding quality in whole/no-think mode.
Qwen3.6 35B-A3B35B32GBNewest large Qwen3.x MoE, top-tier local quality at MoE-efficient speed.
Qwen3.5 27B Instruct27B24GBDense large Qwen3.x; good edit-following for a single-host local model.
Qwen3 30B30B32GBEarlier Qwen3 MoE; a usable local coder in whole/no-think config.
BB: Usable with caveats4
ModelSizeRAMWhyRun
Qwen2.5 Coder 7B7B8GBMid-50s% on Aider's edit leaderboard (whole); workable on low RAM, weaker on big multi-file edits.
DeepSeek-R1 Distill Qwen 14B14B16GBDeepSeek is Aider's strongest open family; this distill brings it to 14B (budget for reasoning tokens).
Llama 3.3 70B Instruct70B64GBCapable 70B; mid-to-high-50s% (whole) but no edit-format specialization.
Mistral Small 22B22B32GBSolid general coder in whole format; behind the Qwen Coders.
CC: Works, but not recommended3
ModelSizeRAMWhyRun
Gemma 3 27B Instruct27B32GBGemma scores very low on Aider's edit leaderboard; weak edit-following.
Llama 4 Scout109B96GBLlama 4 class scored poorly (~15% whole) on the leaderboard.
Phi-4 14B14B24GBDecent 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.

Setup

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.

FAQ

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

Sources

Directory

Other AI coding tools

Related

Explore more