Posted on Jun 24, 2026 · Updated Jun 24, 2026 · 10 min read
How Much Does It Cost to Train an LLM in 2026?
It depends entirely on what "train" means. Fine-tuning an existing 7B open model costs $40–$1,600 per run in 2026 (LoRA at the low end, full fine-tune at the high end). Pretraining a small model from scratch runs $85,000–$500,000. A GPT-3-class model costs a few million, and a frontier model costs tens of millions in GPU compute alone. The vast majority of teams fine-tune — and pay the smallest of those numbers.
The cost comes down to one equation: GPU-hours x price-per-GPU-hour. An H100 rents for roughly $2–$12 per GPU-hour depending on provider, and spot instances cut that by 60–70%. This guide gives cost ranges by model size, the spot and hidden-cost factors that move them, and when to fine-tune versus just call an API. It's part of our machine learning cloud cost guide; run your own numbers with the ML cost calculator.
TL;DR — LLM training cost (2026)
- LoRA fine-tune (7B): $40–$200 per run
- Full fine-tune (7B): $327–$1,638 per run
- Pretrain a small model from scratch: $85K–$500K
- GPT-3-class (175B): $1M–$5M; frontier models: tens of millions
- Spot/preemptible GPUs cut training cost 60–70% with checkpointing
- Most teams should fine-tune, not pretrain — and many should just use an API
Table of contents
What drives the cost of training an LLM?
Training cost is GPU-hours multiplied by the price per GPU-hour, and almost everything else is a modifier on those two terms. Model size and dataset size set the GPU-hours; the chip, provider, and purchasing model set the price. An 8x H100 instance (AWS p5.48xlarge) costs $98.32/hr on-demand, while the same eight GPUs on a specialist cloud can be roughly a third of that — see our GPU cloud pricing comparison for the full provider spread.
The other multiplier is how many times you train. Real projects are not a single run: they include hyperparameter sweeps, failed runs, and re-training as data changes. Budgeting for one clean run is the most common way teams underestimate LLM cost.
How much does it cost by model size?
The ranges below assume on-demand H100/A100 pricing on a major cloud. Fine-tuning dominates real-world spend; the figures climb steeply only when you pretrain from scratch. Numbers are representative 2026 estimates — your dataset size and number of epochs move them.
| Task | Typical hardware | On-demand cost | With spot |
|---|---|---|---|
| LoRA fine-tune, 7B | 1x A100, 10–30 hr | $40–$200 | $15–$70 |
| Full fine-tune, 7B | 8x A100, 10–50 inst-hr | $327–$1,638 | $98–$490 |
| Full fine-tune, 70B | Multi-node H100 | $5,000–$30,000 | $1,500–$9,000 |
| Pretrain small model from scratch | H100 cluster, days–weeks | $85,000–$500,000 | $25,000–$150,000 |
| GPT-3-class (175B) | Large H100 cluster | $1M–$5M+ | Rarely spot-friendly |
How much can spot instances save?
Spot and preemptible GPU instances are the single biggest lever, cutting training cost 60–70% versus on-demand (AWS EC2 Spot). The catch is interruptions — but every major training framework checkpoints, so a job that saves state every 15–30 minutes loses at most that much compute on eviction. A $1,638 full fine-tune becomes roughly $490 on spot. The deeper tradeoffs live in our reserved vs spot vs on-demand guide.
Should you train at all, or just use an API?
For most teams the cheapest "training" is none. If a hosted model with good prompting or retrieval meets your quality bar, you skip the GPU bill entirely and pay per token. Fine-tuning earns its cost when you have a narrow, repeated task where a smaller tuned model beats a large general one on price-per-output. The break-even between self-hosting a tuned model and calling an API is covered in self-hosting Llama vs the OpenAI API, and per-token serving economics in LLM inference cost per 1M tokens.
Model your training and inference budget
Use the ML cost calculator to estimate GPU-hours, spot vs on-demand, storage, and inference for your specific model — before you provision a single instance.
Where to rent training GPUs
For training runs where raw $/GPU-hour dominates, specialist clouds beat hyperscaler on-demand rates by 2–4x.
- Lambda — reserved H100/A100 clusters built for multi-GPU training.
- CoreWeave — large H100 fleets with fast interconnect for distributed runs.
- RunPod — on-demand and spot GPUs with checkpoint-friendly per-second billing.
Some provider links above are affiliate links — we may earn a commission at no extra cost to you. It never affects our pricing data.
Frequently asked questions
How much does it cost to fine-tune a 7B model?
A LoRA fine-tune of a 7B model typically costs $40–$200 per run on a single A100, and a full fine-tune costs $327–$1,638 on an 8x A100 instance at on-demand rates. Spot instances cut both by 60–70%. Dataset size and epoch count are the main variables.
How much does it cost to train an LLM from scratch?
Pretraining a small model from scratch runs roughly $85,000–$500,000 in GPU compute. A GPT-3-class 175B model costs a few million dollars, and frontier models cost tens of millions. This is why almost all teams fine-tune existing open models instead of pretraining.
What's the cheapest way to train an LLM?
Use parameter-efficient fine-tuning (LoRA/QLoRA) on spot GPU instances with checkpointing. LoRA trains a small fraction of the weights, and spot cuts the GPU rate 60–70%. For many use cases the cheapest option is not training at all — prompting or retrieval against a hosted model.
Why is my training bill higher than expected?
The usual reasons: failed and repeated runs (budget 1.5–3x a single run), storage and data-transfer charges, low GPU utilization (paying for idle accelerators), and the 25–40% managed-platform surcharge on SageMaker or Vertex AI. These add 30–60% to a GPU-only estimate.
Is it cheaper to train or to use an API?
For low or variable volume, an API is almost always cheaper because you avoid idle GPU cost. Training (or self-hosting a tuned model) wins only at high, steady utilization on a narrow task. The crossover is roughly 50% sustained GPU utilization — see our self-hosting vs API break-even analysis.
Estimate your cloud costs — for free
Compare AWS, Azure, and GCP pricing side by side with our free calculator, and dig into the guides to learn how to cut cloud waste. No sign-up required.