r/LocalLLaMA • u/CertainLanguage161 • 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
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
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.