liveBook · Manning

QLoRA

As explained in Generative AI in Action

QLoRA is a low-rank adaptation technique that quantizes adapter parameters to reduce the memory required for fine-tuning large language models.

QLoRA combines low-rank adaptation with quantization to reduce the memory and computation required to fine-tune large language models. It quantizes low-rank matrices while preserving the pretrained model weights, enabling efficient specialization without full-model updates. section 9.6.1

The technique provides several practical trade-offs:

  • Reduces trainable parameters and can achieve up to 99% parameter reduction through an 8-bit optimizer for quantization. section 9.6.1
  • Uses lower-precision representations, such as 8-bit or 4-bit values, to reduce model memory and potentially speed inference. section 9.6.1
  • Trades some potential accuracy for efficiency because reduced numerical precision can affect model accuracy. section 9.6.1
Figure 9.14 LoRA reparameterization—only A and B are trained [9]
figure

Inspect the LoRA reparameterization diagram to see how adaptation trains only the low-rank matrices A and B; QLoRA further quantizes those matrices. section 9.6.1

How Generative AI in Action covers it

How deep it goes
Defines quantization and contrasts it with LoRA, but stops short of detailed implementation procedures or mathematical derivation.
Examples
Uses DistilBERT as an example of quantization, reporting fewer parameters while retaining most of BERT’s performance.
What it assumes
Builds from an understanding of fine-tuning, pretrained model weights, LoRA, and numerical precision.
What you can do after
Evaluate QLoRA as a memory-efficient alternative to full-model fine-tuning and distinguish it from ordinary quantization.
How it connects
Connects low-rank adaptation with quantization, fine-tuning, model weights, inference, and generalization.

Also explained in

Compare how 3 books explain QLoRA →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Generative AI in Action. The section links point to the parts of the book it draws on.