Fine-Tuning
How a raw autocomplete model learns manners, follows instructions, and masters specialized job skills.
Pre-training is school; fine-tuning is job training.
Pre-training gives the model general vocabulary and broad knowledge. Fine-tuning teaches it how to act like a helpful assistant or a specialized professional.
Why is fine-tuning so much faster?
Pre-training reads trillions of tokens over months of computing to discover human language and logic. Fine-tuning only needs thousands of high-quality conversational demonstrations to teach the model how to package that existing knowledge into polite, structured answers.
Learning by example with dialogue flashcards.
Engineers show the model thousands of ideal question-and-answer pairs so it learns to recognize when to answer instead of rambling.
What is prompt masking?
During Supervised Fine-Tuning (SFT), the algorithm ignores mistakes on the user's prompt and only grades the model on the words in the assistant's answer. The model is penalized exclusively for generating bad response tokens, not for the prompt text it was given.
Teaching good taste: picking the better answer.
Humans generate two candidate answers and vote for the one that is clearer, safer, and more truthful, training the model's judgment.
What are RLHF and DPO?
RLHF (Reinforcement Learning from Human Feedback) uses a scoring system to reward good answers. DPO (Direct Preference Optimization) is a newer mathematical method that directly adjusts the model based on human preference votes without needing a separate reward scorer.
Clipping on specialized job modules.
Instead of rewiring all 70 billion parameters, engineers attach tiny adapter layers (LoRA) that teach a specific specialty in minutes.
Why LoRA matters for local AI
Training an entire 70-billion-parameter model requires high-end server clusters with hundreds of gigabytes of video memory. A Low-Rank Adaptation (LoRA) freezes the main brain and only trains small helper matrices. This allows developers to fine-tune state-of-the-art models on a single computer.