Wandering Giants Compute · Learn
Cost breakdown

How Much Does It Cost to Fine-Tune an LLM?

The short answer

Fine-tuning an open LLM on rented GPUs costs roughly $3.34–$10.80 for a LoRA run on an 8B model, $34.23–$68.36 for QLoRA on a 70B model and $251.50–$351.80 for a full fine-tune of an 8B model on a billion tokens (estimates at our list prices). Repeat runs and idle setup time often cost more than training.

Cost formula
GPU-hours × price per GPU-hour
Training compute, full fine-tune
≈ 6 × parameters × training tokens FLOPs
Training compute, LoRA
≈ 4 × parameters × training tokens FLOPs (rule of thumb)
Full fine-tune memory (Adam, mixed precision)
≈ 16–20 bytes per parameter + activations
QLoRA memory
≈ 4-bit weights + a few GB
H100 PCIe dense BF16 peak
about 756 TFLOPS
A100 dense BF16 peak
312 TFLOPS

Fine-tuning an open model is cheaper than most people expect, and more expensive than the first estimate. The training compute for a LoRA run on an 8B model costs a few dollars. What drives the real bill is choosing a card the job fits on, the number of runs it takes to get a good result, and GPUs sitting idle while you debug. This article gives the memory sums, the GPU-hour formula and cost tables for the fine-tunes people actually run.

How do you calculate the cost of a fine-tune?

A fine-tuning run costs GPU-hours × price per GPU-hour. GPU-hours come from the compute the job needs divided by what the GPU sustains:

text
Full fine-tune FLOPs ≈ 6 × N × T        (N = parameters, T = training tokens)
LoRA FLOPs           ≈ 4 × N × T        (no weight gradients for the frozen base)
Wall-clock seconds   = FLOPs ÷ (GPUs × peak dense BF16 FLOPS × utilisation)
GPU-hours            = GPUs × wall-clock seconds ÷ 3,600
Cost                 = GPU-hours × price per GPU-hour

Training tokens means examples × tokens per example × epochs. 10,000 examples of 1,000 tokens over 2 epochs is 20 million training tokens.

Utilisation (often called model FLOPs utilisation, MFU) is the share of peak the GPU really delivers. For fine-tuning, 20–40% is a sensible planning range: short sequences, padding, data loading and LoRA's small matrix operations all keep it below the 40–50% large pre-training runs achieve. QLoRA is lower again because the base weights are dequantised on the fly. Published dense BF16 peaks we use: A100 312 TFLOPS, H100 PCIe about 756 TFLOPS.

How much GPU memory does each kind of fine-tune need?

Memory decides which card you rent, so work it out first. Full fine-tuning with Adam in mixed precision needs about 16–20 bytes per parameter before activations: BF16 weights and gradients, FP32 master weights and two FP32 Adam moments. LoRA keeps the base frozen; QLoRA also stores it in 4-bit.

ModelFull fine-tune (16–20 B/param)LoRA, BF16 baseQLoRA, 4-bit base
8B128–160 GB → 2–4× 80 GB cards~16 GB + a few GB → 24 GB (tight), 48 GB comfortable~5 GB + a few GB → 24 GB easily
14B224–280 GB → 4× 80 GB cards~28 GB + → 48 GB~8 GB + → 24 GB
32B512–640 GB → 8× 80 GB cards (tight)~64 GB + → 80 GB~18 GB + → 24 GB (short sequences) or 48 GB
70B1.1–1.4 TB → 8× B200 at the edge, 8× B300, or multi-node~140 GB + → 180 GB B200, or 2× 80 GB~38 GB + → 48 GB (tight) or 80 GB

Inputs: parameters × bytes per parameter; "a few GB" covers adapters, their optimiser state and activations at modest sequence lengths with gradient checkpointing. Long sequences need more. Rules of thumb; check with a short run.

The 70B full fine-tune row matters: it needs more GPU memory than 8× 80 GB cards provide even with the work sharded across them. You either use 8× B300 (2.3 TB in one machine), offload optimiser state to CPU memory with DeepSpeed ZeRO-Offload and accept slower steps, or rent a multi-node cluster with InfiniBand from a provider that offers one. Detail in how much VRAM you need to fine-tune an LLM.

What do common fine-tuning runs cost?

These are the runs we see most often, costed at our list prices. Training tokens and hardware are stated for each so you can rescale to your own dataset.

JobTraining tokensHardwareWall-clock (estimate)GPU-hours (estimate)Cost at our prices
QLoRA, 8B20M1× RTX 40902–7 h2–7$3.18–$11.13
LoRA, 8B20M1× A100 80GB1.6–2.8 h1.6–2.8$6.18–$10.80
LoRA, 8B20M1× H1000.7–1.2 h0.7–1.2$3.34–$5.89
LoRA, 32B50M1× H1006.7–11.8 h6.7–11.8$33.53–$58.68
QLoRA, 70B20M1× A100 80GB17–33 h17–33$62.99–$125.98
QLoRA, 70B20M1× H1007–14 h7–14$34.23–$68.36
Full fine-tune, 8B100M8× H1000.6–0.9 h5–7$25.15–$35.18
Full fine-tune, 8B1B8× H1006.3–8.8 h50–71$251.50–$351.80

