Getting more reliable code fixes without giving up the speed

#39
by jfriedler - opened

I've been running LFM2.5-8B-A1B locally through Ollama, using lfm2.5:8b Q4_K_M on an RTX 3090 Ti. The speed is what keeps me coming back to it. I'm trying to make it more dependable for small coding tasks.

I put together 60 synthetic Python helper tasks covering things like input validation, CSV quoting, HTML escaping and URL encoding. There are correct implementations to leave alone, broken ones, and some bugs that pass the public examples but fail separate held-out checks. These are my own tests, not SWE-bench or a production benchmark. The checker uses a bounded Python interpreter, so unsupported constructs count as unresolved.

The original one-call setup asked for JSON with IDs, a source hash and replacement code. That got 36/60 through the full checks. Having the host handle the metadata, giving the model the public test failures, and asking for plain code or NO_CHANGE got 46/60 with the same weights and one call. Median time went from 4.88 to 4.57 seconds, and total measured time dropped about 5.5%. Twelve cases improved and two regressed. Five incorrect answers still slipped past the public checks in each setup, so I'm keeping review in the loop.

That run used temperature 0 and repetition penalty 1.0. I also tried the model card's 0.2 / top_k 80 / repetition penalty 1.05 with the compact prompt. That one run got 35/60 and a 6.45-second median. It's only one seed, so I wouldn't read too much into the sampling comparison.

Section 4.5 of the LFM2 report sounded familiar, especially the output-format issues. I'm still seeing actual logic mistakes too, such as missed input checks and incorrect escaping.

Is there a prompt or runtime setup you'd recommend for these small code fixes? Anything worth checking with Q4_K_M and Ollama's lfm2 renderer / lfm2-thinking parser? I know heavy programming isn't the model's main target. I'm trying to get a dependable local helper while keeping the speed that makes this model appealing.

Sign up or log in to comment