Fine-tuning
In shortFine-tuning trains an existing model further on your own examples, so it follows a style, format or task more reliably.
In plain words
A base model has already learned from a huge text collection. Fine-tuning continues that training on a smaller set of your own examples, for instance pairs of "input" and "ideal answer". Anthropic's glossary describes it as further training of a pretrained model on additional data, so the model starts to mimic the patterns of that data. It can adapt a model to a domain, a task or a writing style.
Training every parameter of a large model is expensive. Methods like LoRA, from a 2021 paper by Hu and colleagues, train only a small add-on set of weights and leave the rest frozen. This cuts the compute and storage needed.
Availability differs by provider. OpenAI documents fine-tuning for selected models. Anthropic's glossary says its API does not currently offer it. Open models you run yourself can usually be tuned (see open-weight models). Check the current docs of your provider.
Why it matters
- Consistency: A tuned model can keep a format or tone without a long prompt each time. Shorter prompts save tokens.
- Cost and effort: You pay for training, you must prepare clean examples, and you must re-test when the base model changes.
- Quality of data: The model copies your examples, including their flaws and biases. Anthropic stresses careful choice of the tuning data.
- Wrong tool for fresh facts: For facts that change or are private, RAG is usually the simpler path, because you update a document instead of retraining.
Example
A support team wants replies in a fixed house style and a fixed layout. Today the prompt carries two pages of style rules, sent with every request. The team collects a few hundred reviewed replies, fine-tunes a model, and then needs only a short prompt. When the product changes, they update a help article for RAG and do not retrain.
Common misconceptions
- "Fine-tuning teaches the model new facts reliably." It shapes behaviour better than it adds knowledge. Use retrieval for facts.
- "You need millions of examples." Quality matters more than volume, and tuning uses far fewer examples than pretraining.
- "A tuned model never errs." It can still make things up (hallucination).
Questions and answers
What is the difference between fine-tuning and RAG?
Fine-tuning changes the model's behaviour by training it on examples. RAG leaves the model as it is and adds relevant text to each prompt. Use RAG for changing facts, fine-tuning for style or task.
Can I fine-tune any AI model?
No. It depends on the provider and the model. Some APIs offer it for selected models; others do not. Models whose weights you can download can usually be tuned.
Does fine-tuning make a model smarter?
Not in general. It makes the model better at the patterns in your examples, and it can get worse at other things.
Read next
- RAG (retrieval-augmented generation)
RAG (retrieval-augmented generation) first looks up relevant passages in your documents, then gives them to the model so it answers from them.
- Parameters
Parameters are the numbers, also called weights, that a model adjusts during training and then uses to answer; their count is a rough measure of size.
- Open-weight model
An open-weight model is an AI model whose trained weights are published for download, so you can run and often adapt it yourself.
- Prompt
A prompt is the input you give an AI model: your question or task, plus any instructions, examples and text it should use.
- Large language model (LLM)
A large language model (LLM) is an AI system trained on huge amounts of text to predict the next token, which lets it write, summarise and answer.