TECHNOLOGY

LoRA represents a weight update as a product of smaller matrices

In this article
THE QUICK TAKE

LoRA constrains the added update through a low-rank factorization while retaining the base matrix; the resulting full layer need not itself be low rank.

Low-rank adaptation changes selected layers through a small trainable update instead of training every entry of the base weights. The update is represented by the product of two matrices with a narrow intermediate dimension. Following the shapes clarifies what LoRA saves and what the rank restriction actually applies to.

Add a factored update to a base layer

For a linear layer, the effective transformation combines the original weight matrix with an appropriately scaled product of two trainable factors. The base can remain frozen while gradients update the factors. Their inner dimension is the adapter rank. Multiplication orientation depends on the implementation’s weight convention, but the product must match the base matrix’s input and output axes. Naming the shapes is more informative than memorizing letter names, which can vary across explanations while describing the same linear transformation.

Count a small illustrative factorization

A 4 by 4 matrix contains 16 entries. A rank-1 update can use a 4 by 1 factor and a 1 by 4 factor, containing 8 entries together. The example isolates parameter arithmetic and does not promise a useful adapter at that rank. Larger layers and chosen ranks determine actual savings. The product’s rank is bounded by the narrow dimension, but adding it to a full-rank base does not force the entire resulting matrix to have that same small rank.

The bottleneck restricts update directions

The factors limit the family of updates available to the selected layer. Training learns useful input and output directions within that factorized form. This is not equivalent to choosing a fixed subset of original weight entries or deleting all other features. It also does not mean the adapter stores a simple collection of human-readable facts. The trained update participates in the entire network, and its usefulness depends on target modules, data and objective. Rank is a representational choice rather than an independent universal quality knob.

Separate trainable savings from total execution memory

The frozen base still participates in forward computation. Activation storage and other buffers remain, while optimizer state is needed for the trained factors rather than every frozen parameter under the intended setup. Report trainable parameter count separately from total model and peak memory. A tiny test can reconstruct the effective matrix and compare its output with the explicit base-plus-adapter path under a numerical tolerance. This verifies the algebra before evaluating whether the learned adaptation improves the intended task.

Primary research and implementation references

Reproducible inference stacks: preserving a GPU pilot’s result; A GPU inference benchmark you can trust.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles