esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

What Is LoRA?

What LoRA is, why it makes fine-tuning a large model far cheaper, and where it still needs testing, explained simply for your AI interview.

In short

LoRA (Low-Rank Adaptation) fine-tunes a large model by freezing its original weights and training only small matrices added to each layer. It matches or beats full fine-tuning on the paper's tests, with far fewer trainable numbers and less GPU memory for training, so one base model can serve many teams.

10 min readIntermediateVery common · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

LoRA stands for Low-Rank Adaptation. It fine-tunes a large model by freezing the original weights and training only a small pair of matrices added to each layer. The 2021 paper that introduced it reported quality on par or better than fine-tuning on its tests, with far fewer trainable parameters. The big win for a team is cost: one base model can serve many teams, each with a small adapter they can swap in.

What is LoRA, in plain words?

A language model is made of weights: numbers that hold what it learned. Fine-tuning adjusts those numbers so the model fits a job, such as answering bank customers in the right tone.

The problem is size. Full fine-tuning changes every weight, so each team that wants its own version needs its own full copy to train, store and serve. The 2021 LoRA paper says full fine-tuning becomes less feasible as models grow. LoRA is one of the most popular parameter-efficient fine-tuning (PEFT) methods, and PEFT methods train only a small number of extra parameters.

Think of a hospital triage nurse who already knows her job. Give her a short protocol card for one ward, and swap the card when the ward changes. LoRA's card is a small add-on, called an adapter, that sits beside a frozen model. A bank does the same with one base model: a small adapter teaches it the house wording and tone for one product, while fee amounts come from a lookup.

Key words

Weights
The numbers inside a model that hold what it learned.
Fine-tuning
Further training on your own examples, to fit a job.
Frozen
Locked, so training never changes those numbers.
Adapter
The small trained add-on that LoRA keeps per team.
Rank
The size of the small middle, which sets how many numbers train.

How does LoRA work inside a layer?

Each layer of the model multiplies its input by a big grid of weights. LoRA leaves that grid frozen and adds a side path next to it. The side path squeezes the input into a few numbers, then expands it back to full size. The two outputs are added, so the layer acts like the original plus a small learned change.

How LoRA adds a small trained path to a frozen layer

Layer input

output of the layer before

Frozen weights

Original weights

never changed in training

Small adapter (trained)

Small matrix A

squeezes input to rank size

Small matrix B

expands back to full size

Add the two outputs

original answer plus the change

Layer output

behaves like the tuned model

  1. 1The layer input goes into the frozen original weights.
  2. 2The same input also goes into the small adapter.
  3. 3Matrix A squeezes it down, then matrix B expands it back.
  4. 4The original weights give their normal answer.
  5. 5The adapter's change joins that answer.
  6. 6The sum moves on to the next layer.
The frozen weights and the trained pair read the same layer input. The pair's output is added to the original output. Only the pair is trained, and the original weights never change.

The rank is the width of that squeeze. A rank of 8 keeps 8 numbers in the middle. A lower rank means fewer trainable numbers, and a higher rank gives the adapter more room to learn, at the cost of more numbers. Q286 goes deeper on rank.

What does LoRA save, and what does it cost?

  • “We propose Low-Rank Adaptation, or LoRA, which freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks.”

    The 2021 LoRA paper

  • “The original weight matrix remains frozen and doesn't receive any further updates.”

    Hugging Face's PEFT docs

  • Saves

    Trained numbers and memory

    Far fewer numbers to train and store. Each team keeps only its small adapter file.

  • Limit

    Still needs testing

    Results depend on the task and the rank. Measure the adapter on your own cases before release.

  • Serving

    No extra delay

    No extra delay once merged into the base weights, according to the paper and Hugging Face's docs.

In the paper's own test on GPT-3 175B, compared with full fine-tuning using Adam, LoRA can reduce the trainable parameters by 10,000 times and the GPU memory requirement by 3 times. The paper also reports VRAM use during training falling from 1.2TB to 350GB on that model. The numbers below use made-up sizes. The ratio is what matters.

Python
# A bank runs one base model for 12 product teams. Each team wants its own adapter.
# Made-up sizes: 32 layers, each a 4,096 by 4,096 grid of weights, rank 8.
LAYERS = 32
WIDTH = 4096
RANK = 8
TEAMS = 12

full_copy = LAYERS * WIDTH * WIDTH       # one full fine-tune for one team
adapter = LAYERS * 2 * WIDTH * RANK      # the two small matrices, one set per team

print(f"Full copies for {TEAMS} teams: {TEAMS * full_copy:,} weights")
print(f"Adapters for {TEAMS} teams: {TEAMS * adapter:,} weights")
print(f"One adapter is {adapter / full_copy:.2%} of a full copy")

Output

Full copies for 12 teams: 6,442,450,944 weights
Adapters for 12 teams: 25,165,824 weights
One adapter is 0.39% of a full copy

Each team's adapter is under half a percent (0.39%) of a full copy here, so twelve teams cost far less than twelve full models.

Tip

Asked about cost? Say where the saving comes from: only the small matrices are trained and stored per team, and the frozen base is shared.

How would you choose LoRA for a bank's support bot?

A bank wants its assistant to use its own fee wording and tone for twelve products. The base model already knows general language, so the team only needs to teach it the house wording and tone for each product.

  • Without LoRA

    Twelve full copies

    Each product gets a full fine-tuned model to train, store and serve. Every update is costly.

  • With LoRA

    One base, twelve adapters

    Train a small adapter per product on its own examples, and swap it in when the wording changes.

The catch is serving. Merged into the base, an adapter adds no delay, but each product's model becomes a full-size copy again. Kept separate, adapters stay small and swappable, and the paper says that route suits cases where latency is not critical.

Then say what LoRA does not settle. It changes how the model behaves on your data. It does not make the model's facts reliable, so fee amounts still come from a lookup the code checks.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: LoRA freezes the original weights and trains a small add-on.
  • Why it helps: full fine-tuning changes every weight, so each team needs a full copy.
  • Rank: the size of the small middle, the setting that controls how many numbers train.
  • The paper's numbers, dated 2021 and tied to its test setup.
  • Trade-offs: cheap and easy to swap, but still measured on your own task.
  • How one base model can carry many small adapters.

Common traps

  • Trap"LoRA shrinks the model."

    BetterThe base model keeps its full size. Only the small add-on is trained and stored.

  • Trap"LoRA is always as good as full fine-tuning."

    BetterThe paper reports on par or better results on its tests. Your task can differ, so measure it.

  • Trap"Once the adapter is trained, the model knows the facts."

    BetterAn adapter shapes behaviour. Facts that change still need retrieval or a lookup the code checks.

Can you spot the mistake?

Spot the mistake

A team's LoRA plan for a claims-triage model. Which step breaks the idea?

Quick check

One base model must serve 12 teams, each with its own tone and house wording. Which setup fits best?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q283What is PEFT?11 min
  2. Q285What is QLoRA?10 min
  3. Q286What does LoRA rank mean?10 min
  4. Q287What is SFT / instruction tuning?11 min
  5. Q281Fine-tune vs RAG vs prompting: when to use which?10 min
  6. Q303How do you serve many LoRA adapters?Coming soon

Last updated on 26 November 2026

Fine-tuning a model for your team's own work?

I design and build AI products and agents, including the system behind them. Book a short call and tell me what you need the model to do, and what data you have.