Also known as: Fine tuning Β· Fine Tuning
Fine-tuning is the process of further training a pretrained model on a specific dataset, task, domain, or style. It adapts general model capabilities to more specialized requirements and may improve performance, but it can also introduce overfitting, bias, or governance obligations tied to the fine-tuning data.
A second, task-specific training pass performed on a pre-trained model to refine its parameters for a specific use case. For example, the full training sequence for some large language models is as follows: 1. Pre-training: Train a large language model on a vast general dataset, such as all the English language Wikipedia pages. 2. Fine-tuning: Train the pre-trained model to perform a specific task, such as responding to medical queries. Fine-tuning typically involves hundreds or thousands of examples focused on the specific task. As another example, the full training sequence for a large image model is as follows: 1. Pre-training: Train a large image model on a vast general image dataset, such as all the images in Wikimedia commons. 2. Fine-tuning: Train the pre-trained model to perform a specific task, such as generating images of orcas. Fine-tuning can entail any combination of the following strategies: - Modifying all of the pre-trained model's existing parameters. This is sometimes called full fine-tuning. - Modifying only some of the pre-trained model's existing parameters (typically, the layers closest to the output layer), while keeping other existing parameters unchanged (typically, the layers closest to the input layer). See parameter-efficient tuning. - Adding more layers, typically on top of the existing layers closest to the output layer. Fine-tuning is a form of transfer learning. As such, fine-tuning might use a different loss function or a different model type than those used to train the pre-trained model. For example, you could fine-tune a pre-trained large image model to produce a regression model that returns the number of birds in an input image. Compare and contrast fine-tuning with the following terms: - distillation - prompt-based learning See Fine-tuning in Machine Learning Crash Course for more information.
βModel fine-tuning involves adjusting the parameters of foundation models or training models with small datasets for a specific task. This process adapts and enhances the model's performance for particular business needsβ.
Adapting a model on domain-specific data to improve performance. Requires careful governance of data rights, privacy and overfitting risks.
A side-by-side comparison of Retrieval-Augmented Generation and Fine-Tuning. Understand when to retrieve external context at runtime and when to adapt a pretrained model through additional training.
A side-by-side comparison of Instruction Tuning and Fine-tuning. Understand how instruction-following adaptation differs from broader task, domain, or style adaptation.
A side-by-side comparison of Prompt Tuning and Fine-tuning. Understand how a learned soft prompt differs from retraining a pretrained model on a specialized dataset.
A side-by-side comparison of Lora and Fine-tuning. Understand how Low-Rank Adaptation narrows the change surface by training additional parameters while broader fine-tuning adapts a pretrained model to specialized requirements.