Method: FLOPs formula above. Utilisation assumed 20–35% (LoRA), 15–30% (QLoRA), 25–35% (8-GPU full fine-tune; PCIe cards without NVLink lose some time to communication). RTX 4090 row is a rough estimate of 3–6 times the H100 time, because its BF16 throughput with FP32 accumulation is much lower than data-centre cards; time a few hundred steps to confirm. All figures are estimates; add 0.5–1 hour for setup, model download and evaluation.

Two things stand out. Small LoRA runs cost about the same as a takeaway, on any reasonable card. And the RTX 4090 is competitive on cost for small QLoRA jobs despite being slower, because it costs a third of an H100 per hour. For 70B QLoRA, the H100 finishes in about half the A100's time at well under twice the price, so it is cheaper per run.

How do provider prices change the cost of the same run?

The same job costs the same GPU-hours on any provider with the same card, so cost scales with the hourly rate. Here is the 70B QLoRA run (7–14 H100-hours) across the market on 25 Nov 2026.

Provider (H100)$/hrQLoRA 70B run, 20M tokens
Vast.ai (SXM, marketplace median)1.79$12–25 (likely faster on SXM)
Hyperstack (PCIe)2.50$17–34
RunPod Secure Cloud (PCIe)2.89$20–40
Lambda (PCIe)3.79$26–52
Wandering Giants (PCIe)$4.99/hr$34.43–$68.36
Nebius (SXM)4.50$31–62

Inputs: 6.9–13.7 H100-hours from the table above × list price, checked 25 Nov 2026. SXM cards have more bandwidth and NVLink and typically finish sooner.

The cheapest provider saves roughly $15–30 on this run against our current price. That's real money if you're running dozens of jobs; it's small next to the cost of an extra run or an afternoon of idle GPU. Choose on the factors that change GPU-hours, too: setup time, billing granularity and whether the machine stops when you're done.

Why do fine-tuning budgets overrun?

Fine-tuning budgets overrun because people cost one run and pay for many, plus the hours around them. A realistic project budget for a 70B QLoRA on our H100 looks like this:

LineGPU-hoursCost at our H100 price
Setup, dependency install, model download (~140 GB)1$4.99
Short test runs to check data and memory (3 × 20 min)1$4.99
Hyperparameter search: 4 full runs at 7–14 h28–55$139.72–$274.45
Final run7–14$34.93–$69.86
Evaluation of candidates2–4$9.98–$19.96
Project total39–75$194.61–$374.25

Inputs: our live H100 list price; GPU-hours from the run table above; other lines are planning allowances.

The final run is about a fifth of the project. On a multi-GPU machine the overhead multiplies: thirty minutes of debugging on 8× H100 costs as much as four GPU-hours of training. Practical defences:

  • Develop on a small card, train on a big one. Write and debug the training script on a 24 GB RTX 4090 with a small model, then launch the real run on the expensive machine.
  • Checkpoint often so a crash costs minutes, not hours.
  • Use per-minute billing and stop the machine the moment a run finishes; a scripted shutdown at the end of training works on any root machine.
  • Prefer QLoRA or LoRA until you have evidence full fine-tuning is needed. For most instruction-tuning and style tasks, adapters get you most of the way.

More savings are in how to reduce GPU cloud costs.

What does a fine-tuning run look like in practice?

A QLoRA run on an 8B model with Hugging Face TRL and PEFT is a short script. This sketch assumes transformers, trl, peft, bitsandbytes and datasets at late-2025 versions; argument names change between TRL releases, so check the PEFT documentation and the TRL docs for yours.

python
import torch
from datasets import load_dataset
from peft import LoraConfig
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
from trl import SFTConfig, SFTTrainer

model_id = "meta-llama/Llama-3.1-8B-Instruct"
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
                         bnb_4bit_compute_dtype=torch.bfloat16)
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb,
                                             device_map="auto")

dataset = load_dataset("json", data_files="train.jsonl", split="train")

trainer = SFTTrainer(
    model=model,
    train_dataset=dataset,
    peft_config=LoraConfig(r=16, lora_alpha=32, lora_dropout=0.05,
                           target_modules="all-linear", task_type="CAUSAL_LM"),
    args=SFTConfig(output_dir="out", num_train_epochs=2,
                   per_device_train_batch_size=4, gradient_accumulation_steps=4,
                   learning_rate=2e-4, bf16=True, logging_steps=10,
                   save_steps=200, gradient_checkpointing=True),
)
trainer.train()

