All articles

Training

What it really costs to train an LLM, from $48 to $100 million

The arithmetic behind training budgets, estimated costs by model size, what real runs reported, and what the headline numbers leave out. Prices as of November 2026.

By Will Schulz8 min read
A glass scale with glowing red edges, a small obsidian stone on one pan and a large obsidian block on the other

Training a GPT-2-class model now costs about $48. At today's rental rates, the GPU-hours Meta reported for Llama 3.1 405B would cost over $100 million. The distance between them comes down to a short piece of arithmetic that anyone can run before spending a dollar.

Here's that arithmetic, what models of each size cost as of November 2026, and what the headline numbers leave out.

The formula behind every training budget

A Transformer takes about six floating-point operations per parameter per training token.[1] So total compute is roughly 6 × parameters × tokens.

How many tokens? DeepMind's Chinchilla paper found that model size and data should grow together, and its 70B model trained on 1.4 trillion tokens.[2] That ratio is the source of the common rule of about 20 tokens per parameter.

To turn FLOPs into time, you need real throughput, not peak. Meta reported 38–43% utilisation training Llama 3 405B.[3] An H100's dense BF16 peak is about 989 TFLOPS, half the 1,979 that NVIDIA lists with sparsity.[4] At 40%, that's about 396 TFLOPS. Here's a 7B model on 140 billion tokens:

compute    = 6 × 7e9 parameters × 140e9 tokens = 5.9e21 FLOPs
throughput = 989 TFLOPS × 40% utilisation      = 396 TFLOPS
time       = 5.9e21 / 396e12                   = about 4,100 H100-hours
cost       = 4,100 hours × $4                  = about $16,500

We use $4 an hour because H100 rates vary so much. In early November 2026, Runpod charged $3.99,[5] the cheapest secure on-demand listing on one tracker was $2.90,[6] Lambda's 8-GPU rate was due to become $4.59 on 16 November,[7] and an AWS Capacity Block came to $5.97.[8]

What each model size costs

These are our estimates using that method at 20 tokens per parameter. They cover the final run only.

ModelTokensH100-hoursCost at $4/hr
125M2.5Babout 1about $5
1B20B84about $340
7B140B4,100about $17,000
13B260B14,000about $57,000
70B1.4T413,000about $1.7M

Cost rises with the square of model size, because parameters and tokens grow together. A model ten times larger costs about a hundred times more.

Treat these as floors. We compared the formula with the GPU-hours Meta published for Llama 3.1, assuming 15 trillion tokens.[9] The published figures came in 1.2× higher for the 405B model, 1.6× for the 70B and 2.9× for the 8B. The model card doesn't say why, but a budget should allow for it.

What real runs reported

RunSize and dataHardwareReported cost
nanochat[10]GPT-2 capability8 H100s, about 2 hoursabout $48
llm.c GPT-2[11]1.6B, 33.6B tokens8 H100s, 24 hours$672
MPT-7B[12]6.7B, 1T tokens440 A100s, 9.5 daysabout $200,000
SmolLM2[13]1.7B, 11T tokens256 H100sabout $250,000
DeepSeek-V3[14]671B total, 37B active, 14.8T tokens2.788M H800-hours$5.576M at $2/hr

Meta didn't publish a dollar figure for Llama 3.1. At $4 an hour, its reported GPU-hours would come to about $5.8M for the 8B model and about $123M for the 405B. Those are our calculations, not Meta's numbers.

Token count drives a lot of this. SmolLM2 has a quarter of MPT-7B's parameters but cost more to train, because it saw 11 times the data. That's a deliberate trade: a small model trained for longer is cheaper to run on every request afterwards.[15]

What the headline number leaves out

DeepSeek-V3's $5.576M became famous as the price of a frontier model. The report itself is more careful: the figure assumes $2 an hour and excludes prior research and ablation experiments.[14] It's the cost of the final run, not the cost of getting there.

Epoch AI looked at full development costs for GPT-3, OPT-175B, GPT-4 and Gemini Ultra. It estimated 47–64% went on hardware, 29–49% on R&D staff including equity, and only 2–6% on energy. It also found that the cost of the most compute-intensive runs had grown about 2.4× a year since 2016, and projected that the largest would pass $1 billion by 2027.[16]

