The original model has a weight matrix W (huge). LoRA adds two small matrices A and B. Their product (A×B) is much smaller, and only A and B are trained.
W (frozen)
⬛
4096 × 4096
16.7M params
NOT trained
+
A (trained)
▬
4096 × 16
65K params
×
B (trained)
▪▪▪
16 × 4096
65K params
=
The "rank 16" adapter
130K total trained
vs 16.7M original
= 0.8% of params!
Why does A×B work? Research discovered that the changes needed to fine-tune a model have "low intrinsic rank" — meaning the effective change can be expressed as a product of two small matrices. This is the key insight. The rank (16 in this example) controls the expressiveness of the adapter.
The "rank" number controls how many parameters LoRA trains. Higher rank = more expressive but more expensive. Drag to explore.