Custom AI models for the enterprise · New York · LondonSecurityResearchContact sales
Finetune the World
Glossary

LoRA (Low-Rank Adaptation): definition, math and practical numbers

LoRA freezes a model’s weights and trains a small low-rank update for selected matrices, cutting trainable parameters by 50–300× and training memory by roughly 8×.

Definition#

LoRA (Low-Rank Adaptation, Hu et al. 2021) is a parameter-efficient fine-tuning method. Instead of updating a weight matrix , it learns two small matrices whose product is the update:

starts at zero so training begins at the base model; (the rank, typically 4–64) and (a scaling factor) are hyperparameters. Each adapted matrix gains trainable parameters.

In numbers#

For Qwen2.5-7B with rank 16 on all linear layers, LoRA trains 40.4M parameters (0.53% of the model), and weight-plus-optimizer memory falls from about 113 GB to 15 GB (memory model). Compute per token falls only by about a third, from to , because activation gradients still flow through every layer.

Choosing the rank#

In our experiment, rank 4 already reached 100% on familiar inputs; on unseen formats accuracy rose from 85% at rank 1 to 97% at rank 16. Rank buys robustness more than in-distribution accuracy.

Related: QLoRA, LoRA vs QLoRA vs full fine-tuning.

Bring us one task. We’ll show you what a specialist model can do.

A 45-minute briefing with a senior research engineer. You leave with a feasibility read, a data plan and a fixed quote, whether or not you hire us.

Book a briefing →