4 ms·
Yep, you could pull a saved version of the model weights for your specific data and restore it later, which is what a lot of the finetuned models on huggingface
by james-revisoai 4y ago
Yep, you could pull a saved version of the model weights for your specific data and restore it later, which is what a lot of the finetuned models on huggingface do under the hood(and probably what OpenAI does when you finetune on the API).
As it turns out yes, if you uploaded the NFL seasons transcripts, the weights which changed the most (negative or positive) would be those associated with the new information in the data. But they will all still be connected with the connections and tokens they were before(importantly, including the unchanged earlier layers), just with different "strengths" - and for the most part, very similar strengths.
However these are not commutive operations between different sets of finetuned data.
- If you combined the weight differences from two different sets of data, you will not get the same result as if you finetune on both sets of data and then save. So you can't just tack on further data that easily (you could add more of the same but if the data distribution is different over time, you'll want to sample the data randomly when training mostly)
Part of this is because models are trained with batches of samples, never the whole set (generally), say, 16 to 256 at a time. Because of this, each "step/batch" then changes the network and the next step is dependent upon the previous. There are alternate approaches that load all samples in memory, where you purely learn a custom matrix projection of the output last hidden layer (e.g. 4096 floats), which can allow you to do downstream tasks but is not useful for altering the pattern of generating text (and therefore not useful for knowledge extraction). This also makes it hard to understand adding knowledge to LLMs, although SVD is helping with this recently for all kinds of models that use attention and decoding (so GPT, BERT, T5 etc) in the NLP domain: https://www.lesswrong.com/posts/mkbGjzxD8d8XqKHzA/the-singular-value-decompositions-of-transformer-weight https://www.lesswrong.com/posts/mkbGjzxD8d8XqKHzA/the-singul... - https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreti... The above also cover why early layers matter: In almost all cases, with an unfinetuned GPT, the first token in the earliest 1-3 layers is already a reasonable or ideal token. Since finetuning often does not impact these layers, it is questionable whether the model can have the information available that a non-finetuned model does to the same respect regarding new patterns(concepts etc) in your new data, even if it can "skirt over it" by appropriately adjusting at the last layer. Recently there was also a 2 layer model which performed similarly well to these transformer/GPT models at smaller scale (which span from 8-24 layers by and large) which might open new ways of finetuning.
I can't answer about StableDiffusion checkpoints as I don't know diffusion models well, but most finetuning is a set of matrix operations than project weight changes to existing weights in the network (typically - just the end parts before the output of the network).
- noduerme 4y ago>> However these are not commutive operations between different sets of finetuned data. you mean they're not additive, right? Each weight set is destructive of another. But each one would be deterministic up to that point, yes? When you restore that state, the responses to an identical series of questions would always be the same?