149 points · by gnahzby · 3y ago · 37 comments
The hard question IMO is the question of when does it make sense to fine tune an LLM to update it's knowledge and how much data is needed in this case? I have not seen anyone show a real example of succeeded in this case and wonder if it's close to as difficult as training the LLM from scratch or if it's a feasible fine tuning use case.
1. Generalizing new facts. You can create a question answer pair of: “what is the population of the world in 2023?” “8 billion”, but it may not be able to pick up alternate phrasing or “does the world have 8 billion people on it?”
2. Catastrophic and behavioral forgetting. Continued fine tuning after RLHF and instruction fine tuning may result in the loss of the alignment and instruction following capabilities trained by OpenAI. At worst, it will start spewing random tokens like the example in the post.
I have not yet seen it successfully done, and I suspect that updating fractions (~.1%) of the original weights with PEFT methods won’t help.
Current fine tuning techniques can only contribute to knowledge indirectly (getting better queries for an external data source for example), you cannot directly embed new facts in the model is any generally efficient/effective manner.
There are toy examples of fine tuning in facts that are not of use outside of academic considerations at this point, and I sense it's contributing to the widespread confusion about fine-tuning's value proposition
I don’t believe that the answer is strictly no. There are still many questions around the fine tuning method and the scale of data, as well as expectations of task accuracy from the perspective of an end user.
Nitpick, but although when training LoRAs you're only training 1% or less (depending on rank) of the number of parameters of the entire model, the adapters affect the entire model and after merging the LoRA all of the weights of the model are updated.
Jeremy Howard has written a bit about how quickly LLMs can pick up new concepts as well:
Controlling token outputs to match a regex generates valid JSON 100% of the time!
If so, let say in the future, we have an LLM with 100K token context windows but with a subsystem where it notices some knowledge keeps being repeated in the context and then store that knowledge for finetuning when the LLM is not doing inference. Basically a mirror of the way we human work? Is that possible? An LLM that constantly improved and can adapt to new knowledge?
You can use it to improve knowledge in indirect ways:
- get the model better at crafting queries for an external data source
- get the model better a tool usage to do computation with an external system
- get more useful embeddings from BERT/SBERT
- tell the model what it cannot answer accurately
But in general, fine tuning is noise right now because 99% of the people chasing it actually don't need it.
If you want to change how the model presents text, use fine tuning. If you want to change what the model can present, fine tuning is a hopeless way of doing it.
If this is what I want, then what is the right way to do it?
If you're answering questions on current events, hook it up to a news API and let it take in a user query, return a search to you, and give the result back to the LLM before it responds.
Right now LLMs perform best for factual information if you treat them like flexible glue between the user and your data sources. Any knowledge you leverage from the LLM itself should "static" knowledge that can hold true across all user queries.
For example, you can use the LLM's knowledge of marketing to produce marketing copy via chain of thought. Trends in marketing copy can change, but the actual act of making marketing copy takes a static set of knowledge.
_
Don't use the LLM to surface competitors for the product, because one person will ask about 'Coke' and it'll say 'Pepsi', and another will name their founded in 2023 company and it'll hallucinate: especially if you're asking for structured output
Instead let the LLM form some searches, take the results and let the LLM use chain of thought on what defines a competitor, and surface that result
GPT4 is practically unusable unless you spend $10k+ a month and have an enterprise account.
No real end user wants to wait 20-40 seconds for a response, only to find it was 80% of what they wanted.
does this pass the sniff test? under what situations could a finetuned single tenant model be faster than a batchable multitenant base model?
That being said, both accounts that we experimented on were personal accounts ( with a very limited budget) so maybe there are some special behaviors (e.g. some rate limit that only exists for base models)