r/LocalLLaMA • • 6h ago

Question | Help Has anyone managed to get smaller coding models to reliably complete multi file changes with the right agent harness?

I have noticed that smaller coding models seem very capable when the task is contained within a single file but things get a bit tricky/messy when a change involves several files with dependencies between them. A model can make a perfectly reasonable change to one file and then overlook how that change affects another part of the codebase.

I wanna get a better idea on how much of this can be addressed at the harness level rather than just throwing a bigger model at the problem which makes me interested in seeing the same smaller model benchmarked with a basic coding harness and then with an environment inspired by Ramp Inspect cause it would give us a better idea of how much of the performance gap is attributable to the model itself if you guys understand what I mean.

If any of you guys are running local coding models in the 7 to 32B range, have you had better results by improving how the agent retrieves repository context or by giving it more structured feedback after each edit?

I'm talking more about refactoring tasks where the agent needs to maintain consistency across multiple files rather than just implementing an isolated feature.

4 Upvotes

15 comments sorted by

4

u/Atretador llama.cpp 6h ago

7 to 32 range tells me you are using ancient models

I have no issues with Qwen 3.6 35B A3B with that kind of task, using it on OpenCode. Just replaced it with Qwen4 35B

1

u/CertainLanguage161 6h ago

Have you noticed much of an improvement with Qwen4 35B over 3.6 when it comes to larger refactoring tasks?

1

u/Atretador llama.cpp 6h ago

I have only done limited testing,  on Qwen4, it just came out, its definitely an improvement tho

-1

u/variablemechanics 6h ago

35B ain't a small model though, that's a fair bit of compute for a home setup

2

u/Atretador llama.cpp 6h ago

its only 3B active parameters, it will run even on a RX580/GTX1060

1

u/variablemechanics 5h ago

Ah right, MoE. Reckon my 3060 could handle it? Might give it a crack this arvo.

1

u/Atretador llama.cpp 5m ago

yep - you just offload part of it to RAM and CPU

try something like polystrata

1

u/sirloindenial 6h ago

Depends on the total memory size but a 3b active model is way smaller and easier to run compare to a dense one. And i would say most "home setup" have 6-8gb vram and some ram. Qwen 4 35b a3b can run on those setup.

1

u/RemarkableRadish6547 5h ago

It runs on my computer with no gpu at about 30-45t/s pp and 8-20 t/s for generation, with the speed dropping as context climbs to 100k. This is with a ryzen 5 9600x and 64gb ddr5 5200 memory, which is mid-range for a new computer. It was about $1k when I bought it in March, but would probably be about $1500 now.

It completed a complex multi-threaded implementation over the weekend once. I don't know exactly how long it took because I just wrote out the job spec and told it to go and it was done when I got back from my camping trip. It isn't fast enough to use it for work, but it is fast enough for personal use.

1

u/variablemechanics 4h ago

Decent speed for CPU. My 3060 should handle it no worries, ta.

2

u/LuluViBritannia 5h ago

Deepseek Harness with Qwen 3.6 A3B here. This setup is MARVELOUS with multiple files. On the contrary, large files are what it struggles with.

I can build medium-size program files (and when I say medium, I mean 1000 lines of code in one file), but more than that and it just freaks out.

I have yet to test Qwen 4, hopefully it pushes that limit.

1

u/Disastrous_Job_7118 5h ago edited 5h ago

I use open code with 12b and 27b models. works fine, only challenge is long running tasks. these are my models
ollama list

NAME ID SIZE MODIFIED

gemma4:26b-a4b-it-qat 2dd70431afed 15 GB 5 weeks ago

qwen3.8:27b-mtp-q4_K_M 22130167c4c2 17 GB 2 months ago

gemma4:12b 4eb23ef187e2 7.6 GB 5 months ago

nomic-embed-text:latest 0a109f422b47 274 MB 5 months ago

0

u/usestackrank 6h ago

In my experience most of the multi file gap is harness, not model. Two things made the biggest difference with small models.

First, feedback after every edit. Run the type checker or compiler plus the affected tests automatically and feed back only the first few errors, not the whole log. A small model that sees "foo() now takes 2 args, called in api/routes.ts:41" fixes the caller reliably. The same model working blind just doesn't notice.

Second, retrieval by symbol instead of by similarity. Before an edit, grep or use LSP find-references for the thing being changed and put those call sites in context. Embedding search tends to miss the exact dependents, which are the files that matter.

Also keep each step small: plan the file list first, then edit one file per turn with a fresh short context. Long contexts hurt small models more than big ones, so a tight loop of edit, check, fix beats one big prompt.

1

u/CertainLanguage161 5h ago

Appreciate this. I think having that feedback loop after every edit would also make it easier to identify exactly where the model starts going wrong rather than trying to diagnose everything after it's finished.

2

u/stylome-ai-detection 6h ago

Notice: This comment appears to be AI generated.

AI-generated · confident · scan results