FOCUS.AI

EST. 24

Essay

Code Generation with Local Models

Small, local AI models deliver surprisingly effective results for everyday tasks. Also llama3.2 is surprisingly fast and gpt-oss is surprisingly good.

Will Schenk August 20, 2025
Code Generation with Local Models

I needed a small script to help anonymizing some test data. Nothing fancy, but on my way to ChatGPT I ended up on the “wrong window” — and threw the prompt at Olamma gpt-oss instead. And it surprised me by giving me a solid result quickly. Small local models are the future and being able to run them on hardware you already own is a political statement.

No remote API calls. No burning through tokens/the environment. No company watching. Like a cowboy, just me and my machine.Small, local models that are good enough to be useful and powerful enough to matter.

Mostly, just worked

I ended up trying the prompt with a couple of different models, and then grading the results.

i need a script that will give me at least 1042 distinct but made up show names. they should be funny and grammatically correct and written in typescript

I expected gpt-oss:20b to be the best of the lot, but surprisingly the 5 month old llama3.2 crushed everything on the time dimension: 4 of them got winning results on the first (and only) try:

Code “Quality”

This is silly since it’s a tiny, throw away script but:

ModelAI QualityDocker ExecutionNotes / Errors
gpt-oss:20b4/5✅ SuccessClear & well-named; could abstract title generation.
deepseek-r1:32b3/5✅ SuccessRepeats random-selection logic, refactoring needed.
devstral:24b4/5✅ SuccessCleanly organized, avoid duplicate checks.
llama3.2:latest4/5✅ SuccessClear, but unused suffixes array and weak modularity.
gemma3:12b4/5❌ FailedTypeError: Cannot read properties of undefined (forEach)
gemma3:27b3/5❌ FailedReferenceError: $2 is not defined
mistral-small3.2:24b3/5❌ FailedSyntax error: Expected ”)” but found “count”

This is for TypeScript, they could be better or worse on different languages.

The test code is on github

Will Schenk August 20, 2025

Related Posts

Single file swift mini-apps

Single file swift mini-apps

swift files can be run directly without compiling and without XCode, making it easy to create native UI elements and access all of macOS's APIs. Once you see Swift as a scripting language rather than just an app language, you start wondering what other capabilities are hiding in plain sight.

VIEW POST

gpt-5 and gpt-oss

gpt-5 and gpt-oss

OpenAI’s GPT-5 launch stole headlines, but GPT-OSS quietly made local AI a lot more practical. This post covers what’s new, how to run it with Ollama or LM Studio, and why context size can change your results.

VIEW POST

Subscribe to our newsletter

Archived issues

What we offer

2024

01.
AGENTIC TOOLING
02.
(JIT) JUST IN TIME SOFTWARE
03.
CONVERTING LEGACY SOFTWARE TO MCP / AGENTIC
04.
UNDERSTANDING UI DESIGN AND PRODUCT IN THE AI WORLD
05.
MODIFY LEGACY WORKFLOW AND UI

CONTACT US TO GET STARTED.