← Back to modules

Fine-tuning & PEFT — Advanced

LoRA math and rank/alpha, QLoRA internals (NF4, double quant, paged optimizers), DoRA, AdaLoRA, LoRA+, multi-adapter serving, quantization interplay, and forgetting trade-offs.

Hard50 questions

Sample questions

1

In LoRA, the update is scaled by α/r. What does decoupling α from r let you do?

  • Change rank without rescaling the update
  • Freeze more layers as rank rises
  • Skip initializing B to zero
  • Quantize the adapter automatically

Why

Because the effective scale is α/r, raising r while keeping α/r roughly constant keeps the update magnitude stable, so you can sweep rank without re-tuning learning rate. It doesn't change freezing, initialization, or quantization.

2

QLoRA's 'double quantization' reduces memory by doing what?

  • Quantizing the base weights twice to 2-bit
  • Quantizing both weights and activations
  • Quantizing the LoRA adapters to 4-bit
  • Quantizing the quantization constants themselves

Why

Double quantization compresses the per-block quantization constants (scales) with a second quantization step, shaving extra bytes per parameter. It is not 2-bit weights, activation quantization, or adapter quantization.

3

DoRA improves on LoRA by decomposing the pretrained weight into which two parts?

  • Sparse and dense components
  • Query and value projections
  • Magnitude and direction, adapted separately
  • Encoder and decoder halves

Why

DoRA splits each weight into a magnitude scalar and a direction vector, applying LoRA to the direction and learning the magnitude separately, which narrows the gap to full fine-tuning. It isn't a sparse/dense, q/v, or encoder/decoder split.

4

AdaLoRA parameterizes each update in SVD-like form so it can do what during training?

  • Merge adapters into the base after each step
  • Switch from 4-bit to 8-bit dynamically
  • Replace attention with a low-rank layer
  • Prune singular values to reallocate rank across modules

Why

AdaLoRA writes ΔW ≈ PΛQ and prunes the least-important singular values, moving rank budget to modules that need it. It doesn't merge each step, change quantization on the fly, or replace attention.

5

LoRA+ argues that A and B should be trained with what difference?

  • Different ranks for A and B
  • Different learning rates for A and B
  • Different quantization for A and B
  • Different dropout for A and B

Why

LoRA+ shows that using a higher learning rate for B than for A improves convergence and final quality, since the two matrices play asymmetric roles. It's not about differing ranks, quantization, or dropout.

Free account

Take the full module

These are the first few of 50 questions. A free account opens the rest as a scored drill.

  • Every question in this module
  • Instant feedback and supporting reading
  • Your score and progress, saved

Free · your email is used for progress only.