Training vs inference
Making a model once vs running it billions of times, and why both are hard.
Video coming soon. The full transcript is below.
Does it learn from you?
You tell a chatbot something new about yourself. Your dog is called Biscuit.
A few messages later, you ask it, and it remembers.
So it must be learning from you, right there, as you talk. Every chat makes it a little smarter. Right?
Let's watch the model's dials while you chat. Remember them? Billions of numbers that decide every score.
You send a message. It writes a reply. And the number of dials that moved is zero.
Not one. While you're chatting, the model only reads its dials. It never changes them.
So how did it remember Biscuit? Each time you send a message, the whole conversation so far is fed back in, as text.
Start a new chat, and that text is gone. Ask again, and it has no idea.
Memory features just save a few notes, as text, and slip them into the conversation. The dials still don't move.
Some companies may keep your chats to help train a future version. But that happens later, in a separate round of making.
So why not let it learn while you talk? First, it costs more. Nudging the dials takes about three times the work of just reading them.
And it's one shared model. Whatever one person taught it, everyone else would get too.
In twenty sixteen, a Microsoft chatbot that learned from its users was pulled offline within a day, after people taught it offensive things.
Which brings us to the big idea of this episode. A model has two lives.
First, it gets made. Just once, very slowly, and at an enormous cost.
Then it gets used. Billions of times, quickly, for almost nothing each time.
Making a model is called training. Using it is called inference. And both are hard, for opposite reasons.
Made once
You saw training in our first episode. The dials start out random.
The model guesses a hidden word, and every dial gets nudged toward the right answer.
Repeat that across trillions of words, and the wrongness slowly falls. Now let's see what that actually costs.
Take Llama three, a big open model that Meta released in twenty twenty-four. It was trained on chips like this one.
Not one chip. About sixteen thousand of them, wired together, all working on the same model at once.
That's hundreds of millions of dollars' worth of chips, before anyone types a single word.
They ran for about three months, day and night, without a break.
The chips alone drew about as much electricity as two thousand American homes use in a whole year.
In money, one final training run for a top model costs tens or hundreds of millions of dollars.
G P T four, in twenty twenty-three, was estimated at around eighty million. And the price keeps climbing, maybe past a billion soon.
Training isn't just expensive, it's hard. With sixteen thousand chips working together, something breaks about once every three hours.
One chip fails, and the whole job stops. Everything rewinds to the last saved copy of the dials, and starts again.
Meta's team logged more than four hundred of these interruptions in under two months, and kept going.
Worse, you only learn whether the recipe really worked near the end.
So labs try their ideas on small models first, before betting months on the big one.
When training ends, the dials are locked. That's the finished model. A file of numbers, made once.
It also means its knowledge stops at a date. Llama three's reading ended in December twenty twenty-three.
Anything that happened after that, it never read. A newer model means training all over again.
Used billions of times
Now the second life. You press Enter, and the loop from our first episode runs.
Score, pick, add. Every score comes from the dials. But this time, watch them. They're only read.
Training writes the dials. Using a model only reads them.
That makes one answer far cheaper. One copy of a big model fits on a single server. Roughly eight chips, not sixteen thousand.
The energy for one typical question is roughly what a light bulb uses in two minutes, according to the company behind Chat G P T.
In money, a typical reply costs a small fraction of a cent.
But it has to be fast. You're sitting there, waiting. The first word should appear within about a second.
And after that, the words need to stream out, faster than you can read them.
Cheap and fast, for one person. But it's never one person.
By the middle of twenty twenty-five, Chat G P T alone was getting about two and a half billion messages. Every single day.
So here's a question. How long until all that answering uses more energy than the whole training run?
Mixing rough figures from different companies, the answer is, about a month.
And after that, it just keeps going. Month after month, for as long as people use the model.
At Google, a few years ago, more than half of the energy spent on machine learning went to using models, not making them.
That's why inference is hard. It never stops, and everyone expects an answer now.
Demand swings through the day, and it spikes when something new goes viral.
When a new image feature took off in twenty twenty-five, the company's boss joked that their chips were melting, and they had to ration it.
And every piece of every answer means running through all the dials again. Saving a little on each one adds up to fortunes.
Two lives
So, a model has two lives. Training is one enormous job. Thousands of chips, months of time, and dials that keep moving.
Inference is a tiny job, repeated billions of times. A few chips, a second or so, and dials that stay frozen.
Training is hard because it's huge and fragile. Inference is hard because it never ends, and nobody wants to wait.
And Biscuit? The model never learned that name. It read it, from the conversation, the same way it reads everything.
Made once, used billions of times. Next time, we'll look at how to learn with this course.
Sources and fact-check What was checked, what was corrected, and where it comes from.
Checked 2026-12-01. Cost, energy and usage figures vary a lot between sources, and most are company claims or outside estimates rather than audited numbers. The script therefore gives orders of magnitude, names the model and year each figure belongs to, and says "about" or "roughly" every time. Arithmetic below is ours and is shown so it can be re-checked.
Running example: Llama 3.1 405B (Meta, 2024)
We use one model for "the making" because Meta published unusually complete numbers for it (model card + paper). Other labs mostly do not.
| Fact | Value | Source |
|---|---|---|
| Chips | "trained on up to 16K H100 GPUs, each running at 700W TDP" | Llama 3 paper, arxiv.org/abs/2407.21783 |
| Chip-hours, 405B only | 30.84 million H100-hours (39.3M for the whole 3.1 family) | Model card, huggingface.co/meta-llama/Llama-3.1-405B |
| Training text | about 15 trillion tokens | Model card |
| Knowledge cutoff | "pretraining data has a cutoff of December 2023"; released 23 July 2024 | Model card |
| Failures | "During a 54-day snapshot period of pre-training, we experienced a total of 466 job interruptions", 419 of them unexpected; "a single GPU failure may require a restart of the entire job"; recovery from checkpoints; ">90% effective training time" | Llama 3 paper, §3.3.4 |
| Run length | about 2.9 months (Epoch AI's estimate for Llama 3.1 405B); frontier runs typically 1 to 3.5 months, GPT-4 about 3.1 | epoch.ai/data-insights/longest-training-run |
Derived numbers (ours):
- Time. 30.84M chip-hours ÷ 16,384 chips = 1,882 h ≈ 78 days. Epoch says about 2.9 months. Script: "about three months, day and night"; screen: "≈ 3 months".
- Failures. 466 interruptions ÷ 54 days ≈ one every 2.8 h (419 unexpected ≈ one every 3.1 h). Script: "about once every three hours". ✔
- Energy. 30.84M h × 0.7 kW = 21.6 GWh. This counts the chips at full rated power only, with no cooling, CPUs or networking, so the real total is higher. Script: "over twenty million kilowatt-hours"? No. Too abstract. Script uses the household comparison below.
- Homes. The average US home used 861 kWh a month in 2023, or about 10,300 kWh a year (EIA, eia.gov/todayinenergy/detail.php?id=61903). 21.6 GWh ÷ 10,300 kWh ≈ 2,100 homes for a year. Script: "about as much electricity as two thousand American homes use in a year", hedged with "at least", because 21.6 GWh is a floor.
- Chip cost. An H100 sells for roughly $25,000 to $40,000 (reseller and market estimates, not a list price; e.g. jarvislabs.ai/blog/h100-price). 16,384 × $25–40k ≈ $400–650M. Script: "hundreds of millions of dollars' worth of chips". Hedged.
Money to train (other models)
| Claim | Verdict | Source / fix |
|---|---|---|
| GPT-4 (2023) compute cost about $78M; Gemini Ultra about $191M | Estimates by Stanford AI Index 2024 with Epoch AI, using cloud rental prices. Epoch's amortised-hardware method gives about $40M and $30M instead. | hai.stanford.edu/ai-index/2024-ai-index-report; arxiv.org/abs/2405.21015. Say "tens to hundreds of millions of dollars". On screen: "GPT-4 · 2023" with "≈ $78M" marked as an estimate. |
| Frontier training costs keep growing | Epoch: 2.4× a year since 2016; "the largest training runs will cost more than a billion dollars by 2027" if the trend continues | epoch.ai/blog/how-much-does-it-cost-to-train-frontier-ai-models. Screen: "2027?" with "> $1B", dashed (projection). |
| Final run only | These figures are the final training run, not the research, failed runs and staff behind it | Same Epoch page. Script: "just for the final run". |
Running it ("inference")
| Claim | Verdict | Source / fix |
|---|---|---|
| The model's numbers don't change while you chat | True. Using a model only reads its weights. Each API request "is independent and stateless"; multi-turn chat works by sending earlier messages back in as input. | developers.openai.com/api/docs/guides/conversation-state |
| "It remembers me between chats" | Memory features save notes or a summary of past chats as text that is added to the context; "saved memories are part of the context ChatGPT uses to generate a response" | help.openai.com/en/articles/8590148-memory-faq. Script: "memory features save notes, as text, and slip them into the conversation. The dials still don't move." |
| "It learns from my chats" | Partly true later: on consumer plans, OpenAI "may use your content to train our models" unless you opt out (Settings → Data controls). That feeds a future training run. The page doesn't say when, but it isn't live. | help.openai.com/en/articles/5722486. Script: "your chats might be saved to help train a future version. But that's a new round of making, later. Not live." |
| A big model runs on roughly one server of about eight chips | Fair, simplified. Llama 3.1 405B in 8-bit fits one 8-GPU H200 server (NVIDIA) and is served on one 8×MI300X node (Oracle); at 16-bit it does not fit one 8×H100 node (Snowflake). Real services run many copies. | developer.nvidia.com/blog/supercharging-meta-llama-3-1-across-nvidia-platforms; snowflake.com/en/engineering-blog/optimize-llms-with-llama-snowflake-ai-stack. Script: "one copy of a big model fits on a single server, roughly eight chips". |
| Energy per question | OpenAI (Altman, June 2025): an average ChatGPT query uses about 0.34 Wh, "what an oven would use in a little over one second, or a high-efficiency lightbulb would use in a couple of minutes". No methodology published. Google (Aug 2025): median Gemini text prompt 0.24 Wh, with a full-facility method and not independently verified. Long "reasoning" prompts can use far more. | blog.samaltman.com/the-gentle-singularity; arxiv.org/abs/2508.15734; cloud.google.com/blog/products/infrastructure/measuring-the-environmental-impact-of-ai-inference. Script: "about a third of a watt-hour, by OpenAI's own estimate. Roughly a light bulb for two minutes." Screen: "≈ 0.3 Wh". |
| Money per answer | At GPT-4o's API list price ($10 per million output tokens; $2.50 input), a 500-token reply costs about half a US cent. Internal costs aren't published. | developers.openai.com/api/docs/pricing (via aggregators, checked Oct 2026). Script: "a fraction of a cent". |
| Billions of uses | OpenAI told Axios in July 2025: about 2.5 billion prompts a day (up from about 1 billion in Dec 2024). Weekly users: 800M (Oct 2025), 900M (Feb 2026). Higher 2026 claims are not confirmed. | techcrunch.com/2025/07/21/chatgpt-users-send-2-5-billion-prompts-a-day. Script: "about two and a half billion messages a day, in mid-2025". Screen: "ChatGPT · 2025". |
| Speed people expect | Typical streaming speeds are tens to over a hundred tokens a second (Artificial Analysis measures about 167 tok/s for GPT-5 in ChatGPT). Adults silently read about 238 words a minute, or 4 words a second (Brysbaert 2019, 190 studies). First token usually arrives within about a second for short prompts on fast models; reasoning models can take much longer. | artificialanalysis.ai/methodology; doi.org/10.1016/j.jml.2019.104047. Script: "the first word within about a second, then faster than you can read." No exact number on screen. |
| Demand spikes | 27 Mar 2025, Altman: "our GPUs are melting", with temporary rate limits after the image-generation launch | fortune.com/2025/03/28/sam-altman-chatgpt-gpus-melting-ai-images. Script paraphrases: "a popular new feature once had OpenAI's boss joking that their chips were melting." No quote on screen. |
"Why not let it learn as you talk?"
| Claim | Verdict | Source / fix |
|---|---|---|
| Nudging the dials takes about three times the work of just reading them | Standard approximation. Per token, a forward pass costs about 2N operations and training about 6N (forward plus a backward pass of about twice the forward), where N is the parameter count. Kaplan et al. 2020, §2.1. | arxiv.org/abs/2001.08361. Script: "about three times the work". It leaves out that real training also needs far more memory per chip, which is Module 11. |
| One shared model: what one person teaches, everyone gets | A design argument, not a measured fact. It is true by construction for a single set of weights served to everyone. | — |
| Microsoft's Tay (23 Mar 2016) learned from users and was taken offline within about a day after users taught it offensive content | True. Launched 23 March 2016 and silenced on 24 March, after "a coordinated effort by some users to abuse Tay's commenting skills"; one account says 16 hours. Tay was not a modern LLM. | techcrunch.com/2016/03/24/microsoft-silences-its-new-a-i-bot-tay-after-twitter-users-teach-it-racism. Script: "a Microsoft chatbot that learned from its users was pulled offline within a day". Screen tag: "Tay · 2016". |
The comparison (the episode's main "aha")
Claim: for a popular service, the energy spent answering overtakes the energy spent training within weeks.
- Rough arithmetic (ours): 2.5 billion prompts a day × 0.34 Wh ≈ 0.85 GWh a day. Llama 3.1 405B's training is ≥ 21.6 GWh, so the crossover comes after 21.6 ÷ 0.85 ≈ 25 days. With data-centre overhead on the training side (×1.1–1.4) it's 28–36 days.
- Caveat: these figures come from different companies and models, both self-reported. They're right as an order of magnitude only. Script: "Mix these rough figures, from different companies, and the answer is: in about a month." Screen: a day counter on a balance, and no claim more precise than "≈ 1 month".
- Independent support:
- Google, 2019–2021: of the energy it spent on machine learning, "⅗ for inference and ⅖ for training" (research.google/blog/good-news-about-the-carbon-footprint-of-machine-learning-training).
- OpenAI 2024 compute spend (press reports via Epoch AI): about $3B training, $1.8B inference, and inference "around 50%" of compute spend in 2025 (epoch.ai/data-insights/openai-compute-spend).
- Script: "At Google, a few years ago, more than half of the energy spent on machine learning went to using models, not making them."
Callbacks to 0.1 (not re-taught)
Dials start random, the guess-the-hidden-word nudge, trillions of words and millions of rounds, and about 85,000 years of reading are all verified in research/0.1-fact-check.md. This episode only references them.
Wording rules for the script
- "Training" happens once per model version. Labs train new versions and fine-tune, and every one of those is another round of making. Say "made once" and add "for each version" once.
- Don't say "learns" for inference. Say "reads the dials", "uses".
- No GPU internals, batching, KV cache or quantization by name (Modules 13 to 16). "Eight-bit" isn't mentioned.
- "Chip" rather than GPU, so it suits beginners. The word GPU is left for 2.4.