Watch the steps-per-second figure in the first few minutes, multiply out to the full dataset, and you have your real GPU-hours. Unsloth and Axolotl wrap the same steps with speed and memory optimisations. The step-by-step version is in how to fine-tune Llama on a cloud GPU, and the method itself is explained in LoRA and QLoRA: a practical guide.

Which GPU should you rent for your fine-tune?

Choose the smallest card the job fits on with sensible batch size, then check cost per run, not per hour.

  • QLoRA up to ~14B: RTX 4090 at $1.59/hr. Cheapest per run for small jobs.
  • LoRA on 8–14B in BF16, or QLoRA on 32B: L40S (48 GB) at $1.89/hr.
  • QLoRA on 70B, LoRA on 32B: H100 at $4.99/hr or A100 80GB at $3.79/hr; the H100 is usually cheaper per run.
  • Full fine-tunes of 7–14B: 4–8× H100 in one machine with FSDP or DeepSpeed ZeRO-3.
  • LoRA on 70B in BF16: one B200 (180 GB).
  • Full fine-tune of 70B: 8× B300, or a multi-node cluster elsewhere.

For a comparison of providers on fine-tuning specifically, see the best GPU cloud providers for fine-tuning, and for the full price picture, how much it costs to rent a GPU.

When does Wandering Giants fit for fine-tuning?

Wandering Giants Compute gives you a root machine (SSH, Jupyter, Ubuntu, CUDA and PyTorch installed) on any card from a 24 GB RTX 4090 to a 288 GB B300, as one GPU or up to 8 of the same card in one machine. Install TRL, Unsloth, Axolotl or DeepSpeed and train as you would anywhere.

What suits fine-tuning in particular is the billing: by the minute from prepaid credit, so a 47-minute run costs 47 minutes, and the machine stops itself when credit runs out, with the disk kept free for 7 days so checkpoints survive. Pause between runs and you pay only for the disk, about 3¢ an hour per 50 GB.

We don't offer multi-node clusters, InfiniBand or spot instances. If your job is a full fine-tune of a 70B model across many nodes, or a long checkpointed run where spot pricing would halve the bill, use a provider that offers those. For single-machine fine-tunes that you want to start in minutes and stop the moment they finish, see our GPUs and prices.

Frequently asked questions

How much does it cost to fine-tune Llama 8B?

A LoRA fine-tune of an 8B model on about 20 million training tokens takes an estimated 0.7–1.2 hours on one H100, so about $3.34–$5.89 of GPU time at our H100 price, plus setup and evaluation. A full fine-tune on 100 million tokens on 8× H100 is an estimated $25.15–$35.18.

How much does it cost to fine-tune a 70B model?

QLoRA on a 70B model with 20 million training tokens is an estimated 7–14 GPU-hours on one 80 GB H100, about $12–62 depending on the provider's hourly rate ($1.79–4.50 per H100-hour on-demand, checked 25 Nov 2026). A full fine-tune of 70B needs over a terabyte of GPU memory and usually a multi-node cluster, costing far more.

How do you estimate GPU-hours for fine-tuning?

Multiply 6 × parameters × training tokens for full fine-tuning (about 4 × for LoRA) to get FLOPs, divide by the GPU's dense BF16 peak times a realistic utilisation of 20–40%, and divide by 3,600. Then time a few hundred real steps and correct the estimate.

Is LoRA cheaper than full fine-tuning?

Yes, in memory more than compute. LoRA trains small adapter matrices, so it skips optimiser state for the base weights and fits on one GPU where full fine-tuning needs several. Compute per token falls by roughly a third. QLoRA cuts memory further by loading the base model in 4-bit.

What GPU is best value for fine-tuning?

For QLoRA on models up to about 14B, a 24 GB RTX 4090 is usually the cheapest per run. For 70B QLoRA or LoRA on 32B models, an 80 GB H100 or A100. For full fine-tunes, a multi-GPU machine with enough total memory for 16–20 bytes per parameter.

What hidden costs are there in fine-tuning?

Repeated runs while you tune hyperparameters, GPUs idle during setup and data debugging, evaluation runs, model download time and storage for checkpoints. On a multi-GPU machine, every idle minute is billed for every card.

Wandering Giants Compute

Rent the GPU for this, by the minute.

Fine-tune on a root GPU with CUDA and PyTorch ready, from a 24 GB RTX 4090 for QLoRA to 8× H100 for full runs, billed by the minute and stopped when you're done.

Prepaid credit, billed by the minute, stops itself when credit runs out. Prices in £, $, €, ¥, CA$, A$, CHF and S$; UK prices include VAT.

Keep reading

About this article. Written by the Wandering Giants Compute team, the people who run Wandering Giants Compute. Hardware figures are the manufacturers’ published specifications. Speeds and costs marked as estimates are worked out from those specifications and our current prices, with the method shown; they are not measured benchmarks. Wandering Giants prices are taken live from our price list each time this page is built.

Last reviewed 25 November 2026.