Skip to content

LoRA (Low-Rank Adaptation)

Briefly

LoRA — fine-tuning through the addition of external compact low-rank matrices without changing all model weights.

Analogy

The model is a giant encyclopedia in a hard cover. Instead of re-printing the entire book, LoRA adds a thin notebook with sticky notes at the end.

How it works mathematically

  1. The base model weights are 'frozen' — they are not allowed to change.
  2. Two small low-rank matrices are created nearby.
  3. Only these matrices are adjusted during training.

The query goes through the base model + through the 'overlay' matrices.

Practical benefits

  • Instead of a weight of 15 GB, a LoRA adapter file takes up 20–100 MB.
  • One adapter can be 'plugged in' to a model as a plugin and removed when necessary.
  • Several adapters can coexist, switching the behavior of one model.

See also