LoRA and QLoRA: the math, rank selection and practice
LoRA is the technique that democratised LLM fine-tuning. Before it, fine-tuning a 7B model required ~112 GB of GPU memory — 14 A100s. With QLoRA, the same job fits on a single 24 GB consumer GPU. This lesson explains the mathematical trick that makes this possible, how to choose the key hyperparameter (rank), and how to run it in practice.