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.

GPT OSS 20B

OpenAI · Q3_K_L · 11.3 GB · up to 32K context · on RTX 5070

161.9 t/s
C

All 53 coding models for 12 GB ↓

Also worth a look

Qwen2.5 Coder 7B Instructcode model

Q4_K_M · 5.8 GB · 107.7 t/s · 32K 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 12 GB53

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.

53 models · 38 run great · 1 run well

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 5070

LLM models compatible with NVIDIA GeForce RTX 5070 — ranked by Score, recency and Fit
ModelVRAMScoreFit
Qwen2.5 Coder 1.5B Instruct
Q4_K_M·420.0 t/s
1.7 GBS100, Runs great
< 32K context fits
Q4_K_M·158.1 t/s
9.0 GBS97, Runs great
Qwen2.5 Coder 14B Instruct
< 32K context fits
Q4_K_S·59.7 t/s
11.8 GBC44, Usable
CodeQwen1.5 7B
Q4_K_M·112.5 t/s
5.7 GBS94, Runs great
Codegemma 7B IT
Q4_K_M·95.5 t/s
8.2 GBS90, Runs great
Codegemma 2B
Q4_K_M·325.8 t/s
3.5 GBS100, Runs great
< 32K context fits
Q4_K_M·98.6 t/s
6.5 GBS91, Runs great
< 32K context fits
Q4_K_M·356.0 t/s
4.3 GBS100, Runs great
Phi 3 Medium 4k Instruct
< 32K context fits
Q4_K_M·59.1 t/s
9.5 GBA83, Runs well
Qwen2.5 Coder 3B
Q4_K_M·241.1 t/s
2.8 GBS100, Runs great
Q4_K_M·181.7 t/s
10.2 GBS92, Runs great
< 32K context fits
Q4_K_S·62.7 t/s
11.5 GBB60, Decent
Qwen2.5 Coder 7B
Q4_K_M·107.7 t/s
5.8 GBS93, Runs great
< 32K context fits
IQ3_M·121.9 t/s
11.9 GBC44, Usable
Qwen2.5 Coder 1.5B
Q4_K_M·420.0 t/s
1.7 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.