Low-Rank Adaptation

Adapting every weight in a large model can be expensive. LoRA keeps the original weights fixed and learns a smaller correction through two narrow matrices, reducing the number of parameters that need updating.

10 sections · 10 questions · 4 coding challenges

1 / 10

Must We Change Every Weight to Teach a Model a New Task?

BOTIE

A large pretrained model already contains a useful representation. Updating every weight for each new task can require substantial training memory and a separate large set of parameters to store for every adaptation. We would like to preserve most of that shared work.

Hu and colleagues introduced LoRA in 2021, motivated by the possibility that useful task-specific changes occupy a much smaller space than the full weight matrices. They froze pretrained weights and learned low-rank updates through smaller matrices.

The original transformation remains available. Two smaller learned transformations together provide an adjustment to it. Their restricted size limits the rank of the update, reducing the number of trainable parameters. This is an assumption about the changes needed for adaptation, not a claim that the original model itself has only a few useful directions. The rank controls the capacity of the adjustment.

Sources for this history