The core idea
LoRA (Low-Rank Adaptation, Hu et al. 2021) is the single most important PEFT technique in practice. Instead of updating a full weight matrix W (size d×d), LoRA decomposes the update into two small matrices:
W' = W + BA
Wis the original frozen weight matrix (d × d)Bis a small matrix (d × r)Ais a small matrix (r × d)ris the rank — typically 8, 16, 32, or 64
For a matrix with d=4096 and r=16:
- Full update: 4096 × 4096 = 16.7M parameters
- LoRA update: (4096 × 16) + (16 × 4096) = 131K parameters — a 128× reduction
Why it works
The key hypothesis: weight updates during fine-tuning have low intrinsic rank. The changes needed to adapt a model to a new task don't require modifying every dimension of the weight space — they can be captured in a much lower-dimensional subspace.
Initialization
Matrix A is initialized with random Gaussian values, B is initialized to zeros. So at the start of training, BA = 0, the model is identical to the pre-trained one. Training gradually learns the right update.