LListicle

Best Local LLMs for Coding (2026)

By pickwiseUpdated

The best local LLM for coding depends on how much memory your machine has. This list ranks open-weight models you can run yourself, by independent benchmark runs and by developers who use them in coding agents.

What we track: Memory needed · Size · Context window
Memory needed:
How much RAM or VRAM the model used when someone ran it, with the quantization and machine named.
Size:
Parameter count. For mixture-of-experts models, the active count sets the speed.
Context window:
The most tokens it can read at once. Long contexts need much more memory.

These numbers inform the order but don’t set it: an editor ranks the picks, weighing them against what people who use them say, since stars and downloads also reflect hype and marketing.

  1. The model most local-coding write-ups now start from. Piotr Migdał at Quesma found the 17 GB 4-bit file matched the full 55 GB model on Terminal-Bench 2.1, and Simon Willison drove the Pi coding agent with it on a 128 GB M5 Max MacBook Pro and an NVIDIA DGX Spark. The catch is speed: Willison saw 15 to 30 tokens a second, and it thinks at its highest effort by default, so turn reasoning down first.

    Maker
    Alibaba (Qwen team)
    License
    Apache 2.0
    Runs in
    Ollama 0.32.12 or newer, LM Studio, llama.cpp (update it first)
  2. For a 128 GB machine. It posted the best result in WonderRico's benchmark, 97 of 100 SWE-bench Verified tasks, on a single 96 GB RTX PRO 6000. Deepu K Sasidharan writes most of his Rust code with it on a 128 GB ASUS ROG Flow Z13 at about 46 tokens a second, though one feature took 130 minutes against 18 for Claude Opus. It is labelled an experimental preview, and its license is not Apache.

    Maker
    Alibaba (Qwen team)
    License
    Qwen Community License 1.0; hosted-model and AI-assistant vendors need a deal
    Runs in
    llama.cpp, vLLM, SGLang; Ollama has only a 105 GB MLX build for Macs
  3. Georgi Gerganov, who wrote llama.cpp, said he used this almost daily for maintainer chores, at 100 to 150 tokens a second on an RTX 5090 and about 40 on an M2 Ultra. It is the older sibling of Qwen3.8-27B, with the same size and memory needs. On a Mac Studio M3 Ultra, TerminalBytes measured it at twice the newer model's speed in Ollama, which is the reason to still pick it.

    Maker
    Alibaba (Qwen team)
    License
    Apache 2.0
    Runs in
    Ollama (qwen3.6:27b, 18 to 19 GB), LM Studio, llama.cpp, vLLM
  4. Google's largest open model is the one to try if you would rather not run a Qwen. In WonderRico's benchmark it scored 67 to 73 of 100 and needed fewer requests per solved task than most local models. Incept5's test on an Apple Silicon Mac had it ahead of Qwen3.5-27B, 59.4% to 42.2%. Its tool calling was broken at launch and fixed later, so use current files and a current runtime.

    Maker
    Google DeepMind
    License
    Apache 2.0
    Runs in
    Ollama (gemma4:31b), LM Studio, llama.cpp, vLLM
  5. The fast one. It computes with only 3B of its 35B parameters per token, so it answers quickly on Macs and older cards. Red Hat's Coding Agent Bench ran it through all 500 SWE-bench Verified tasks: 65% with the Pi agent and 54.8% with OpenCode, same weights. WonderRico scored it 60 of 100, below the dense 27B models, and found this kind of model loses more when compressed.

    Maker
    Alibaba (Qwen team)
    License
    Apache 2.0
    Runs in
    Ollama (qwen3.6:35b, 23 to 24 GB), LM Studio, llama.cpp, vLLM
  6. Meta built this one for agents and tool use, not for code alone. WonderRico scored it 73 to 76 of 100, level with Qwen3.6-27B, but it needed about twice as many requests to get there. In rickyzzzzz's test on an M1 Max with 64 GB it passed 24 of 30 agent tasks where Qwen3.8-27B passed all 30. Hacker News user pram uses it as the agent that explores a codebase and leaves the coding to Qwen.

    Maker
    Meta Superintelligence Lab
    License
    Apache 2.0
    Runs in
    Ollama (muse-glimmer:30b, 18 GB), LM Studio, llama.cpp
  7. The pick for a 16 GB graphics card, because it fits whole. Abhinav Raj at XDA used it for a week on a 16 GB RTX 4070 Ti Super and it found and explained all three planted bugs, where Qwen3-Coder 30B and Devstral Small 2 did not. Rost Glukhov measured 139.93 tokens a second on an RTX 4080. It dates from August 2025 and takes text only, and some developers now consider it outclassed by newer Qwen models.

    Maker
    OpenAI
    License
    Apache 2.0
    Runs in
    Ollama (gpt-oss:20b, 14 GB), LM Studio, llama.cpp, vLLM
  8. Speed is the reason to choose it. George Liu got 51 tokens a second on a 14-inch MacBook Pro M4 Pro with 48 GB and wired it into Claude Code, where he says it slowed down noticeably. For agent work the results are weaker: WonderRico scored it 54 of 100 and called it fast but quite poor. Developers on Hacker News rate it higher for writing, SQL and PHP than for long coding sessions.

    Maker
    Google DeepMind
    License
    Apache 2.0
    Runs in
    Ollama (gemma4:26b), LM Studio, llama.cpp
  9. Only for big machines. WonderRico ran compressed builds across three GPUs with 192 GB of VRAM and got 90 to 92 of 100, second only to Qwen3.8-Flash-Next. Hemant Kumar at TerminalBytes puts the need at roughly 100 to 170 GB of memory, so a 256 GB Mac Studio holds it. The smallest file WonderRico tested, at 2 bits, is 96.8 GB. It takes text only, and a newer V4.1 Flash is larger.

    Maker
    DeepSeek
    License
    MIT
    Runs in
    llama.cpp (GGUF), vLLM
  10. What to run when you have 8 GB. Rost Glukhov measured 90.89 tokens a second with all of it on a 16 GB RTX 4080, and Hacker News users name it for small tasks and as a helper model inside the Pi agent. Keep the jobs short. One user who tried it for coding gave up after it kept getting stuck rethinking the same step, and no independent test here shows it finishing long agent sessions.

    Maker
    Alibaba (Qwen team)
    License
    Apache 2.0
    Runs in
    Ollama (qwen3.5:9b, 6.6 to 7.6 GB), LM Studio, llama.cpp
  11. A small model that reads images and audio as well as code, in a 7 GB file from Google. Hacker News user dofm, who runs it on an M1 Max, calls it quite good at coding jobs but weaker on nuance and not suited to long agent sessions. Another user found Gemma 4 models looping until he went back to the chat template Google first shipped. Use it for snippets, reviews and screenshots.

    Maker
    Google DeepMind
    License
    Apache 2.0
    Runs in
    Ollama (gemma4:12b, 7.7 to 8.0 GB), LM Studio, llama.cpp
  12. An MIT-licensed alternative in the 24 GB class. Hacker News user kamranjon ran it as a main model for months and calls it tenacious and very fast. It does not fit a 16 GB card: Rost Glukhov saw it load at 21 GB on an RTX 4080 with 27% spilling to the CPU, at 33.86 tokens a second. Another user who has run it locally says it was far behind the best models even at launch.

    Maker
    Z.ai
    License
    MIT
    Runs in
    Ollama (glm-4.7-flash, 19 GB), LM Studio, llama.cpp, vLLM, SGLang

