Glossary termTechnique

Fine-Tuning

Also known as: Finetuning

Further training of a pretrained model on a smaller, task-specific dataset so that it adapts its behavior to a particular domain, style or task.

Fine-tuning is the most common way to specialize a pretrained model. Starting from weights learned on a broad dataset, training continues on a smaller set of examples chosen for the target use, such as medical reports, legal contracts, customer service dialogues or code in a particular style. Because the model already has general knowledge, fine-tuning typically needs far less data and computation than the original training. It is a form of transfer learning, and it differs from prompt engineering, which changes a model's inputs rather than its weights.

For language models, fine-tuning comes in several flavors. Instruction tuning trains a model on examples of instructions paired with good responses, turning a raw text predictor into a helpful assistant. Preference-based methods such as reinforcement learning from human feedback then refine behavior further. Parameter-efficient techniques avoid updating every weight: low-rank adaptation, or LoRA, introduced by Microsoft researchers in 2021, trains small added matrices, and QLoRA combined this with quantization in 2023 so that very large models could be fine-tuned on a single high-memory GPU.

Fine-tuning made specialized AI accessible to many organizations and hobbyists, especially with open-weight models that anyone can download and adapt. It has trade-offs. Models can lose some general abilities while learning the target task, a problem called catastrophic forgetting, and studies have shown that fine-tuning can weaken safety behaviors trained into a model, even when the added data looks harmless. For injecting fresh or frequently changing facts, retrieval-augmented generation is often more reliable than fine-tuning.

Key points

  • Fine-tuning continues training a pretrained model on a smaller, targeted dataset.
  • Instruction tuning and preference tuning turn raw language models into usable assistants.
  • Parameter-efficient methods such as LoRA update only a small fraction of a model's parameters.
  • Fine-tuning can cause forgetting of general skills and can erode trained-in safety behavior.

Related entries

Glossary term

Technique of reusing a model trained on one task or dataset as the starting point for a different but related task, reducing data and compute needs.

Glossary term

Training technique that fine-tunes AI models using human judgments of output quality, which are turned into a reward signal for reinforcement learning.

Glossary term

AI model whose trained weights are publicly released for download, letting others run, study and adapt it, though often under restrictive licenses.

Glossary term

Large AI model trained on broad data at scale, usually with self-supervision, that can be adapted to a wide range of downstream tasks.

Organization

Company that runs a widely used platform for sharing machine learning models, datasets and demos and maintains popular open-source AI libraries.

Glossary term

Quantization

AIHardware

Technique that stores and computes a model's numbers at lower precision, such as 8 or 4 bits, to cut memory use and speed up inference.

Glossary term

Technique that improves a language model's answers by first retrieving relevant documents and supplying them to the model as context.

Glossary term

The learned numerical values inside a machine learning model, set during training, that determine how it transforms inputs into outputs.

Featured in guides

Referenced by

Other entries that discuss or point to Fine-Tuning.