EasyDeepLearn
Deep Learning · section 16 of 19

Transfer learning & fine-tuning

3 interview questions on transfer learning & fine-tuning, each answered in full. Free to read, no account needed.

What is transfer learning and when is fine-tuning better than feature extraction?

medium
  • Transfer learning reuses a model pretrained on a large source task on a new target task.
  • Feature extraction freezes the backbone and trains a new head — fast, works when the target is small and similar to pretraining data.
  • Full fine-tuning updates all weights — better when you have enough target data or when target differs significantly.
  • Modern LLMs often use parameter-efficient fine-tuning (LoRA, adapters) to combine both benefits.
#transfer-learning#fine-tuningPermalink & quiz →

What is LoRA and why is it the standard for parameter-efficient fine-tuning?

hard
  • LoRA (Hu et al., 2021) freezes the pretrained weights W and adds a low-rank update ΔW = B * A (with  A    R(r×d),  B    R(d×r),  r  <<  d)(\mathrm{with}\;A\; \in \;R(r \times d), \;B\; \in \;R(d \times r), \;r\; < < \;d).
  • Only A and B are trained → ~0.1-1% of the total parameters.
  • Matches full fine-tuning quality on most tasks at a fraction of memory and disk cost.
  • Multiple LoRA adapters can be swapped per task at inference.
  • QLoRA quantizes the frozen base to 4-bit and trains LoRA on top — fine-tune 65B models on a single 48GB GPU.
#fine-tuning#transfer-learning#distillationPermalink & quiz →

With a small labelled dataset and a large pretrained backbone, which parameters do you actually train?

medium
  • Start with the smallest set that can express the task.
  • Train only a new head first, which is fast, cannot damage the backbone, and gives a baseline within minutes.
  • If that underfits, unfreeze the last block or two, since later layers hold the most task-specific features while early layers encode generic edges and textures that transfer.
  • Use a lower learning rate on unfrozen pretrained weights than on the fresh head, often by a factor of ten, to avoid destroying what pretraining learned.
  • With very little data, a parameter-efficient method such as low-rank adapters gives most of the benefit of full fine-tuning while touching a small fraction of the weights, which also makes the result cheap to store and easy to revert.
#transfer-learning#fine-tuningPermalink & quiz →

Practise Deep Learning