Coding BenchmarkVerified 45 days ago
Local Model Coding Benchmark
Compared quantized local models running through Ollama on real coding tasks: refactoring, bug fixing, and test generation.
qwen3.5:9b, qwen2.5-coder:14b, llama3.2:3b, deepseek-r1:14bLocal (Ollama)2026-06-14
Winner:qwen2.5-coder:14b
Results dashboard
Overall score
qwen2.5-coder:14b
87
deepseek-r1:14b
81
qwen3.5:9b
74
llama3.2:3b
52
Time to complete
qwen2.5-coder:14b
6
deepseek-r1:14b
9
qwen3.5:9b
4
llama3.2:3b
3
Tokens used
qwen2.5-coder:14b
0
deepseek-r1:14b
0
qwen3.5:9b
0
llama3.2:3b
0
Approximate cost
qwen2.5-coder:14b
$0.00
deepseek-r1:14b
$0.00
qwen3.5:9b
$0.00
llama3.2:3b
$0.00
Results table
| Agent | Score | Time | Cost | Pass |
|---|---|---|---|---|
| qwen2.5-coder:14b | 87 | 6m | $0.00 | Pass |
| deepseek-r1:14b | 81 | 9m | $0.00 | Pass |
| qwen3.5:9b | 74 | 4m | $0.00 | Pass |
| llama3.2:3b | 52 | 3m | $0.00 | Fail |
The task
We tested four local models available through Ollama on three coding tasks using the Continue extension in VS Code:
- Refactor: Extract a duplicated validation block into a shared utility function.
- Bug fix: Find and fix an off-by-one error in a pagination helper.
- Test generation: Write unit tests for a small authentication helper.
All models ran Q4 quantization on the same NVIDIA RTX 4090 (24 GB VRAM).
Scoring rubric
| Criterion | Weight | Max points |
|---|---|---|
| Correctness of output | 40% | 40 |
| Code quality | 20% | 20 |
| Time to first useful response | 15% | 15 |
| Scope control (doesn't change unrelated files) | 15% | 15 |
| Cost efficiency | 10% | 10 |
Methodology
- Same codebase checked out for every run.
- Same prompts, no follow-up unless the model asked a clarifying question.
- Models were evaluated on a 0–100 scale by a human reviewer blind to which model produced which output.
- Local inference means no token cost, but electricity and hardware amortization are real.
Key findings
- qwen2.5-coder:14b is the sweet spot for consumer hardware. Fast enough, correct enough, and good at following instructions.
- deepseek-r1:14b is excellent for reasoning-heavy tasks but over-explains and is slower. Use it for debugging, not boilerplate.
- qwen3.5:9b is the best default for quick edits, autocomplete, and simple refactors on modest GPUs.
- llama3.2:3b is too small for serious coding work. Fast, but you will spend more time correcting it than it saves.
Honest caveats
- 14B models require a strong GPU. On 8 GB VRAM you will need smaller quantizations or cloud GPUs.
- Coding performance is task-dependent. These rankings could shift for a different codebase or language.
- We did not fine-tune prompts per model. A model-specific prompt might close some gaps.
When to choose which
- qwen2.5-coder:14b: default local coding model if you have 16 GB+ VRAM.
- deepseek-r1:14b: hard bugs where chain-of-thought reasoning helps.
- qwen3.5:9b: fast everyday edits, chat, and planning.
- llama3.2:3b: tab completion or classification where latency is everything.