Whereas RAG gives you one way to give additional information to a large language model;
Fine-tuning is another way to give it more information.
- In particular, if you have a bigger context that can fit into the input length, or the input context window length of the LM.
- Get an LM to absorb this information
- Getting the LM ot output text in a certain given style
Pretraining and Fine-tuning
- Pre-training: Learns from a lot of data
- Fine-tuning: cause the LM to do a little bit more learning to change its outputs to be
- a set of sentences or a set of text
- Create an additional data set
- Fine-tuning to this relatively modest-sized data set
Why fine-tune?
- To carry out a task that isn't easy to define in a prompt.
- A summary of this specific style
- Mimicking a writing or speaking style
- To help LLM gain specific knowledge
- gain a domain of knowledge: medical、legal、financial
- To get a smaller model to perform a task.
- larger model: 100B +parameters
- small model: 1B parameters, Lower cost/latency to deploy
- can run on mobile/laptop(edge devices)
- Use it for tasks that are hard to specify in a prompt.
- gain a body of knowledge
- Get a smaller and cheaper-to-run LM
RAG is just a modification of your prompt
fine tuning
pre-training