← Back to blog

8 Best Local LLMs for Coding in 2026

When we say "local LLMs for coding," we mean models you can run on your own laptop, Mac, or gaming PC — no API calls, no cloud, no sending your proprietary codebase to a third party. This ranking is the 8 open-weights coding models currently worth running in 2026, compared on published HumanEval scores, file size at Q4, and licence. For the broader ranking that includes hosted proprietary models (Claude 3.5 Sonnet, GPT-4o, Gemini), see our 15 Best LLMs for Coding roundup.

Short version: Qwen 2.5 Coder 32B has the highest HumanEval pass@1 on this list (92.7%), if you have the hardware. Qwen 2.5 Coder 14B is our pick for a 16 GB laptop. Qwen 2.5 Coder 1.5B is the only sub-2B model on this list. Jump to the table. Want to drive these from the Claude Code CLI? See Use Claude Code with local models.

Best local LLM for coding: quick picks by hardware

8 GB MacBook Air: Qwen 2.5 Coder 7B (88.4% HumanEval pass@1 for the Instruct model in the Qwen2.5-Coder report, 4.7 GB at Q4_K_M, Apache 2.0). 16 GB laptop: Qwen 2.5 Coder 14B (89.6% HumanEval pass@1 for the Instruct model in the Qwen2.5-Coder report, 9.0 GB at Q4_K_M, Apache 2.0). Workstation / 48 GB Mac: Qwen 2.5 Coder 32B (92.7% HumanEval pass@1 for the Instruct model, ~20 GB at Q4, above both Claude 3.5 Sonnet versions in the comparison table of the Qwen2.5-Coder report). iPhone / small: Phi-3.5 Mini (62.8% HumanEval pass@1 from 3.8B in Microsoft's model card, 2.4 GB) or Qwen 2.5 Coder 1.5B. Sources are linked in the summary table below.

PocketLLM is launching soon. Private, on-device AI, starting on iPhone, with more platforms planned. No account required, no in-app tracking, and chat processing stays on your device. Join the launch list and be first in.

One email, the day it launches. No spam, no drip.

How we compared

HumanEval pass@1 figures in the summary table are the values that each publisher reports for the named model version, linked in each row. A head-to-head comparison in the text uses one source that reports both models. File sizes at Q4 and minimum RAM are approximate, and licences come from each model's repository. The models are ordered by the HumanEval pass@1 figure in the summary table; a tie keeps the earlier order. The picks by hardware are our editorial judgement.

  • HumanEval pass@1: Standard benchmark, from the model's primary source. A rough tier indicator, not a substitute for trying it on your own code.
  • File size: At Q4 quantization. The whole point of local is "fits on your machine."
  • License: Apache and MIT rank highest, non-commercial licences lower.
  • Ecosystem: Whether working llama.cpp, Ollama, MLX and Core ML conversions exist, which decides whether you can actually run it.

The 8 best local coding LLMs in 2026

1. Qwen 2.5 Coder 32B

The highest HumanEval score on this list. 92.7% HumanEval pass@1 for Qwen2.5-Coder-32B-Instruct in the Qwen2.5-Coder technical report, Apache 2.0, 32B parameters fitting in ~20 GB at Q4. Needs a workstation (Mac Studio, multi-GPU PC, or a 48 GB MacBook Pro M3 Max), but for that investment you get coding help that scores above both Claude 3.5 Sonnet versions on HumanEval in Table 16 of the same report (92.7% vs 89.0% and 92.1%). The right answer if your code is confidential and your budget allows workstation hardware.

2. Qwen 2.5 Coder 14B

Our pick for a 16 GB laptop. The middle rung of the Qwen 2.5 Coder ladder. 89.6% HumanEval pass@1 for Qwen2.5-Coder-14B-Instruct in the Qwen2.5-Coder report, a 9.0 GB Q4_K_M file, Apache 2.0. Fits on a 16 GB laptop with room to spare. Ahead of DeepSeek Coder V2 Lite on HumanEval in the same report's table (89.6% vs 81.1%), with cleaner licensing and a simpler dense-transformer architecture.

3. Qwen 2.5 Coder 7B

Runs on an 8 GB MacBook Air (tight fit) or comfortably on 16 GB. 88.4% HumanEval pass@1 for Qwen2.5-Coder-7B-Instruct in the Qwen2.5-Coder report, Apache 2.0, 4.7 GB at Q4_K_M. Our pick for an 8 GB laptop such as an M2 MacBook Air.

4. DeepSeek Coder V2 Lite 16B

The alternative for a 16 GB laptop. Mixture-of-experts architecture: only 2.4B parameters active per token, and DeepSeek reports 81.1% HumanEval pass@1 for DeepSeek-Coder-V2-Lite-Instruct in its paper. The Q4_K_M file is 10.4 GB, larger than the Qwen 2.5 Coder 14B file. The license is custom DeepSeek terms — permissive for most uses but read before commercializing.

5. Mistral Codestral 22B

Mistral's dedicated coding model. Strong on Python and TypeScript, reasonable on other languages. The Mistral AI Non-Production License is restrictive, so check it carefully if you're using it for work product. Its Q4_K_M file is 13.3 GB, and it runs on a 24 GB+ Mac.

6. StarCoder 2 15B

Hugging Face + ServiceNow + NVIDIA's jointly developed coding model. Trained on permissively licensed code, which matters if you're worried about "what did this model learn from" provenance questions. Behind Qwen and DeepSeek on HumanEval in Qwen's comparison table.

7. Qwen 2.5 Coder 1.5B

The smallest dedicated coding model on this list. 70.7% HumanEval pass@1 for Qwen2.5-Coder-1.5B-Instruct at 1.5B parameters (Qwen2.5-Coder report). Apache 2.0. 0.99 GB at Q4_K_M (GGUF build). Perfect as a fast local completion model for inline suggestions, or as a draft model for speculative decoding in front of a larger coder.

8. Phi-3.5 Mini 3.8B

Not a dedicated coding model, but punches above its weight. Microsoft's model card reports 62.8% HumanEval pass@1 for Phi-3.5-mini-instruct, close to Llama-3.1-8B-Instruct (66.5%) in the same table. MIT license, 2.4 GB at Q4, small enough to run on a phone. PocketLLM lists Phi-4 Mini in Pro for its iPhone launch. Join the launch list.

The summary table

#ModelSize (Q4)Min RAMLicenseHumanEval pass@1 (source)
1Qwen2.5-Coder-32B-Instruct20 GB32 GBApache 2.092.7% (Qwen2.5-Coder report)
2Qwen2.5-Coder-14B-Instruct9.0 GB16 GBApache 2.089.6% (Qwen2.5-Coder report)
3Qwen2.5-Coder-7B-Instruct4.7 GB8 GBApache 2.088.4% (Qwen2.5-Coder report)
4DeepSeek-Coder-V2-Lite-Instruct (16B)10.4 GB16 GBDeepSeek81.1% (DeepSeek-Coder-V2 paper)
5Mistral Codestral 22B13.3 GB24 GBMistral AI Non-Production License81.1% (Mistral model card)
6StarCoder2-15B-Instruct-v0.19.86 GB (Q4_K_M GGUF)16 GBBigCode OpenRAIL72.6% (BigCode model card)
7Qwen2.5-Coder-1.5B-Instruct0.99 GB (Q4_K_M GGUF)2 GBApache 2.070.7% (Qwen2.5-Coder report)
8Phi-3.5-mini-instruct (3.8B)2.4 GB4 GBMIT62.8% (Microsoft model card)

Which local coding LLM should you run?

Mac Studio / workstation PC (32 GB+): Qwen 2.5 Coder 32B.

16 GB MacBook Pro / gaming laptop: Qwen 2.5 Coder 14B. It scores above DeepSeek Coder V2 Lite on HumanEval (89.6% vs 81.1%), and its Q4_K_M file is smaller (9.0 GB vs 10.4 GB).

8 GB MacBook Air: Qwen 2.5 Coder 7B. Tight but usable. Close everything else when you're running it.

iPhone or older Mac: Phi-3.5 Mini or Qwen 2.5 Coder 1.5B. You're not going to one-shot a Rails app, but you will get help understanding and modifying existing code. PocketLLM lists Phi-4 Mini and Qwen 2.5 Coder 1.5B in Pro for its iPhone launch.

License-sensitive commercial deployment: Stick to the Qwen 2.5 Coder family — Apache 2.0 allows commercial use without the custom terms of the DeepSeek and Mistral licences.

How to actually run these

On Mac: install LM Studio or Ollama, pick the model from the catalog, click Download. See Ollama vs LM Studio vs PocketLLM. On Linux with a GPU: llama.cpp compiled from source, or Ollama. On iPhone: a native on-device app — see our iPhone app roundup.

Integrating these with your editor is a separate question and worth a post of its own. The short version: Continue.dev, Cody, and Cursor-style plugins all support Ollama or an OpenAI-compatible localhost endpoint, which covers every model on this list.

The quick answer

On the cited HumanEval figures, the best local LLM for coding in 2026 is Qwen 2.5 Coder — at whatever size your hardware can run. 32B if you have a workstation, 14B on a gaming laptop, 7B on a cheap laptop, 1.5B on a phone. DeepSeek Coder V2 Lite is the one alternative on 16 GB: its MoE architecture uses only 2.4B active parameters per token, but Qwen's comparison table puts Qwen2.5-Coder-14B-Instruct ahead on HumanEval (89.6% vs 81.1%). Everything else on this list is a specialist.

Local coding assistance on your iPhone.

PocketLLM is built to package Phi-4 Mini and Qwen 2.5 Coder 1.5B as one-tap downloads. Private, fast, no account. Coming soon — join the launch list.

One email, the day it launches. No spam, no drip.