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.

Qwen3.8 27B

Alibaba · Q4_K_M · 17.9 GB · up to 256K context · on RTX 5090

82.3 t/s
S

All 42 coding models for 32 GB ↓

Also worth a look

Qwen3 Coder 30B A3B Instructcode model

Q4_K_M · 19.4 GB · 181.4 t/s · 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 that run on 32 GB42

Ranked by coding score, models without one after (code specialists first, by SWE-bench Verified). Best quant that fits with a 16K context; speed is decode tokens per second on the reference GPU.

42 models · 42 run great

Score: llmrun Score, 100 = average model. Fit: how well it runs on this hardware, S best to F won't fit. Ordered by Score, recency and Fit. How ranking works

Showing compatibility for NVIDIA GeForce RTX 5090

LLM models compatible with NVIDIA GeForce RTX 5090 — ranked by Score, recency and Fit
ModelVRAMScoreFit
ALoDLM 8B
Q4_K_M·259.7 t/s
7.6 GBS100, Runs great
Phi 4
< 32K context fits
Q4_K_M·150.6 t/s
12.5 GBS97, Runs great
North Mini Code 1.0
Q4_K_M·179.3 t/s
19.4 GBS99, Runs great
Q4_K_M·289.6 t/s
7.8 GBS100, Runs great
Phi 4 Reasoning
Q4_K_M·150.6 t/s
12.5 GBS97, Runs great
Granite Docling 258M
< 32K context fits
Q4_K_M·2867.2 t/s
0.6 GBS100, Runs great
Yi Coder 9B Chat
Q4_K_M·247.2 t/s
7.2 GBS100, Runs great
< 32K context fits
Q4_K_M·68.4 t/s
23.8 GBS85, Runs great
Qwen2.5 Coder 14B Instruct
Q4_K_M·150.0 t/s
12.4 GBS97, Runs great
Qwen2.5 Coder 7B Instruct
Q4_K_M·287.3 t/s
5.8 GBS100, Runs great
Mellum2 12B A2.5B Instruct
Q4_K_M·289.6 t/s
7.8 GBS100, Runs great
Phi 3.5 MoE Instruct
Q4_K_M·179.8 t/s
27.6 GBS91, Runs great
Phi 4 Mini Reasoning
Q4_K_M·499.5 t/s
4.8 GBS100, Runs great
Phi 4 Mini Instruct
Q4_K_M·499.5 t/s
4.8 GBS100, Runs great
Mellum2 12B A2.5B Thinking
Q4_K_M·289.6 t/s
7.8 GBS100, Runs great

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.