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?
Do you want a given output structure, like json or toml?
Do you want to align the model, with your dataset of question and answer pairs?
First of all, have you tried giving the model multiple examples of input output pairs in the context, this already helps the model a lot to output the correct format.
And third, in case you want to train a model to respond differently and the previous steps were not good enough, you can fine-tune.
I can recommend this project to you, as it teaches how to fine-tune a model: https://github.com/huggingface/smol-course
Depending on the size of the model, that you want to fine-tune and the amount of compute that you have available you can either train by updating all parameters like ORPO or you can train via PEFT (LoRA)
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.