Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…
Training & Inference

QLoRA: definition + examples

QLoRA (Quantized Low-Rank Adaptation), introduced by Tim Dettmers et al. in their 2023 paper "QLoRA: Efficient Finetuning of Quantized Language Models", is a parameter-efficient fine-tuning (PEFT) technique that dramatically reduces the memory footprint required to fine-tune large language models (LLMs). It achieves this by combining two key innovations: (1) quantizing the pretrained base model to 4-bit precision using a novel data type called NormalFloat (NF4), and (2) applying Low-Rank Adaptation (LoRA) adapters to the quantized model. The core insight is that the frozen, quantized base model can be stored in 4-bit while the trainable LoRA adapters remain in full precision (e.g., 16-bit), enabling fine-tuning of models with billions of parameters on a single consumer GPU (e.g., fine-tuning a 65B parameter model on a 24GB GPU).

How it works technically: QLoRA first quantizes the pretrained model's weights to 4-bit using the NF4 data type, which is optimized for normally distributed weights. To mitigate quantization error, it employs double quantization — quantizing the quantization constants themselves — and uses paged optimizers (e.g., paged AdamW) that leverage unified memory to handle gradient checkpointing spikes by offloading optimizer states to CPU RAM when GPU memory is exhausted. During training, the 4-bit base model is dequantized on-the-fly to the compute data type (e.g., bfloat16) for forward and backward passes, while the LoRA adapters are trained in full precision. After fine-tuning, the LoRA adapters can be merged back into the quantized base model or kept separate for modular deployment.

Why it matters: QLoRA democratizes fine-tuning of state-of-the-art LLMs by reducing hardware requirements by a factor of ~4 compared to full fine-tuning, and by ~2 compared to standard LoRA with a 16-bit base model. It enables researchers, startups, and hobbyists with limited compute budgets to fine-tune models like Llama 2 70B or Mistral 7B on a single RTX 3090 or A100. It also reduces storage costs: a single 4-bit checkpoint for a 70B model occupies ~35GB vs ~140GB for 16-bit.

When it's used vs alternatives: QLoRA is ideal when GPU memory is the primary bottleneck and the goal is to adapt a large pretrained model to a specific domain or task (e.g., instruction following, code generation, medical text). Compared to full fine-tuning, QLoRA trades a small amount of downstream task performance (typically <1% on benchmarks like MMLU or GSM8K) for massive memory savings. Compared to standard LoRA (which keeps the base model in 16-bit), QLoRA reduces memory by ~4x but adds a slight computational overhead due to on-the-fly dequantization. It is not suitable when maximum accuracy is required with no quantization loss, or when training from scratch. For extremely large models (e.g., 400B+), QLoRA remains feasible where full fine-tuning is impossible outside of large clusters.

Common pitfalls: (1) Using suboptimal quantization settings — the NF4 data type is crucial; naive int4 quantization degrades performance. (2) Not using double quantization, which adds ~0.5% memory overhead but significantly improves stability. (3) Forgetting to use paged optimizers when training very large models on limited GPUs, leading to out-of-memory errors. (4) Applying QLoRA to models that are already heavily quantized (e.g., 4-bit AWQ) can compound accuracy loss. (5) Overlooking that QLoRA fine-tuning still requires significant VRAM for activations (e.g., with long context lengths).

Current state of the art (2026): QLoRA has become a standard tool in the PEFT ecosystem, integrated into Hugging Face PEFT, Axolotl, Unsloth, and LLaMA-Factory. Recent improvements include 3-bit and 2-bit variants (e.g., QLoRA with FP4 or MXFP4), dynamic quantization scheduling, and hybrid approaches combining QLoRA with DoRA (Weight-Decomposed Low-Rank Adaptation). The technique is widely used in open-source model families like Llama 3, Mistral, Qwen, and Gemma. For example, fine-tuning Llama 3.1 405B with QLoRA requires only ~240GB of GPU memory (e.g., 4x A100 80GB) versus ~1.5TB for full fine-tuning.

Examples

  • Fine-tuning Llama 2 70B on a single NVIDIA RTX 3090 (24GB) using QLoRA with 4-bit NF4 quantization and LoRA rank=64, as demonstrated in the original QLoRA paper.
  • The OpenAssistant project used QLoRA to fine-tune a 33B LLaMA-based model on conversational data, achieving competitive performance with only 48GB of GPU memory.
  • Fine-tuning Mistral 7B on medical QA datasets (e.g., MedQA) with QLoRA, reducing VRAM usage from ~28GB (full fine-tuning) to ~8GB.
  • The Guanaco 65B model, released by the QLoRA authors, was fine-tuned from LLaMA 65B using QLoRA on a single 48GB GPU and achieved 99.3% of ChatGPT's performance on Vicuna benchmarks.
  • Using QLoRA to adapt Qwen2.5 72B for code generation (e.g., on the HumanEval dataset) with 4-bit quantization, enabling fine-tuning on a single A100 80GB in under 12 hours.

Related terms

LoRAQuantizationParameter-Efficient Fine-TuningDoRAPaged Optimizer

Latest news mentioning QLoRA

FAQ

What is QLoRA?

QLoRA (Quantized Low-Rank Adaptation) is a memory-efficient fine-tuning method that combines 4-bit NormalFloat quantization of a base model with Low-Rank Adaptation (LoRA) adapters, enabling full fine-tuning of large language models on a single consumer GPU.

How does QLoRA work?

QLoRA (Quantized Low-Rank Adaptation), introduced by Tim Dettmers et al. in their 2023 paper "QLoRA: Efficient Finetuning of Quantized Language Models", is a parameter-efficient fine-tuning (PEFT) technique that dramatically reduces the memory footprint required to fine-tune large language models (LLMs). It achieves this by combining two key innovations: (1) quantizing the pretrained base model to 4-bit precision using a novel…

Where is QLoRA used in 2026?

Fine-tuning Llama 2 70B on a single NVIDIA RTX 3090 (24GB) using QLoRA with 4-bit NF4 quantization and LoRA rank=64, as demonstrated in the original QLoRA paper. The OpenAssistant project used QLoRA to fine-tune a 33B LLaMA-based model on conversational data, achieving competitive performance with only 48GB of GPU memory. Fine-tuning Mistral 7B on medical QA datasets (e.g., MedQA) with QLoRA, reducing VRAM usage from ~28GB (full fine-tuning) to ~8GB.