---
title: Fine-tuning
---

Fine-tuning is a process in machine learning where a pre-trained model, such as an [LLM](/glossary/llm), is further trained on a specific dataset to adapt it to a particular task or domain. This process leverages the broad knowledge and language understanding that the model has already acquired during its initial training on large and diverse datasets.

Fine-tuning involves using a smaller, task-specific dataset to continue training the pre-trained model. By doing so, the model can learn to perform more specialized tasks with greater accuracy and relevance. For example, an LLM can be fine-tuned on a dataset of medical texts to improve its performance in medical question answering or on a dataset of legal documents to enhance its capabilities in legal text analysis.

The fine-tuning process typically involves adjusting the model’s parameters using techniques such as supervised learning, where the model learns to produce the correct output based on the provided input and corresponding labels. This approach allows the model to retain its general language understanding while becoming more proficient in the specific domain or task at hand. Fine-tuning is a powerful technique that enables the adaptation of versatile LLMs to a wide range of applications, ensuring high performance and relevance in specialized contexts.