Fine-tuning
Fine-tuning adapts an already trained model to a new task or domain. It uses additional training data to update the model’s weights or train a small set of added parameters.
Also known as: дообучение, файнтюнинг, LoRA
What fine-tuning changes
A pretrained model is a starting point, not a blank slate. A language model may already understand that “charged twice” and “duplicate payment” mean roughly the same thing, but it does not know which queue your support team uses for that issue. Fine-tuning can teach it to apply your team’s labels consistently without training a model from scratch.
What happens during training
In supervised fine-tuning, each training example pairs an input with a target output. A loss function measures how far the prediction is from the target, and an optimizer adjusts the trainable parameters to reduce that loss. Use a validation set to choose settings such as the learning rate and when to stop, then use a separate test set for the final comparison.
Full fine-tuning updates all model weights. On a large model, storing gradients and optimizer states for all those weights can be expensive. LoRA (Low-Rank Adaptation) keeps the original weights frozen and learns an update to each selected weight matrix using two smaller matrices. That cuts the number of trainable parameters and usually lowers training memory use, but the base model still takes part in the forward pass. LoRA is a fine-tuning method, not another name for fine-tuning.
Example: classifying expense receipts
Suppose you want a model to classify receipt descriptions as travel, meals, or office supplies. Train it on examples labeled according to your finance team’s rules, such as a train ticket labeled travel. If the data contains multiple versions of the same receipt, keep them in the same split. Otherwise, the test score may reward memorization rather than the ability to classify a new receipt. If one category dominates, inspect per-class precision and recall: high overall accuracy can hide poor performance on a rare category.
When it’s worth doing
Start with a baseline: try the existing model with clear instructions and a few examples in the prompt. If it already meets your target, training adds cost without a clear benefit. Fine-tuning is worth testing when the failures are repeatable and you can provide good examples of the behavior you want, such as consistent labels or a particular writing style. If the main problem is missing or changing facts, retrieval-augmented generation (RAG) is usually a better fit: it supplies relevant documents at request time rather than trying to store their contents in model weights.
What interviewers look for
Expect to explain not just what you would train, but how you would know it helped. Name a baseline and a task metric, explain how you would prevent data leakage, and check that the adapted model still performs well on other tasks it needs to handle.