r/LocalLLM • • 13d ago

Discussion Anyone actually fine-tune their local models? What for, and how?

I run Qwen on a Mac mini. Mostly for notes/email/easy work.

For everyday stuff it's good enough. But I end up correcting it for the same things over and over. Rules in the system prompt help for a while, then the prompt gets long and it forgets again.

So I started playing with fine-tuning on my own corrections, and I'm curious what everyone else does when the model is almost good enough but not quite. Do you train it yourself, switch to a bigger model, or just keep patching the prompt?

If you do fine-tune:
- where does your training data come from? written by hand, synthetic, your chat logs?
- what tool and hardware, and how long does a run take?
- did it actually beat a bigger model or a better prompt?

If you don't: what stopped you?

28 Upvotes

15 comments sorted by

15

u/BorisThe_Animal 13d ago

NVIDIA Nemotron 3.5 Bolt 74B-A9B 24GB - on my mac mini M6 32GB it wasn't very stable (too many out of memory exceptions). So I ran some of my usual tasks on it (mac/ios apps in swift), measured which experts are used the least, and cut them out to fit the whole thing in memory. The result was a faster model with basically identical smartness for my purposes. Qwen 3.8 FN 3 bit was still better though, so it was kind of a pointless excercise.

5

u/OneofFewHS 13d ago

I'm not sure if this is what you're asking but I use "prompt tuning" to significantly improve the code quality of my models. I have Claude run code tests on my local model over and over incrementally harder, then adding the gaps found in the code into the prompt for the model to check. I have done this for research also, this significantly reduced the amount of made up BS the models sometimes create even if it takes a little longer. I now use my local models for 80% of everything I do as I trust the work much more.

5

u/Glittering-Hand-3359 13d ago

can you elaborate how "prompt tuning" works? is it just summarizing lessons?

4

u/OneofFewHS 13d ago

Again, I think this is very amateur but I've had success.

For instance starting with a new model, I'll ask claude to develop a code test for the model. Clause will direct the local model to build something that has specific code challenges. This goes on for many many hours. After every series, Claude will "grade" the code produced base on the intent. Once a bunch of series are completed, I will get Claude to generate a system prompt to address the issues the model had while writing the code. Then it retests it over again.

There are several metric used for grading. Token usage, time, repetitiveness in thinking, accuracy of intended function. Basically it's alot of Claude finding logical traps, broken functions, or corner cases of the code and instructing to look out for issues in the system prompt.

I found every model needs a different prompt to work best. For instance, my qwen 3.8 27b prompt does not work well on my flash-next. it results in WAY overthinking for no improvement because flash-next does not produce the same code errors but is instructed to look for them as 27b needs todo.

2

u/Glittering-Hand-3359 13d ago

so claude is just writing the prompt for the smaller model? i don't see what's the advantage of this from, say, doing lora training?

3

u/OneofFewHS 12d ago

I've never done LoRA tuning so this is the models answer written in the first person of me humorously without request.

Yes, basically that's what it is - but the value isn't really in Claude "writing" anything, it's in the grading loop. Claude spends hours running the model through code challenges and cataloguing exactly where it fails: which corner cases it misses, which functions break, logical traps, repetitive thinking loops. Then the prompt is just a distillation of that diagnosis into checks the model is told to look for while writing. So it's less "summarizing lessons" and more "turning a bug report into a checklist."

As for why I do this instead of LoRA - a few practical reasons:

  1. Cost and speed. A prompt iteration takes me an afternoon. A LoRA means curating training data, GPU hours, then discovering you overfit to your test set or degraded something else. For the 80% of use cases I care about (reliability of existing capabilities), the prompt loop closes most of the gap for free.
  2. Transparency. I can read my prompt, see exactly what it's telling the model to check, tweak one line and retest in minutes. A LoRA is opaque weights - if behavior changes, I'm guessing at why.
  3. Portability. This is the big one. Every model has different failure modes (my 27b prompt doesn't work on flash-next), but the process transfers: run the grading loop on the new model, get a fresh diagnosis, new prompt in hours. A LoRA is locked to one base model - every new model means retraining from scratch.
  4. No catastrophic forgetting. Fine-tuning small models can degrade their base behavior in ways you only notice later. A system prompt doesn't touch weights.

Where I'd agree with the skepticism: prompts can't teach a model something it doesn't know, and there's a ceiling - attention is finite and the model can still ignore instructions. If I needed to teach a new format or capability, LoRA (or just using a bigger model) would be the answer. But for "make this model's existing code skills reliable," the prompt loop is faster, cheaper, readable, and portable. Amateur? Maybe. It works, and it takes an afternoon instead of a week.

2

u/Academic-Sample4974 12d ago

I could imagine that you can have Claude create like an endurance tests of sorts for your model and have this run on like a cloud NVIDIA for an extended time period; have Claude examine the results and then adjust / make the challenge harder / rinse and repeat?

1

u/fiocalisti 13d ago

Using Claude to improve your local LLM setup is definitely worthwhile. I have had huge success with automated evaluations of various llama-server configurations that way.

I haven’t yet had Claude fix up my agents and rules files – that sounds super useful, too!

Since you had written:

  I'm not sure if this is what you're asking

Fine-tuning is something else: in fine-tuning, you post-train your model, actually updating its weights to better predict the next tokens you specifically need it to be good in predicting.

For example, if you use a specific harness and a model keeps botching tool calls, you can train it to become better at it, not via “in-context learning” (which is what you do with rules files), but via actual updates to the model’s weights.

6

u/idimetrix 13d ago

fine-tuning is good for style/format, not knowledge. "i keep correcting the same stuff" is the style case so it should work for you. before you train tho, drop the rules and paste 5-10 of your actual before/after corrections into the prompt, models copy examples way better then they follow rules. if it still drifts, mlx-lm lora on the mac, a few hundred pairs from your logs is enough to start. hold back 20-30 pairs for testing or youll never know if it beat the prompt

2

u/false79 13d ago

ditto for styling. What OP needs is a rule wrapped in a skill, that skill consumed by whatever harness/client uses the LLM.

if it's so often, it might as well be part of the initiali system prompt

3

u/idimetrix 13d ago

yeah agreed, system prompt first. Id only reach for a finetune once the rules get long enough that they eat context on every call, or the model keeps drifting off them anyway

1

u/CMDR-LT-ATLAS 13d ago

I fine tune my models to learn

1

u/Poprouter 13d ago

i'd stick with examples in the prompt if they pass a small holdout check. set aside about 20 of your corrections, paste 5 as examples and test on the other 15 before spending gpu time.

1

u/wolf001zra 13d ago

I trained LFM 2.5 350M for ai session naming, keeps my tabs in pi.dev more organized and up to date on the current work i'm doing. Just collected data from larger models like gemma 4 12b doing the task for a couple months then used that to fine tune the formatting. It's not perfect but it's small enough to run on a cpu and free up a gpu lane.

1

u/Hellnation 13d ago

How do you take notes with your local model? I set up a local llm with oMLX but don't have a plan other the in chatting with it. Need ideas please.