How to choose

With 24 to 32 GB, start with Qwen3.8-27B. Its 17 GB 4-bit file matched the full model on Terminal-Bench 2.1 in Quesma's test. With 128 GB of unified memory, Qwen3.8-Flash-Next posted the top score in WonderRico's benchmark. With 16 GB, gpt-oss-20b fits whole on the card, and one developer reports useful work from a 2-bit Qwen3.8-27B. With 8 GB, try Qwen3.5-9B and keep the jobs small. At 64 GB, run the 27B models at 8-bit, a 29 GB file, with a longer context. The step above that needs about 100 GB.

A coding agent only works if the model emits tool calls your server can parse. Gemma 4 shipped with broken tool calling that was fixed later, and Qwen chat templates have needed community fixes, so update Ollama, LM Studio or llama.cpp before blaming the model. Agents also need room: LM Studio loads models with an 8,192-token context unless you raise it.

Scores on a model card are the maker's own. A mixture-of-experts model computes with a few billion parameters per token but still has to hold all of them in memory, and context takes memory on top of the file. Qwen3.8 thinks at its highest effort by default, which is slow on home hardware. Qwen3.8-Flash-Next is not Apache licensed. Older guides still recommend Qwen2.5-Coder, Qwen3-Coder and Devstral, which general-purpose models beat in the hands-on tests cited here.

The list is ordered by how many independent testers and developers recommend each model for coding, then by downloads.

Numbers checked October 11, 2026.

More lists like this