Fine-Tuning LLMs on a Budget: LoRA vs QLoRA on Fleet
Full fine-tuning updates every weight in a model. For a 7B-parameter model that means holding the weights, gradients, and optimizer state in GPU memory at once — often 80GB or more. Most people don't need that, and most budgets can't justify it. LoRA and QLoRA get you most of the quality for a fraction of the cost.
The short version
| Method | What it does | Typical VRAM (7B model) | When to use it |
|---|---|---|---|
| Full | Updates all weights | ~80GB+ | Maximum fidelity, large budget |
| LoRA | Trains small adapter matrices | ~18GB | The default for most fine-tunes |
| QLoRA | LoRA on a 4-bit quantized base | ~10GB | Tight budgets, larger base models |
If you're unsure, start with LoRA. If the model won't fit your GPU, switch to QLoRA.
How LoRA works
Instead of updating the original weight matrices, LoRA freezes them and learns small, low-rank "adapter" matrices alongside. Far fewer parameters change, so memory and compute drop sharply — and you can keep the original model intact and swap adapters in and out.
How QLoRA adds quantization
QLoRA goes one step further: it loads the frozen base model in 4-bit precision, then trains LoRA adapters on top. The base takes a quarter of the memory, which is what lets a model that wouldn't otherwise fit run on a smaller, cheaper GPU.
Running it on Fleet
On Fleet you choose the method with a single hyperparameter — everything else stays the same:
import fleet
client = fleet.Fleet()
job = client.jobs.create(
model=client.models.from_huggingface("meta-llama/Llama-3.2-3B"),
dataset=client.datasets.upload("./data.jsonl"),
hyperparameters={"METHOD": "qlora"}, # "full" | "lora" | "qlora" | "dpo"
)
job.monitor()
fine_tuned = job.model()
Fleet estimates the VRAM your run needs and automatically picks the cheapest GPU that fits — so QLoRA lands on a smaller, cheaper instance than full fine-tuning without you pinning a tier by hand. You can still pin one if you prefer.
Which should you pick?
- Quality is everything and budget is open → full fine-tuning.
- You want a strong result cheaply → LoRA. This covers most cases.
- The base model is large or the GPU is small → QLoRA.
Because billing is per-second, the cheaper method is also the faster path to iterate. Start small, measure, and scale up only if the eval numbers tell you to.
Ready to try it? See the fine-tuning docs for the full set of hyperparameters and dataset formats.