A realistic budget also has to cover:

  • Experiments before the final run, including the ones that fail.
  • Hardware failures. Meta logged 419 unexpected interruptions in 54 days of Llama 3 training, about eight a day.[3]
  • Data, which takes real work to collect, clean and license.
  • Serving, which can outweigh training over a popular model's life.[15]

What this means for your team

Unless you're doing research, you probably shouldn't pretrain at all. Open models already contain millions of dollars of training you can start from. Fine-tuning one with QLoRA can take about a day on a single GPU,[17] and better prompts or a better-suited model may get you there with no training.

To work through these estimates yourself, take The Economics of Model Training, a free four-lesson Academy course.

Frequently asked questions

How much does it cost to train an LLM from scratch?
Using 6 × parameters × tokens, 20 tokens per parameter, 40% H100 utilisation and $4 per GPU-hour, the final run costs about $340 for a 1B model, about $17,000 for 7B, about $57,000 for 13B and about $1.7 million for 70B. Treat these as floors: Meta's published Llama 3.1 GPU-hours came in well above the formula.
How do you estimate LLM training cost?
Multiply 6 × parameters × training tokens to get FLOPs, divide by real GPU throughput (peak FLOPS times utilisation, usually 30–45%) to get GPU-hours, then multiply by the hourly rental price.
Why does training cost grow so fast with model size?
Compute-optimal training scales tokens with parameters, so both terms of 6 × N × D grow together. A model ten times larger costs about a hundred times more.
Did DeepSeek-V3 really cost $5.6 million to train?
DeepSeek reported 2.788 million H800-hours, which it priced at $5.576 million assuming $2 an hour. Its report says the figure excludes prior research and ablation experiments, so the full cost of developing the model was higher.
Should my team pretrain its own model?
Usually not. Open models already contain millions of dollars of training, and fine-tuning one with QLoRA can take about a day on a single GPU. Pretraining mainly makes sense for research or domains open models don't cover.

Go deeper in the Academy

Free lessons with quizzes, citations and a hands-on exercise.

Sources

  1. [1]Scaling Laws for Neural Language Models. Kaplan et al., OpenAI, arXiv (2020).
  2. [2]Training Compute-Optimal Large Language Models. Hoffmann et al., DeepMind, arXiv (2022).
  3. [3]The Llama 3 Herd of Models. Llama Team, Meta, arXiv (2024).
  4. [4]NVIDIA H100 Tensor Core GPU. NVIDIA.
  5. [5]GPU pricing (updated 4 November 2026). Runpod.
  6. [6]Cloud GPU pricing comparison (November 2026). GPUPerHour.
  7. [7]AI cloud pricing (rates effective 16 November 2026). Lambda.
  8. [8]Amazon EC2 Capacity Blocks for ML pricing. Amazon Web Services.
  9. [9]Llama 3.1 model card. Meta, GitHub (2024).
  10. [10]nanochat. Karpathy, GitHub.
  11. [11]Reproducing GPT-2 (1.6B) on one 8XH100 node in 24 hours for $672, in llm.c. Karpathy, GitHub (2024).
  12. [12]Introducing MPT-7B. MosaicML, Databricks blog (2023).
  13. [13]SmolLM2: When Smol Goes Big. Allal et al., Hugging Face, arXiv (2025).
  14. [14]DeepSeek-V3 Technical Report. DeepSeek-AI, arXiv (2024).
  15. [15]Beyond Chinchilla-Optimal: Accounting for Inference in Language Model Scaling Laws. Sardana et al., arXiv (2023).
  16. [16]The rising costs of training frontier AI models. Cottier et al., Epoch AI, arXiv (2024).
  17. [17]QLoRA: Efficient Finetuning of Quantized LLMs. Dettmers et al., arXiv (2023).

Put it into practice.

Kojen gives you the Forge, LLM-judged evaluations, red-team simulations and live endpoints in one place. Free to start, no card needed, then pay as you go.

Start training free

More reading

All articles →