0.4Training vs inference
Making a model once vs running it billions of times, and why both are hard.
On this page
The written lesson is coming soon
Every episode gets a hands-on lesson to go with the video. Until then, the full transcript and its sources are below.
Video transcript What the narrator says, chapter by chapter.
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.
GPT-4, 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 ChatGPT.
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, ChatGPT 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 Where the facts in this episode come from.
- arxiv.org/abs/2407.21783 arxiv.org
- epoch.ai/data-insights/longest-training-run epoch.ai
- eia.gov/todayinenergy/detail.php eia.gov
- jarvislabs.ai/blog/h100-price jarvislabs.ai
- hai.stanford.edu/ai-index/2024-ai-index-report hai.stanford.edu
- arxiv.org/abs/2405.21015 arxiv.org
- epoch.ai/blog/how-much-does-it-cost-to-train-frontier-ai-models epoch.ai
- developers.openai.com/api/docs/guides/conversation-state developers.openai.com
- help.openai.com/en/articles/8590148-memory-faq help.openai.com
- help.openai.com/en/articles/5722486 help.openai.com
- developer.nvidia.com/blog/supercharging-meta-llama-3-1-across-nvidia-platforms developer.nvidia.com
- snowflake.com/en/engineering-blog/optimize-llms-with-llama-snowflake-ai-stack snowflake.com
- blog.samaltman.com/the-gentle-singularity blog.samaltman.com
- arxiv.org/abs/2508.15734 arxiv.org
- cloud.google.com/blog/products/infrastructure/measuring-the-environmental-impact-of-ai-inference cloud.google.com
- developers.openai.com/api/docs/pricing developers.openai.com
- techcrunch.com/2025/07/21/chatgpt-users-send-2-5-billion-prompts-a-day techcrunch.com
- artificialanalysis.ai/methodology artificialanalysis.ai
- doi.org/10.1016/j.jml.2019.104047 doi.org
- fortune.com/2025/03/28/sam-altman-chatgpt-gpus-melting-ai-images fortune.com
- arxiv.org/abs/2001.08361 arxiv.org
- techcrunch.com/2016/03/24/microsoft-silences-its-new-a-i-bot-tay-after-twitter-users-teach-it-racism techcrunch.com
- epoch.ai/data-insights/openai-compute-spend epoch.ai