llmrun

Best local LLMs for coding

Run open-source models locally on your own GPU or Mac to handle code completion, refactoring, and agent tasks. We rank them using the llmrun coding score, offering a top choice for every available VRAM capacity.

Kimi K3.1 Pro

Moonshot AI · Q4_K_M · needs 1.7 TB · up to 1M context · runs on about 3 nodes of 8× H100 SXM 80 GB · from $64.56/hr in the cloud

No memory limit: the best model, whatever memory it needs.

All 130 coding models, no memory limit ↓

Also worth a look

Qwen3 Coder 480B A35B Instructcode model

Q4_K_M · needs 291 GB · about 5× H100 SXM 80 GB · 256K ctx

Best coding model by memory

Highest coding score that fits each size with at least 32K context and 20 t/s, at a Q3 or better quant. Speed is decode tokens per second on that size's reference GPU. The last row has no memory limit: the best model whatever it needs, on the GPU plan shown. Full ranking

Coding models, no memory limit130

Ranked by coding score, models without one after (code specialists first, by SWE-bench Verified). Memory is what the listed quant needs; speed is shown only for models that fit one 48 GB GPU.

130 models

Score: llmrun Score, 100 = average model. Ordered by Score. How ranking works

LLM models ranked by Score, recency and Fit
ModelVRAMScore
Q4_K_M·51.7 t/s
17.8 GB
Q4_K_M·51.7 t/s
17.8 GB
Sage A1.5
Q4_K_M·139.4 t/s
22.0 GB
GigaChat4 37B A4B BF16
Q4_K_M·178.8 t/s
28.6 GB
KAT Coder V2.5 Dev
Q4_K_M·162.6 t/s
21.3 GB
ALoDLM 8B
Q4_K_M·139.1 t/s
7.6 GB
HARP 1B
< 32K context fits
Q4_K_M·1969.2 t/s
0.4 GB
Q4_K_M·228.2 t/s
7.8 GB
Phi 4
< 32K context fits
Q4_K_M·80.7 t/s
12.5 GB
North Mini Code 1.0
Q4_K_M·147.0 t/s
19.4 GB
Sweep Next Edit 1.5B
Q4_K_M·645.4 t/s
1.6 GB
Phi 4 Reasoning
Q4_K_M·80.7 t/s
12.5 GB
Phi 4 Reasoning Plus
Q4_K_M·80.7 t/s
12.5 GB
Qwen3 Coder Next
Q4_K_S·144.0 t/s
45.3 GB
Granite Docling 258M
< 32K context fits
Q4_K_M·1536.0 t/s
0.6 GB

Built for code

Models trained specifically for programming. Most have too few public coding benchmarks for a score yet, so they are listed by what they need and what has been measured.

How much memory do you need for a coding model?

On 8 GB the best coding model is Qwen2.5 Coder 7B Instruct. At 12 GB it is GPT OSS 20B (score 102). From 16 to 32 GB it is Qwen3.8 27B (score 118). With no memory limit, the best is Kimi K3.1 Pro (score 135). Mixture-of-experts models store all weights in memory yet activate only a few billion parameters per token, allowing them to decode far quicker than their total size implies. For code completion inside an editor, speed matters more than reaching the final bits of a high score.

Frequently Asked Questions

What is the best local LLM for coding?

On 24 GB, Qwen3.8 27B is the top pick with a coding score of 118, running at about 46 t/s on RTX 4090. It fits up to 64K tokens of context there. On 8 GB, the best fit is Qwen2.5 Coder 7B Instruct. With no memory limit, the best is Kimi K3.1 Pro. Open a model to see which GPUs and Macs run it.

Can I run a coding model on a laptop or an 8 GB GPU?

Yes. On 8 GB the best pick is Qwen2.5 Coder 7B Instruct (Q4_K_M, 5.8 GB), which runs at about 72 t/s on RTX 5060. Laptops with 8 to 16 GB of memory can run smaller models in the same way.

Are local coding models as good as cloud models?

Top open models today manage daily coding, autocomplete, and refactoring effectively while running offline so your code stays local. Cloud giants still take the lead on complex multi-file jobs.

How do I run these coding models?

Set up Ollama or LM Studio, then pull the desired model. Every model's page provides its installation command alongside details on which GPUs and Macs support it across all quantization levels.