Skip to content
AI & Machine Learning Medium #scaling#gpt#llama

Decoder-Only Scaling

GPT-2, GPT-3, GPT-4, Llama series. Same recipe scaled in width, depth, and data.

A free, animated decoder-only scaling you can read here or embed on any website, from Scrollchart.

Decoder-Only Scaling

Decoder-Only Scaling: Params vs Training TokensGPT-2 to Llama-3: same recipe, 4 orders of magnitude larger. Chinchilla frontier at 20 tok/param.Chinchilla frontier (20 tok/param)

Major decoder-only models plotted on params x training tokens. Each labeled with d_model, n_layers, n_heads, and approximate FLOPs. Chinchilla-optimal frontier overlaid.

Good for

  • LLM architecture timelines and scaling deep dives for AI blogs
  • Compute economics content comparing training cost to inference cost at scale
  • Course material on the Chinchilla result and its practical implications for model selection

Source & accuracy

This decoder-only scaling 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.

One recipe scaled in three dimensions

Decoder-only models like the GPT series follow a single architectural recipe: a stack of transformer blocks with causal attention, applied to autoregressive text generation. The scaling law is well-characterized: double any of three dimensions (width, depth, or data), and you improve performance with predictable diminishing returns.

Width is the hidden dimension size (more parameters per layer). Depth is the number of layers. Data is the number of training tokens. Optimal allocation is roughly balanced: a 1 trillion-token model should use about 70B parameters, not 100B or 50B.

Empirical scaling law exponents

Loss improves roughly as N^-a, where N is the number of parameters and a is around 0.07 (smaller a means faster improvement with more parameters). This means going from 1B to 10B parameters (10x) improves loss by a factor of roughly 10^0.07 or 1.8x. This predictability is powerful: teams can estimate final performance before training, choosing model size accordingly.

The Chinchilla scaling (2020) and recent work suggest that for a given compute budget, most benefit comes from a larger batch size and longer training, not a larger model.

Why decoder-only won

Encoder-decoder models like T5 split parameters between encoding and decoding. Decoder-only consolidates everything into one stack, simplifying the architecture and enabling very long-context training (most of the model's capacity is devoted to sequence understanding). This unified approach has become dominant in recent years.

Embed this diagram

Add this animated decoder-only scaling 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 decoder-only scaling 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="scaling-decoder-only" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "Decoder-Only Scaling" for my website?
Scrollchart provides "Decoder-Only Scaling" 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 decoder-only scaling 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.