FLOP
Training GPT-3 took 3.14·10²³ operations on fractional numbers. Imagine that all of humanity, eight billion people, dropped everything and did long arithmetic by hand, each doing one operation per second, without sleep or days off. How many years would it take to do the work the GPUs finished in a few weeks? You can check your guess in section 01, and meanwhile here is a hint: longer than our species has existed.
FLOP is one arithmetic operation on floating-point numbers: an addition or a multiplication. A neural network's whole workload is made of such crumbs, and their number is an honest measure of what it costs to train it and what each of its answers costs. There is a surprisingly simple rule: training a model with N parameters on D tokens takes about 6·N·D operations, and one token of an answer about 2·N. This sheet holds a calculator that turns these numbers into days on real GPUs, megawatt-hours and money, an experiment with the “Chinchilla” law, a workshop that shows where the six comes from, and ways to count the FLOP of your own model in code.
Calculator
How much compute, how many days and megawatt-hours
Pick a known model or enter your own: the number of parameters and the number of training tokens. Then a GPU, how many of them, and the share of peak speed you manage to squeeze out in practice — it is called MFU, and good teams get about forty percent. The calculator works out operations, time, cluster power, energy and rental; enter the price per hour in your own currency.
What an answer costs and when answers catch up with training
Every token of the prompt and the answer passes through the model once, forward, and costs about two operations per parameter. Enter the model's active parameters, the length of the prompt and the answer, and the number of answers per day. The GPU is taken from the left-hand calculator: you will see why it reads a prompt in a fraction of a second but writes an answer word by word — limited not by computation but by memory.
Etymology
Floating point, work, and the fifth power of a thousand
Three stories are hidden in the four letters FLOP. The first is about a point that can move along a number like a cork on water, so as to write equally precisely both the mass of an electron and the mass of a galaxy. The second is about the Latin word for “work”, from which grew both the operations of a surgeon and the operations of a processor. And the third is about the Greek numerals with which we now measure GPUs: peta is the fifth power of a thousand, exa the sixth.
01 · Definition and matrix multiplication
Multiply and add, trillions of times
Picture a cashier ringing up a receipt: the price of each item is multiplied by the quantity and added to the total. One line of the receipt is one multiplication and one addition, two FLOP. A neural network does exactly the same. Each of its layers is a table of numbers, a weight matrix, and to pass one token through a layer, every input number must be multiplied by its weight and the results added up. Almost all of a model's work is matrix multiplication, and a matrix of size m × k times a matrix k × n has exactly m · n · k such receipt lines, that is, 2 · m · k · n operations.
Simple rules follow. Every model parameter is one weight, and when a token is read it takes part in one multiplication and one addition: two FLOP per parameter. In training the model first reads a token and then goes backwards to work out how to adjust the weights, and the backward path is twice as expensive as the forward one: corrections must be computed both for the weights and for the inputs of each layer. Two plus four — that is six operations per parameter per token.
How many FLOP in one multiplication
On the left the input matrix m × k, on top the weights k × n, bottom right the result. The highlighted result cell is assembled from a whole row on the left and a whole column on top. Pick an example or enter your own sizes.
A million two hundred thousand years, by hand
Eight billion people doing one operation per second make 8·10⁹ FLOP per second together, and in a year, which has about 3.15·10⁷ seconds, 2.5·10¹⁷ operations. Dividing 3.14·10²³ by that number gives about 1.2 million years. Our species, Homo sapiens, has existed for roughly three hundred thousand years, so humanity would have had to start counting long before it appeared — back in the days of Homo erectus.
And the GPUs managed in roughly a few weeks, because a single V100, the kind GPT-3 was trained on, delivers 125 trillion operations per second — like fifteen thousand humanities at once. Today's H100 is another eight times faster. And still one such card, at the usual training utilisation of forty percent, would take almost twenty-five years to compute GPT-3; the secret is that they are installed by the thousand and made to work as one machine. Build such a cluster in the lab below.
Build a cluster, split a budget, count the answers
In the “Cluster” experiment you pick a model and GPUs and move their number: each cell on the canvas is a card or a whole rack, and below a training calendar grows along with the electricity bill. In the “Chinchilla” experiment you have a fixed budget of operations and must decide where to put it — into a big model or a long training run; the curves come from the real law derived by DeepMind from four hundred models. In the “Answers” experiment you see how millions of short answers eat up, within a few months, more compute than the whole training did.
02 · Orders of magnitude
From one multiplication to 10²⁶
Drag the slider: it moves along a logarithm, and each division is ten times the previous one. Twenty-seven divisions separate a single multiplication in a notebook from the most expensive training runs of 2025. Somewhere in the middle will be your question to a chatbot, and a little to the right everything humanity could count by hand in a year.
03 · Workshop: where the six comes from
What the FLOP of one token are made of
The 6·N·D formula honestly counts multiplications by weights but forgets attention: each token compares itself with all the previous ones, and this work grows with the context length, not with the number of parameters. Google's engineers, in the PaLM report, added to the six a correction of 12·L·d·T. Pick the model's shape and the context length and see when the correction stops being a trifle. The recompute switch shows one more hidden expense: to save memory, intermediate results are not stored but computed again.
04 · FLOP in code
What to count the FLOP of your model with
There are many counters, and the catch is that half of them call the result “flops” but count multiplications with additions, MACs. If your figure is half of that in a paper, look here: the “counts” column says what the tool actually returns. Tap a row to read the details.
Three snippets worth keeping at hand
The first honestly counts the operations of one step in PyTorch, the second turns the training speed from the log into MFU — the main number by which engineering teams are compared — and the third asks the XLA compiler to estimate a program's work before it is run.
{code}05 · Writing rules
06 · Neighbouring units
07 · Historical section
In May 2022 the American supercomputer Frontier became the first in history to show more than a quintillion operations per second — an exaflop — on the Linpack test. A hall the size of a basketball court was set aside for it, and it consumes about twenty megawatts. And a couple of years later GPU makers began to sell an “exaflop” cabinet the size of a refrigerator. How is that possible if progress could not have sped up seventy-fold?
The answer is that these are different flops. Linpack counts in the FP64 format, where a number takes sixty-four bits and the rounding error is tiny: this is how climate and nuclear reactions are simulated. Neural networks do not need such precision, eight or even four bits are enough for them, and every step down in precision doubles the speed. So when comparing machines, always ask in which format, and with or without sparsity.
Series · AI
units of language modelsHow a neural network is measured
FLOP ties everything together: tokens, parameters and epochs multiply into work, and work divided by the speed of the GPUs turns into time, megawatt-hours and money. On the left is the dossier of a single query to a language model, each line leading to its own sheet; on the right are the sheets of the series.
Catalogue of quantities
the whole index →The seven SI base units
A drop of acid changes the colour of the juice, salt colours the flame, water freezes at a tap. Below them are all Simetrium sheets, by discipline and alphabetically.
Open the index →





