Training a model like GPT-3 from scratch costs tens of millions of dollars. But what if you just want to teach the same model to write legal summaries, answer medical questions, or speak a new language? Full fine-tuning reruns the whole optimization over billions of weights — most of which barely need to move at all.
LoRA (Low-Rank Adaptation, Hu et al., 2021) makes a simple but powerful observation: the change in a weight matrix during fine-tuning lies on a very low-dimensional surface. Instead of updating the full matrix , LoRA freezes and injects two small matrices and (where ). Only and are trained; the effective update is .
With a rank as low as , LoRA reduces the trainable parameters for a large transformer layer from tens of millions to a few thousand — yet matches full fine-tuning on most benchmarks. The frozen weights cost no gradient memory, and the adapters can be swapped instantly between tasks.
LoRA belongs to a family called PEFT (Parameter-Efficient Fine-Tuning), which also includes prompt tuning, prefix tuning, and adapter layers. All share the same goal: adapt a frozen giant with a tiny trainable patch.
Comments
Loading comments...