passdrill
AI & LLM Engineering · Fine-tuning & Model Customisation · Card 001/010 easy

A team wants to adapt a large pretrained language model to a new domain without updating billions of parameters or storing a full second copy of the model's weights. They choose LoRA (Low-Rank Adaptation) to do this. Under Hu et al.'s original LoRA method, how does the technique actually reduce the number of trainable parameters during fine-tuning?

  1. It fine-tunes every parameter in the pretrained model as usual, but uses a much smaller learning rate so the resulting weight changes stay numerically small enough to store efficiently
  2. It freezes all of the pretrained weight matrices and, for selected layers, injects a pair of much smaller trainable matrices whose low-rank product approximates the update those weights would otherwise need, so only that pair is trained
  3. It deletes the attention layers of the pretrained model and replaces them with a smaller, randomly initialized transformer block that is trained from scratch on the new domain data
  4. It converts the entire pretrained model to 8-bit integer weights and performs ordinary full-parameter backpropagation directly on those compressed integer weights
Next card → Shuffle