Arsalan Zaidi's Blog

The state of small local LLMs for coding as of July 2026

TLDR: I spent a whole day playing around with small LLMs which run on my laptop. Here’s what I figured out.


I’ve been reading a lot about people using small local LLMs to automate parts of their life, whether it’s summarizing their emails in the morning or some sort of content creation. However, I’m more interested in using them to write code and and so I downloaded a set of models for local LLM coding and I’ve started systematically evaluating them. The test bed was a bog standard Lenovo Thinkpad T14s G2 with 32 GB of RAM and no dedicated GPU, running Linux. The model runner was Ollama, running them entirely on the CPU.

Speed Test

For the speed test, I kept ’thinking’ off and the results are interesting. The absolute dark horse was qwen3-coder:30b. At an output rate of 12 tps it is fast! It compares in speed to qwen2.5-coder:3b, which is 10x smaller. I noticed that the output is more structured and terse than that of other models, but that is an advantage in a coding focused model IMO.

Gemma4:e4b on the other hand was quite slow for its size and qwen3.5:27b was an absolute dog. It would only be worth running if the output is significantly better than that of qwen3-coder:30b.

So as far as speed goes, we have a clear winner.

Coding Test

Now to test these models as coding agents I had them vibe code a very simple console based program. I then ran the output and examined it for code quality. I deliberately kept the prompt simple and ‘vibey’ to see how the model reacts and what assumptions it makes. Where available, I kept ’thinking’ mode ON this time to give the model the best chance to get things right, even though I don’t think Chain of Thought (CoT) has much value.

Overall, three things stood out to me:

  1. General models are not very good at coding at all. Both gemma4:e4b and qwen3.5:27b were unable to produce running code. This matches my previous experience working with such models.
  2. qwen2.5-coder:7b was better than it’s 3b variant but the 14b variant was not significantly better, although it was slower. It’s probable that for this family and other similar models, 7-9B params is the sweet spot.
  3. qwen3-coder:30b was the clear winner. It was blazing fast and the code was clean and works well. I’ll be using this model on my personal machine for further work.

You can see details in the section titled Coding Test Process

Additional observations

I initially ran the test using Pi.dev as my agent harness rather than raw Ollama, but quickly ran into two issues. One was that Pi only loads models with tool calling support, which Qwn2.5-Coder doesn’t support, so I couldn’t test those models. Force loading those showed me another potential issue; the model was trying to use the web-search tool to get the code for the tic-tac-toe program from the web! Not at all what we wanted. Using ollama run side-steps both issues, but it was interesting to see this none the less.

Speed testing process

Models run with:

Raw results (grouped by family):

Coding Test Process

Models run with:

Raw results (grouped by family):

#Ai #Build in Public #Home Lab #Software Development