Skip to content
AI & Machine Learning Medium #pretraining#loss-curve#compute

Pretraining Loss Curve

Smooth power-law decline over hundreds of billions of tokens. The shape of LLM pretraining.

A free, animated pretraining loss curve you can read here or embed on any website, from Scrollchart.

Pretraining Loss Curve

Pretraining Loss CurveCross-entropy loss vs training tokens (log scale). Larger models reach lower floors.1B params7B params70B params175B params

Cross-entropy loss vs training tokens (log scale). Smooth power-law decline with phase-changes at small scales (loss spikes recovered by clipping). Curves for several model sizes overlaid showing wider, deeper, longer all help.

Good for

  • Pretraining explainers and ML engineering content on monitoring training health
  • Scaling laws articles comparing Kaplan and Chinchilla power-law exponents
  • Course material on why cross-entropy loss is the canonical pretraining objective

Source & accuracy

This pretraining loss curve is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

Why pretraining loss follows a power law

Large language model pretraining exhibits a consistent pattern: loss decreases smoothly as the model ingests more tokens, following a power-law relationship rather than exponential decay. This shape is not coincidental. Early in training, the model is still learning to parse basic syntax and vocabulary; loss drops rapidly. As training progresses and the model captures increasingly subtle linguistic patterns, each additional token produces smaller gains. The underlying mathematics of gradient descent on high-dimensional data naturally produces this curve.

The billion-token regime and diminishing returns

Modern LLM pretraining runs over hundreds of billions to trillions of tokens. The power-law curve means that while loss continues to improve, the rate of improvement slows predictably. This regime defines practical compute budgets: doubling tokens typically reduces loss by a consistent percentage, not by half. The curve also reveals why stopping early wastes compute (steep part of the curve still has room to descend), and why running indefinitely produces marginal gains at exponential cost. The sweet spot is where the cost to reduce loss by one unit matches the value that unit of reduced loss creates.

Embed this diagram

Add this animated pretraining loss curve to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated pretraining loss curve for any website.
Who uses it
AI/ML blogs, Science popularizers.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="pretraining-loss-curve" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "Pretraining Loss Curve" for my website?
Scrollchart provides "Pretraining Loss Curve" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a pretraining loss curve in a developer or tech blog?
Copy the one-line snippet from the Scrollchart diagram page and paste it into your post HTML. It works in any static site generator, CMS, or hand-coded HTML page. The embed is a thin loader, not an iframe, so the content is fully in your DOM.