4.3.7 · D5Pretraining & Fine-Tuning LLMs

Question bank — Parameter-efficient fine-tuning (PEFT)

1,360 words6 min readBack to topic

Every symbol here comes from the parent note: is the frozen pretrained weight matrix, is the low-rank update ( is tall-thin , is short-wide ), is the rank knob, and is the scaling factor in .


True or false — justify

True or false: LoRA changes the pretrained weight matrix during training.
False. is frozen — gradients never touch it. Only and receive updates; the "change" lives in separate matrices.
True or false: at training step 0, a LoRA model produces exactly the same outputs as the base model.
True. Because at init, , so — identical to the untouched base. Training only adds corrections from there.
True or false: increasing the rank always improves fine-tuning quality.
False. Gains saturate around ; larger wastes memory and can overfit small data. LoRA works because the update is low rank — inflating fights that premise.
True or false: QLoRA stores the trainable adapters in 4-bit.
False. Only the frozen base is 4-bit. Adapters stay in higher precision (e.g. 16-bit) so their gradients carry meaningful signal.
True or false: LoRA adds inference latency the same way adapters do.
False. Adapters insert extra sequential layers → real added compute per token. LoRA merges into , leaving one matrix and zero overhead.
True or false: after fine-tuning with LoRA you must save the entire model to preserve the task.
False. The base is unchanged, so you save only (a few MB) and reconstruct on demand.
True or false: PEFT can reach roughly full fine-tuning quality while updating under 1% of parameters.
True. That is the core empirical claim — the useful weight change has low intrinsic dimension, so most of 's capacity is redundant for a single task.
True or false: freezing the base model helps prevent catastrophic forgetting.
True. Since prior knowledge lives in the untouched , and starts at zero, early training cannot overwrite what the model already knew. See Catastrophic Forgetting.
True or false: the factorization is only exact when actually has rank .
True. Any product with inner dimension has rank at most ; if the true update needs higher rank, can only approximate it. See Low-Rank Matrix Factorization.
True or false: prompt tuning and LoRA are the same family of PEFT.
False. Prompt tuning is prompt-based (prepend trainable soft vectors to the input); LoRA is additive (inject a low-rank weight update). See Prompt Tuning.

Spot the error

Claim: "LoRA trains new parameters per adapted matrix."
Wrong — that's the size of a full . LoRA trains params (from plus ), which is far smaller when .
Claim: "Set and — initialization symmetry means it doesn't matter which is zero."
Misleading. Only the product must start at zero. The parent uses ; if both were random, and the model would jump away from the pretrained state at step 0, risking damage.
Claim: "To double capacity, raise from 8 to 16 and keep ."
Error — that changes the scale from to , weakening the update. Keep the scale fixed by also setting so .
Claim: "QLoRA quantizes the base to save memory, so accuracy must drop a lot because the model computes in 4-bit."
Error in reasoning. The 4-bit weights are only read for the forward pass; the learning happens in full-precision adapters, so quality stays close to 16-bit LoRA. See Quantization.
Claim: "Merging lets you keep swapping tasks at inference for free."
Error — once merged, the adapter is baked in and you lose easy hot-swapping. Multi-task serving keeps adapters unmerged so you can plug a different tiny per request.
Claim: "BitFit is an additive PEFT method that inserts bottleneck MLPs."
Wrong on two counts. BitFit is selective (trains only existing bias terms); bottleneck MLPs are adapters, a different additive method.

Why questions

Why store as two thin matrices instead of one dense matrix?
Because the task update has low intrinsic dimension — numbers capture it, versus for a dense update, e.g. 256× fewer at .
Why divide by in the scaling factor ?
The typical magnitude of 's entries grows with ; dividing by decouples how strong the update is () from how much capacity it has (), so retuning doesn't blow up the update.
Why is LoRA usually applied to the and projections of Transformer Attention?
These projections shape what the model attends to and retrieves; empirically, low-rank updates there recover most task accuracy at minimal cost.
Why does full fine-tuning need ~3× the memory of just the weights?
You also store gradients for every parameter plus optimizer state — Adam keeps two moments — roughly doubling on top of the weights themselves.
Why can you serve many tasks from one base with PEFT cheaply?
The giant base stays in memory once; each task is a few-MB adapter you hot-swap per request, turning "one model per task" into "one model, many plug-ins."
Why does gradient flow through the frozen 4-bit weights in QLoRA even though they aren't updated?
The forward output depends on those weights, so backprop must pass through them to reach the adapters — but the base's own gradient is discarded since it's frozen.

Edge cases

What happens if you set ?
Then have no columns/rows to train — is identically zero forever, so and the model can never adapt. It degenerates to using the frozen base as-is.
What happens if ?
can represent a full-rank , so you regain the expressive power of a dense update — but you also lose the parameter savings, defeating the purpose of LoRA.
If , what does the LoRA layer compute?
— the update is switched off entirely, equivalent to running the frozen base regardless of what learned.
Two adapters trained separately for tasks X and Y — can you just add both terms to serve both at once?
Not reliably. is an untrained sum of independent updates; nothing guarantees the tasks compose linearly, so you may get interference rather than both behaviours.
If the true task update genuinely needs high rank, what does LoRA lose?
can only approximate a high-rank , so accuracy falls short of full fine-tuning — this is the regime where PEFT's low-rank assumption breaks down.
After merging, can you recover the original base weights ?
Yes, if you kept : compute . If you discarded the adapters, the subtraction is impossible and is lost inside .

Connections

  • Full Fine-Tuning — the baseline whose memory cost these traps compare against.
  • Low-Rank Matrix Factorization — why caps rank at .
  • Quantization — the 4-bit read-only trick behind QLoRA.
  • Transformer Attention — where LoRA lives.
  • Prompt Tuning — the prompt-based sibling family.
  • Catastrophic Forgetting — mitigated by freezing + zero-init.