Two different ways to save memory
LoRA freezes a base weight matrix and trains a low-rank update. Quantization stores an approximation of weights using fewer bits. They solve different problems: adapter capacity versus representation cost. QLoRA combines a frozen quantized base with trainable adapters; four-bit storage does not mean every computation uses four bits.
Start with matrix shapes and linear layers. In this lesson, use a tiny matrix to understand the forward pass before considering a GPU-sized model.