Teahose.
SIGN IN
NEW HERE — WHAT TEAHOSE DOES
We read the entire AI & tech firehose — so you don't have to.
PODPodcastsAll-In, No Priors, Acquired…
NEWNewslettersStratechery, Newcomer…
PAPPapersPhysical AI research
PHProduct Huntdaily launches
VCInvestor ScoutSequoia, a16z, Benchmark…
CLAUDE DISTILLS →
7 reads, 30 sec each — free, 6 AM ET.
+ a live graph of the companies, people & themes underneath.
HOME/DWARKESH/Reiner Pope – The math behind ho…
POD
// EPISODE
DWARKESH

Reiner Pope – The math behind how LLMs are trained and served

DATE April 29, 2026SOURCE DWARKESHPARTICIPANTS AXEL (JANE STREET ENGINEER), CLARK (JANE STREET ENGINEER), DWARKESH PATEL, REINER POPE, UNIDENTIFIED PARTICIPANT
// KEY TAKEAWAYS3 ITEMS
  1. 01The Roofline Model as the Master Framework for AI Economics
  2. 02Batch Size as the Master Variable of AI Economics
  3. 03Sparsity (MoE) as an Unbounded Win

1. Key Themes

The Roofline Model as the Master Framework for AI Economics

The entire lecture is built around a simple but powerful analytical framework: every inference operation is bounded by either memory bandwidth or compute throughput. Understanding which constraint dominates at any given moment explains API pricing, hardware design choices, and model architecture decisions.

"We're going to approximate. And so we're going to say that the time must be greater than or equal to a certain quantity. And so we're going to consider two different aspects. We're going to look at the time for it takes to do the memory fetches and then the time it takes to do the compute. And it'll turn out that this actually gives us a very strong predictive power, even with a simple model." — Reiner Pope 00:03:16

Batch Size as the Master Variable of AI Economics

The most critical lever in AI inference economics is batch size. At batch size of one, costs are nearly infinite due to unamortized weight fetches. As batch size grows, weight fetch costs amortize and eventually compute dominates. The optimal crossover point can be derived analytically and is surprisingly small.

"If you do not batch together many users, the cost and the economics you get can be like a thousand times worse than if you do batch many two users together." — Reiner Pope 00:04:26

"The batch size needs to be bigger than approximately 300 times sparsity. So for example, if I have a hundred, like I activate in DeepSeek, I activate 32 out of 256 experts. So this would be like eight for DeepSeek." — Reiner Pope 00:19:22

Sparsity (MoE) as an Unbounded Win — With Caveats

Mixture-of-Experts architecture is presented not as a trade-off but as a near-unconditional win from a systems perspective. The paper cited shows that 64x more total parameters yields only 4x improvement in quality-equivalent dense parameters, yet from a cost-per-token view, increasing sparsity keeps getting better as long as you have enough users to fill the batch.

"From the point of view of the analysis we've done here, this is pure win. Keep doing it. Keep doing it until you run out of available users, basically." — Reiner Pope 00:31:14

"The total parameters is limited by the scale-up size." — Reiner Pope 00:46:54


2. Contrarian Perspectives

Pipeline Parallelism Is Mostly Useless for Inference

Conventional wisdom in ML infrastructure suggests pipelining across racks is a key scaling technique. Reiner argues it provides essentially zero benefit for inference latency, and crucially, it fails to help with the KV cache memory problem — which is actually the binding constraint.

"Pipelining is neither better nor worse for latency but it does mean that you just use less memory per rack like memory capacity... there's actually a huge surplus... a rack of Blackwell has many many terabytes... that's much bigger than a trillion parameter model, a trillion parameter model only needs one terabyte." — Reiner Pope 01:01:36

"The KV cache becomes the dominant tone... you need to be keeping all of the racks usefully busy at a time and so the number of sequences that are in flight simultaneously has gone up so those exactly cancel and you end up not getting a saving." — Reiner Pope 01:11:59

Slow Mode Pricing Would Not Meaningfully Reduce Cost

Anthropic's Claude and OpenAI's Codex offer fast-mode pricing. A natural assumption is that a "slow mode" would dramatically reduce cost for patient users. Reiner shows this is largely false — once you've amortized weights across a full batch, you've hit the compute floor and can't go lower regardless of how long you wait.

