ML & Deep Learning Foundations·Question 34 of 55Intermediate

You're adapting a pretrained model to a new task. What do you freeze, what do you train, and how do you decide?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

How much you unfreeze should scale with how much task data you have and how far your domain sits from the pretraining distribution. That is the whole decision.

Full worked answer

How much you unfreeze should scale with how much task data you have and how far your domain sits from the pretraining distribution. That is the whole decision.

The ladder:

  1. Frozen backbone plus a linear probe. Hundreds of examples, domain close to pretraining. It is also the honest measurement of how good the representation already is, and I run it first regardless, as a baseline.
  2. Unfreeze the last N blocks. Thousands of examples.
  3. Full fine-tune. Tens of thousands plus, or a genuinely distant domain (medical imaging, legal text, an unusual language).
  4. PEFT / LoRA. The default for LLMs now. You train roughly 1% of parameters, keep one base model resident and swap adapters per task, and you largely dodge the catastrophic forgetting of general capability that full fine-tuning invites.

Why early layers freeze well: they learn generic structure (edges and textures in CNNs, syntax and surface regularities in early transformer layers), while late layers are task and label specific. Same reason you always replace the head.

Practical rules that separate people who have done it:

  • Much lower LR than pretraining, typically ~10 to 100x smaller. You are nudging, not overwriting.
  • Warm up the new head with the backbone frozen for an epoch before unfreezing. A randomly initialized head emits large gradients that will wreck pretrained weights in the first few steps.
  • Discriminative LRs, lower for earlier layers, if you partially unfreeze.
  • Keep BatchNorm in eval mode when fine-tuning batches are small. Updating running statistics from a batch of 8 is a classic silent regression.

When not to transfer: when the deployment budget cannot hold the pretrained model (then distil), or when the input is truly alien to it.

For LLM applications specifically, the ordering matters: try prompting, few-shot and retrieval first. Fine-tune for format and behaviour compliance, or to move a task onto a smaller cheaper model. Fine-tuning to inject facts is usually the wrong tool; that is what retrieval is for.

What a good answer covers

  • How much you unfreeze should scale with how much task data you have and how far your domain sits from…
  • Frozen backbone plus a linear probe
  • Unfreeze the last N blocks
  • Full fine-tune
  • PEFT / LoRA

Key terms: Unfreeze the last N blocks · Full fine-tune · PEFT / LoRA · Much lower LR than pretraining · Discriminative LRs · Keep BatchNorm in eval mode

Interviewer follow-ups to expect

  1. You fine-tuned and the model got better at your task but worse at everything else. Diagnose and fix. Why does LoRA resist catastrophic forgetting more than full fine-tuning at the same effective learning rate?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep