How many calculations is one AI answer?
Short answer: A 100-word answer from a GPT-3-size chatbot takes nearly 50 trillion calculations: one multiply and one add for each of its 175 billion weights, for every one of the roughly 130 word-pieces. By hand, one sum a second without sleeping, that would take about 1.5 million years; a top gaming card could do it, on paper, in under half a second.
How it works
Where the 50 trillion comes from:
- 1175 billion weights. Everything a model like GPT-3 learned is stored as 175 billion numbers, called weights.
- 2Two sums per weight. To write one piece of a word, it multiplies every weight by something and adds the result to a running total: 350 billion sums.
- 3About 130 pieces. A hundred words is about 130 word-pieces (tokens), so the answer is nearly 50 trillion sums.
- 4Feel it. One sum a second, never sleeping: about 1.5 million years. Modern humans have been around for about 300,000.
- 5A gaming card. One top gaming card does over 100 trillion of these sums a second: on paper, under half a second for the whole answer.
MYTHA chatbot answer takes a few million calculations at most.
REALLYIt takes nearly fifty trillion, which is why AI runs on chips with thousands of calculators.
People also ask
What are weights in AI?
The numbers a model learns during training; GPT-3 has 175 billion. Each one is used once, in a multiply and an add, for every word-piece it writes.
What is a token?
A piece of a word that a language model reads and writes; in English, 100 words is roughly 130 tokens.
Read the transcript
You ask a chatbot a question, and it writes you 100 words. How many calculations did that take? A thousand? A million? Maybe a billion? Try nearly 50 trillion. Here's where that comes from. Inside a model like GPT-3 are 175 billion numbers, called weights. They're everything it learned. To write just one piece of a word, it takes every single weight, multiplies it by something, and adds the result to a running total. One multiply and one add, for every weight. That's 350 billion sums, for one piece of one word. And 100 words is about 130 of those pieces. But 50 trillion is just a number, so let's feel it. Say you did those sums yourself, with a pencil, one every second, and you never slept. You'd finish that one answer in about one and a half million years. Modern humans have only been around for about 300,000. So how does a machine do it in seconds? With a chip that was built for video games. One top gaming card can do over 100 trillion of these sums every second. On paper, that's the whole answer in under half a second. Your pencil? One and a half million years. The gaming card? Less than half a second. And that's how it works.
Sources we checked
- Brown et al. 2020, Language Models are Few-Shot Learners (GPT-3)
- Kaplan et al. 2020, Scaling Laws for Neural Language Models (2N operations per token)
- OpenAI Help Center, What are tokens and how to count them
- Hublin et al. 2017, Nature 546: Jebel Irhoud, the oldest known Homo sapiens
- NVIDIA, GeForce RTX 5090 specifications
Spotted a mistake? Email cogling.studio@gmail.com and we'll check it.
The full video
Why does AI run on a gaming card?
One chatbot answer is nearly 50 trillion sums. By hand: 1.5 million years. A gaming card: under a second. Here's how a game chip ended up running AI.
More from this video
What is an AI actually doing?
Not words, not ideas. One tiny sum: multiply, add. Billions of times per word.
The fastest chips on Earth… waiting?
The fastest chips on Earth aren't short of brains. They're short of paper.
The chip thought it was drawing
Numbers in as pixel colours, answers out as pixel colours. The trick that became CUDA.
Two gaming cards vs the best labs
2012: Google used 1,000 computers to find cats. A student used two gaming cards, in his bedroom, and beat every lab.
More explainers
Wi-Fi from a black-hole hunt
The hunt found nothing. The maths it left behind fixed Wi-Fi's echo problem.
The chip that ran with no power
1985: the meter read zero, and the first ARM chip kept running anyway.