"Claude code slow or codex slow or whatever would just live on this line. And it wouldn't help much because you're not able to amortize the KV values over a much bigger batch... The compute is also unique per batch. And so what is the minimum work you can do per batch after amortizing everything else away?" — Dwarkesh Patel and Reiner Pope 00:15:39

The Scale-Up Domain Size — Not Memory Capacity — Is What Held Back AI Progress

The popular narrative is that we needed more memory to train bigger models. Reiner argues this is wrong. Pipelining solves the capacity problem cheaply. What actually matters — and what was constrained — is memory bandwidth across the scale-up domain, which determines how fast you can load weights and thus how low your inference latency can go.

"Pipelining totally solves the capacity problem, but scale-up size helps solve the bandwidth problem... The reason the bigger scale-up matters is not the memory capacity of the whole scale-up but really the memory bandwidth." — Reiner Pope 01:18:31

"From Hubbard... this one increased by like a factor of 8... this term doesn't increase a lot, it maybe increases 1.5 or 2x per generation but this one increased by like a factor of 8." — Reiner Pope 01:18:14

Models Are ~100x Over-Trained Relative to Chinchilla Optimal

The Chinchilla scaling law is treated as a rough guide in public discourse. Reiner and Dwarkesh's back-of-the-envelope calculation suggests frontier models are trained on approximately 100x more tokens than Chinchilla would recommend, driven entirely by inference economics.

"The ratio of this 200 trillion or 100 trillion parameters over the chinchilla optimal of 2 trillion — that's the amount it's over trained — which is like a factor of 100 over trained." — Reiner Pope 01:32:08


3. Companies Identified

DeepSeek

AI lab known for publishing detailed technical reports on mixture-of-experts architectures. Mentioned repeatedly as the benchmark for MoE implementation — specifically their innovation of activating more but finer-grained experts.

"DeepSeek V3 model has about 37 billion active parameters and then 700 billion total parameters." — Reiner Pope 00:04:52

"The DeepSeek mixture of experts has said, actually activate more experts but finer grained experts — was a big innovation." — Reiner Pope 00:46:24

Character.AI

AI company known for their efficient attention mechanism that achieves very low bytes-per-token in the KV cache by sharing global context across all layers rather than having unique KV per layer.

"Character AI has a blog post talking about that alternating long and short context... in the global context which is really what we're talking about here, global context was shared across all the layers." — Reiner Pope 01:39:04

NVIDIA

Dominant GPU manufacturer. The Blackwell NVL72 rack (72 GPUs) is the reference hardware throughout. The transition from Hopper (8-GPU scale-up) to Blackwell (72-GPU scale-up) to Rubin (~500-GPU scale-up) is analyzed as a structural unlock for AI model capability.

"From Hopper to Blackwell is mostly just the decision to switch from trays as the form factor... switching to racks as the form factor. That's a product decision." — Reiner Pope 00:41:12

Google (DeepMind/Google Brain)

Cited as having had large scale-up domains for TPU pods significantly earlier than NVIDIA's GPU ecosystem, which may explain Gemini's early inference advantages.

"The Google deployment has actually had very large scale-up domains for a long time. And that also explains why Gemini seemed to be ahead." — Dwarkesh Patel 00:46:14

