Can you fine-tune on localized steering of an LLM?
Can you fine-tune on localized steering of an LLM?
I want to fine tune an LLM to "steer" it in the right direction. I have plenty of training examples in which I stop the generation early and correct the output to go in the right direction, and then resume generation.
Basically, for my dataset doing 100 "steers" on a single task is much cheaper than having to correct 100 full generations completely, and I think each of these "steer" operations has value and could be used for training.
So maybe I'm looking for some kind of localized DPO. Does anyone know if something like this exists?
Here's a guide: https://medium.com/@yuxiaojian/fine-tuning-llama3-1-and-deploy-to-ollama-f500a6579090
Not sure what the impact of a few 100 examples will be, though, even if you freeze most parameters.
Can SFT be used on partial generations? What I mean by a "steer" is a correction to only a portion, and not even the end, of model output.
For example, a "bad" partial output might be:
and the "steer" might be:
but the full response will eventually be:
The corrections don't include the full output.
I do not know what SFT means. So I can't comment on that, I'm afraid.
Models only predict the distribution of the next token. So "partial response" vs "full response" is a consequence repeated inference untill the stop token is reached. It's mostly unrelated to the model parameters.
For training, it makes no difference.