LoRA vs full fine-tuning cost calculator
Full fine-tuning updates every weight in the model — billions of gradients, optimizer states and a large VRAM bill. Parameter-efficient methods like LoRA and QLoRA freeze the base model and train tiny adapters instead. This calculator estimates the GPU hours, VRAM and dollar cost for each approach so you can pick the cheapest method that meets your quality bar.
How it works
Training cost scales with how much compute touches the model. The tool models a few epochs over your dataset and applies a method-specific efficiency factor — LoRA and QLoRA touch far fewer parameters than full fine-tuning, so they finish in a fraction of the GPU hours:
gpu_hours ≈ (dataset_tokens × epochs × method_factor) / gpu_throughput
cost = gpu_hours × gpu_price_per_hour
VRAM is estimated from the model size and the method: full fine-tuning needs memory for weights plus gradients plus optimizer states (~16 bytes/param), while QLoRA’s 4-bit base slashes that requirement.
Why VRAM requirements differ so dramatically
Full fine-tuning stores four things per parameter: the weight value itself, the gradient, and two optimizer moments (Adam’s first and second moment). At 32-bit precision that is 16 bytes per parameter. A 7-billion-parameter model needs roughly 112 GB of VRAM in the full fine-tuning configuration — beyond a single consumer or even datacenter GPU.
LoRA freezes the base model (no gradients, no optimizer states for those weights) and only trains small rank-decomposition matrices — typically a few hundred million extra parameters at most. VRAM drops to roughly 8–14 GB for a 7B model, fitting on a single A10G or RTX 3090.
QLoRA quantizes the frozen base to 4-bit NormalFloat, cutting base model VRAM roughly in half again. A 7B model in QLoRA fits on a GPU with 8–10 GB of VRAM, which opens fine-tuning to consumer hardware entirely.
What LoRA rank controls
The key hyperparameter in LoRA is the rank r. Lower rank (4–8) trains fewer parameters and uses less memory; higher rank (32–64) gives the adapters more capacity to absorb complex patterns. For most style and format adaptation tasks, r=8 or r=16 is sufficient. Only push to higher ranks if initial results show the model cannot capture the target distribution.
Choosing between the three methods
| Task type | Recommendation | Reason |
|---|---|---|
| Chat fine-tune, format adaptation | QLoRA (r=8–16) | Lowest cost, single GPU, minimal quality gap |
| Domain vocabulary injection | LoRA (r=16–32) | Moderate capacity, fast iteration |
| Continued pre-training | Full fine-tuning | Needs to update every layer for new token distributions |
| Instruction following (RLHF/DPO) | QLoRA or LoRA | Adapter methods proven at this task |
| Catastrophic domain shift | Full fine-tuning | Adapters may lack capacity |
Merging adapters for inference
A practical LoRA advantage: at inference time you can either load the base model plus the tiny adapter file (low memory, easy to swap) or merge the adapter weights back into the base model to get a single checkpoint with no inference-time overhead. This matters for production deployments where inference latency is constrained.
Tips and notes
- Start with QLoRA — it usually matches LoRA quality for task adaptation at the lowest VRAM and cost, and runs on a single mid-range GPU.
- Reserve full fine-tuning for large domain shifts where adapters can’t absorb enough new behaviour; for style and format tasks it’s overkill.
- These are planning estimates. Real throughput depends on sequence length, batch size and framework, so validate on a small run before committing.
- When comparing GPU options in the calculator, note that higher-VRAM GPUs (A100 vs A10G) matter most for full fine-tuning; for QLoRA a cheaper consumer GPU can be faster per dollar.