Maddox (Reiner Pope's company)

New chip startup focused on AI inference hardware. CEO is Reiner Pope, former TPU architect at Google. Implicitly designing around the constraints analyzed in this lecture — particularly scale-up domain size and memory bandwidth.

"Today I'm interviewing Reiner Pope, who is CEO of Maddox, which is a new chip startup. Previously, he was doing TPU architecture and many other things at Google." — Dwarkesh Patel 00:00:00


4. People Identified

Reiner Pope

CEO of Maddox (chip startup), former Google TPU architect. Exceptional systems thinker who can derive API pricing, model architecture choices, and hardware design constraints from first principles using roofline analysis.

"Deploying in larger scale-up domains is a huge unlock." — Reiner Pope 00:46:02

Ilya Sutskever (referenced)

Co-founder of OpenAI, referenced for a talk where he argued against pipeline parallelism.

"There's a talk by Ilya where he says today we know not to do pipeline parallelism." — Dwarkesh Patel 00:54:27

Horace (referenced, last name not given)

ML systems expert who gave Dwarkesh and friends a private lecture on large-scale pre-training systems, covering parallelism strategies including the hierarchical collectives used in modern training runs.

"Last week Horace was kind enough to give me and my friends a great lecture on large scale pre-training systems." — Dwarkesh Patel 01:02:39


5. Operating Insights

Derive Hardware and Pricing Strategy From First Principles Using Three Numbers

Any operator building or procuring AI inference infrastructure should anchor decisions to three hardware-derived constants: (1) the flops-to-memory-bandwidth ratio (~300 on modern GPUs), (2) HBM capacity-to-bandwidth ratio (~15-20ms sweep time), and (3) the scale-up domain size. These three numbers determine your optimal batch size, minimum latency floor, and maximum model size — before writing a single line of code or signing a single procurement contract.

"There is a lower bound on latency, which is simply I need to read all of my total parameters from memory into the chips. And that takes a certain amount of time. If I use all of my memory bandwidth, I can't do any better than that." — Reiner Pope 00:10:22

Equalize Training, RL, and Inference Compute Budgets When Deploying a Model

When planning the lifecycle of a model deployment, the optimal allocation is roughly equal compute spend across pre-training, RL fine-tuning, and inference serving. If inference tokens (serving volume × deployment lifetime) are significantly less than pre-training tokens, the model is under-deployed. If significantly more, it is undertrained. This is a practical tool for capital allocation decisions.

"I will conjecture that that is true for the setup you described as well... we're going to say that the cost of training plus the cost of inference, we want to equalize these." — Reiner Pope 01:21:43

"Every single user who uses GPT-5, the total amount of tokens that they stream should equal the total amount that have gone into pre-training." — Dwarkesh Patel 01:29:27

Use API Pricing as a Reverse-Engineering Tool for Competitor Architecture

Public API pricing from frontier labs encodes real information about their hardware constraints and model architecture. The 50% context-length premium at 200K tokens reveals the crossover point where KV cache fetch time equals compute time. The 5x cheaper input vs. output pricing reveals the degree of memory bandwidth bottleneck. These are not arbitrary pricing decisions — they are cost-reflective signals.

"Given that the bump is at 200k it probably means that this is somewhat aligned with this crossover point... it is in fact tremendously memory bandwidth limited." — Reiner Pope 01:35:45 and Dwarkesh Patel 01:48:38


6. Overlooked Insights

The Rack Boundary Is the Hard Architectural Constraint on MoE Sparsity — and Nobody Is Solving It

This was mentioned briefly but is enormously significant for the future of AI architecture. Expert parallelism — the key technique that makes MoE efficient — requires all-to-all communication, which works beautifully within a single rack's scale-up network. The moment you cross a rack boundary, you hit an 8x bandwidth penalty. This means the maximum number of experts you can efficiently run is bounded by the number of GPUs in a single scale-up domain (currently ~72 for Blackwell, ~500 for Rubin). This is not a software problem. It is a physical cabling and switching problem. Any chip startup or network fabric company that can expand all-to-all connectivity beyond a single rack without the 8x penalty would unlock dramatically sparser (and thus more efficient) models at much larger scale.

"One rack is actually the bounds the size of an expert layer you can do. And so this has been part of what's been driving towards larger and larger interconnect domains... half of the tokens are going to want to leave the rack and go to the other rack — and that's not as good. They're going to need to use a much slower network." — Reiner Pope 00:36:27

Sparse Attention May Be the Most Underappreciated Architectural Lever in the Industry

Reiner briefly mentioned that sparse attention converts the KV cache scaling from linear in context length to square-root in context length. This is not a minor optimization — it fundamentally changes which regime you operate in at long contexts, determines your pricing structure, your hardware requirements, and your MFU. DeepSeek has already published a sparse attention mechanism. Yet the broader industry is still overwhelmingly using dense attention. The operator or investor who takes sparse attention seriously before it becomes consensus will have a meaningful structural cost advantage.

"Sparse attention actually scales much better than that... some of the DeepSeek papers that have published sparse attention end up putting a square root to this term." — Reiner Pope 00:12:31

"I'm pretty excited about sparse attention." — Reiner Pope 00:12:35