AI Model Wiki

    Skip to main content
    Back to Glossary

    Fine-Tuning

    Fine-Tuning is the second stage of the standard two-phase deep learning pipeline, in which a model that has already been pre-trained on a large general corpus is trained further on a smaller, targeted dataset to specialise its behaviour for a particular task or domain. The pre-trained weights encode broad knowledge about language, structure, or visual patterns; the fine-tuning pass reshapes the decision boundaries and internal representations to better serve the target application. Because the model starts from a well-initialised state, even hundreds or thousands of domain examples can produce large performance gains.

    Think of it like a concert pianist who has practised classical repertoire for twenty years being asked to perform jazz: most of their technique transfers immediately, and they only need dedicated rehearsal time to internalise the idioms specific to the new style.

    Full fine-tuning updates every weight in the model, which is expensive for billion-parameter models. Parameter-efficient fine-tuning (PEFT) methods like LoRA inject small trainable rank-decomposition matrices alongside frozen original weights, achieving 90%+ of full fine-tuning quality at 0.1-1% of the trainable parameter count. A common command-line invocation using the Hugging Face PEFT library looks like: loading the base model, wrapping it with a LoraConfig specifying rank and target modules, then running a standard Trainer loop on the domain dataset.

    Fine-Tuning builds on Pretraining and is often followed by RLHF for conversational models. It connects to LoRA (the dominant efficient method), Overfitting (a real risk when the fine-tuning dataset is small), and Loss Function selection (which may change between the pretraining and fine-tuning phases). The Knowledge Distillation technique can be combined with fine-tuning to produce a compact specialist model.

    You will encounter Fine-Tuning when customising an LLM for a specific brand voice, domain vocabulary, or safety policy; when adapting a vision model to medical imaging; and whenever general-purpose model quality is insufficient for a use case but training from scratch is prohibitively expensive.

    Related Courses

    AI Terminology
    Glossary