QLoRA: Unlocking 70B LLM Fine-tuning on Single GPU

QLoRA combines 4-bit quantization with LoRA to enable memory-efficient fine-tuning of large language models, allowing models up to 70 billion parameters to be fine-tuned on a single A100 80GB or RTX 4090 GPU and achieving up to 37.5% VRAM savings for 7B models compared to standard fine-tuning.

The top 3

  1. QLoRA's NF4 Quantization: Optimal Memory Shrink: QLoRA introduced 4-bit NormalFloat (NF4) quantization, an information-theoretically optimal data type for the normally distributed weights found in neural networks, which is crucial for achieving drastic memory reduction while preserving model performance.
  2. Memory Breakthrough: 70B LLMs on a Single 24GB GPU: QLoRA achieves 5-7x greater memory savings compared to standard LoRA, making it possible to fine-tune a 70-billion parameter model on a single consumer-grade GPU with 24GB VRAM, such as an RTX 4090, by compressing the base model's memory footprint from approximately 140GB to about 18GB.
  3. Beyond 4-bit: Double Quantization & Paged Optimizers: QLoRA preserves near 16-bit fine-tuning performance by incorporating additional memory-saving innovations: double quantization, which quantizes the quantization constants themselves, and paged optimizers, designed to manage memory spikes and prevent out-of-memory errors.

Sources

Open the full topic