Research Careers Contact

GlossaryFine-tuning

Fine-tuning

Fine-tuning is further training of an already trained model on a smaller, focused dataset, so it gets better at a specific task, domain or output style. The model keeps what it learned in its original training and adjusts to the new data.

How it works

A pretrained model, such as a language model or an image model, starts with weights learned from a large general dataset. Fine-tuning continues training on examples of the target task, such as labeled defect images or pairs of instructions and good answers. The 2018 BERT paper popularized this pattern of pretraining once and fine-tuning for many tasks.

Full fine-tuning updates all of the model's weights, which takes significant compute and storage for large models. Parameter-efficient methods update only a small part. LoRA, low-rank adaptation, freezes the original weights and trains small added matrices, which cuts the number of trained parameters by orders of magnitude and lets many task-specific adapters share one base model.

Fine-tuning vs RAG

Fine-tuning changes how the model behaves: its skills, format and style. Retrieval-augmented generation changes what the model knows at the moment of a question by supplying documents. To teach a model a new output format or a classification task, fine-tune. To give it facts that change or must be cited, use retrieval. Many systems combine them.

Why it matters

General models are broad but not specialized. A vision model trained on everyday photos does not know what a solder bridge looks like. A language model does not know a company's report formats. Fine-tuning closes that gap with relatively little data and compute, compared with training from scratch.

How to get it right

  • Start with a clear task and a test set held back from training.
  • Use clean, consistent labels, since the model learns label noise too.
  • Prefer parameter-efficient methods when data or compute is limited.
  • Compare against simpler options, such as better prompts or retrieval, before fine-tuning.
  • Record the base model, data version and settings for every fine-tuned model.

Fine-tuning in robotics and drone hardware

In electronics manufacturing, fine-tuning is common for inspection: a pretrained vision model is fine-tuned on labeled images of a factory's own boards and defects. It is also used to teach language models to extract structured data from datasheets, test logs or work orders in a fixed format.

For a factory, fine-tuning fits tasks with stable labels, such as defect classification on AOI images, while facts that change, such as a BOM revision, belong in RAG.

Learn more