Finetuning 2
Freeze or unfreeze, full finetuning vs PEFT: adapting a large pre-trained model
In this chapter, you will learn to
- Adapt a large pretrained model to a new task
- Choose what to freeze and what to retrain
- Adapt a model cheaply (PEFT methods)
Tools: Hugging Face Transformers
3 exercises
Each exercise is graded automatically, in your browser. The full statements are available once you have an account.
What this is for in real life
Almost nobody trains a large model from scratch: you start from a pretrained model and adapt it. The whole question is what to change, and at what cost. - Medicine. In 2017, Stanford's CheXNet team took a…
Freeze or unfreeze?
Your medical classifier works. But a colleague asks an interesting question: "The pre-trained features come from natural images (cats, cars...). Chest X-rays are very different. What if the intermediate layers needed to…
Adapt a Giant, Almost for Free
Finetuning a large model by retraining all its weights is slow and greedy. LoRA (Low-Rank Adaptation) is the trick that democratised finetuning: you freeze the entire model and insert only tiny…