> Agents: start at https://frontierintelligencelab.com/llms.txt — API: https://frontierintelligencelab.com/v1/openapi.json

# LoRA vs QLoRA: memory, speed and cost

LoRA trains small adapter matrices on top of a frozen model kept in 16-bit precision. QLoRA does the same with the frozen model stored in 4 bits, which cuts the memory for its weights to about a quarter. Use LoRA when the model fits your GPU; use QLoRA when it does not, and accept slower steps.

## How they work

**LoRA** (Low-Rank Adaptation, [Hu et al., 2021](https://arxiv.org/abs/2106.09685)) freezes the base model and learns two small matrices beside chosen layers. Only those matrices are trained, so the optimizer state and gradients are tiny compared with full fine-tuning. The paper reports, for GPT-3 175B, about 10,000 times fewer trainable parameters and about a third of the GPU memory of full fine-tuning.

**QLoRA** ([Dettmers et al., 2023](https://arxiv.org/abs/2305.14314)) keeps the same adapters but stores the frozen base model in a 4-bit format (NF4), quantizes the quantization constants too ("double quantization") and pages optimizer state to CPU memory during spikes. The paper reports fine-tuning a 65B model on a single 48 GB GPU.

## Memory, as a rule of thumb

The frozen weights dominate. Approximate bytes per parameter:

| Format | Bytes per parameter | 8B model | 70B model |
| --- | --- | --- | --- |
| 16-bit (bf16), as in LoRA | 2 | about 16 GB | about 140 GB |
| 4-bit (NF4), as in QLoRA | about 0.5 | about 5 GB | about 35–40 GB |

Add room for activations, which grow with sequence length and batch size, and for the adapters and their optimizer state. These are planning numbers for the weights only, not a promise that a job fits: measure on your own data. Our [GPU guide](/guides/gpu-for-fine-tuning-8b-70b) turns them into card sizes.

## Speed

QLoRA has to turn 4-bit weights back into 16-bit numbers for every forward and backward pass, so each step is usually slower than LoRA on the same GPU. If a model fits in 16 bits on your card, LoRA is the faster choice. If it does not fit, QLoRA's slower steps beat a job that cannot start.

## Quality

The QLoRA paper reports that 4-bit QLoRA matched 16-bit fine-tuning on the benchmarks it tested. Treat that as a starting point, not a guarantee for your task. Compare both on your own held-out cases if quality is close to your acceptance line.

## Cost

Cost is GPU-hours times the hourly price. QLoRA lets a smaller, cheaper card run the job, but may take longer on it. As a rough example from our [GPU price index](/guides/gpu-price-index-november-2026): if QLoRA lets a 70B job run on one rented H100 instead of two, the hourly bill halves even if the job runs somewhat longer.

## What Valcairn uses today

The Valcairn runner trains LoRA adapters on a bf16 base model on your own GPU, with supervised fine-tuning, preference pairs (DPO) or a reward-checked method (GRPO). It does not run 4-bit QLoRA today, so the model has to fit your card in 16 bits. See [train a model on your own GPU](/guides/train-on-your-own-gpu).

## Questions

### Is QLoRA worse than LoRA?

Not necessarily. The QLoRA paper reports matching 16-bit results on its benchmarks. It is usually slower per step. Measure both on your own held-out cases when quality is close to your bar.

### Can I merge a QLoRA adapter into the base model?

Yes. Merge the adapter into the base model loaded in 16 bits, not into the 4-bit copy, then quantize the merged model again if you need a small file for serving.

### What rank should I use for LoRA?

Ranks between 8 and 64 are common starting points. Higher ranks add capacity and memory. The Valcairn runner defaults to rank 32 with alpha 64, and accepts ranks from 1 to 128.

### Does LoRA or QLoRA change which GPU I need?

Yes, mostly through the frozen weights. An 8B model needs about 16 GB for its weights in 16 bits and about 5 GB in 4 bits, before activations. A 70B model needs about 140 GB and about 35–40 GB respectively.
