Distinguish training and inference
Keep a steady rhythm through each period. · 131 words
Pretraining adjusts model weights across many examples. Fine-tuning continues training with examples chosen for a narrower purpose. Inference uses the resulting weights to produce an output. Imagine asking a trained model to translate one sentence. Providing that sentence as input is part of inference, even when it changes the answer.
Suppose you include a glossary in the translation request. The output may use the preferred terms because the glossary is available in the current context. Send a fresh request with the glossary removed and that support is gone. Fine-tuning instead uses training examples to change parameters that later requests share. To test whether the change generalizes, reserve sentences that never appeared during training. A correct translation of a sentence supplied as an example tells you little about performance on new material.
Check your recall
Which stage updates weights using a new set of translation examples?
Check your answer
Fine-tuning adjusts existing weights for the narrower translation task.
Sources and credits
Original KeyTouch lesson. Background reading · Hugging Face · LLM Course.