promptgarten ๐ŸŒฑ
๐ŸŒ ES
Conceptโ—โ—โ—‹4 min ยท +30 XP

Fine-tuning โ€“ training a model further

Fine-tuning trains an already-finished model further on your own examples, to specialize it for a task or a tone.

What is fine-tuning?

With fine-tuning, an already pretrained language model is trained further on a smaller, custom dataset. Unlike prompting, this actually changes the model's weights โ€“ the behavior adapts permanently to the examples, without you having to supply instructions with every request.

What fine-tuning is good for

  • Consistently hitting a certain tone or style (e.g. brand communication)
  • Reliably sticking to a fixed output format
  • Learning jargon or task patterns that would be too cumbersome to explain in a prompt

What fine-tuning is NOT good for

Fine-tuning is bad at reliably adding new factual knowledge โ€“ the model tends to "learn" patterns and style rather than exact, retrievable facts. For current or frequently changing knowledge, RAG is usually the better and cheaper choice, since it doesn't require retraining.

Practical framework

OpenAI offers a fine-tuning API for select models. Claude models can be customized for enterprise customers via Amazon Bedrock using Model Customization, rather than through a public consumer API. Fine-tuning also needs cleanly curated example data โ€“ bad or too few examples lead to a worse model, not a better one.

EXAMPLE

A customer service team trains a model further on 500 real, well-answered support tickets, so new answers automatically come out in the company's usual tone and format.

QUICK QUIZ

What is fine-tuning typically better suited for than RAG?

SOURCES

RELATED TOPICS

What Is an LLM? โ—โ—‹โ—‹Model Lifecycle: Models Launch, Change, and Get Retired โ—โ—โ—‹Evals โ€“ systematically testing prompts and models โ—โ—โ—‹