/ THE IDEA
A matrix is a rectangular table used in calculations. A model layer can multiply its input numbers by a large matrix of settings, often called weights. Ordinary full fine-tuning allows each of those weights to change independently. Low-rank adaptation instead builds the change by multiplying two thinner matrices. Rank describes how many independent directions that product can express. Choosing a small rank reduces trainable settings, while also limiting the changes available. The original matrix plus this product defines the adapted calculation.
THE FORMAL IDEA
W_new = W + BA; trainable settings = r(d_in + d_out)
| W = original table of settings; W_new = adapted table. W has d_out rows and d_in columns. B has d_out rows and r columns; A has r rows and d_in columns. | | r = chosen rank limit; the actual product may have lower rank. BA means matrix multiplication, producing an adjustment with the same shape as W. Dimensions and parameter counts are whole numbers, not physical units. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Take a 4-by-4 W: full adaptation could train 16 entries. With r = 1, B has 4 entries and A has 4: train 8. Change only r to 2: train 2 × (4 + 4) = 16 entries. The saving disappears in this tiny example as the allowed adjustment becomes richer.
|
The arithmetic shows why low rank matters. Using the name LoRA is not itself a guarantee of a small adapter: rank and the layers receiving adapters determine how many settings must be learned. Larger matrices can offer much bigger savings at low rank.
/ SO WHAT?
For a document-classification project, this can make it practical to keep separate small adaptations for different tasks while sharing a base model. Still evaluate the adapted behaviour on untouched examples. A small training file can change important decisions, and saving trainable memory does not remove the memory needed to hold or run the base model.
ONE CAVEAT |
| This omits the usual scaling factor and assumes an unmerged additive adapter. Not every desired change is well represented at low rank; training activations and other components also consume memory. |
KEEP THIS
Restricting an update to a few coordinated directions reduces trainable settings but constrains what can change.
|
NEXT: Why the same pressure can give two different readings
|