179 questions
No questions match those filters.
QLoRA versus LoRA — what does QLoRA specifically add, a...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansPlain LoRA solves the trainable-parameter problem: instead of updating every weight, you freeze the base model and train small low-rank adapter matrices injected into specific layers. That’s a huge win for optimizer-state and gradient memory, but it does nothing about the base model itself — the frozen weights still have to sit in GPU memory at whatever precision they were loaded in, and for a large model that alone can exceed a single consumer GPU’s memory.
QLoRA’s specific contribution is attacking that remaining cost: it quantizes the frozen base weights to 4-bit using NF4 (NormalFloat4), a quantization scheme designed around the fact that pretrained weights are approximately normally distributed, which preserves more precision than a naive uniform 4-bit scheme. During each forward and backward pass, the relevant 4-bit weights are dequantized on the fly to compute with the LoRA adapters, which themselves remain in higher precision throughout training.
Two supporting tricks make this practical at scale: double quantization quantizes the per-block quantization constants themselves, squeezing out additional memory with negligible accuracy cost, and paged optimizers use NVIDIA’s unified memory to automatically spill optimizer state to CPU RAM during rare memory spikes rather than crashing. Together these are what let QLoRA fine-tune a 65B model on roughly 48GB of GPU memory — hardware that couldn’t hold that model’s weights at fp16 at all, let alone fine-tune it.