Try Pro free

Unsupervised Learning · 9 min · Sep 10, 2025

Inference got cheaper through memory and model co-design

Tri Dao explains how quantization, memory-efficient attention and sparse models improved inference efficiency.

The episode’s best minutes

Full analysis
  1. 24:02Inference got cheaper through memory and model co-design9 min
  2. 32:54Inference providers will optimize for three workload patterns6 min
  3. 43:32Expert AI requires scarce domain data and better economics6 min
  4. 5 more moments in the full episode
“As you quantize the model, a lot of times you pretty much don't lose any quality.”
Tri Daoat 25:51 · Unsupervised Learning
25:51

Takeaways

  1. Quantization can shrink models with little quality loss.
  2. Flash Attention reduced memory access, a key bottleneck.
  3. More specialized chips and better kernels could bring further gains.

About this segment

Tri Dao explains how quantization, memory-efficient attention and sparse models improved inference efficiency. He expects another 10x from hardware, architecture and kernel advances.

Tri Dao

Tri Dao is Chief scientist at Together AI and Princeton professor.

Created FlashAttention and worked on Mamba; Together AI chief scientist, Princeton assistant professor.

  • Jacob Effron, Host · Managing director, Redpoint Ventures

    Growth investor in Abridge, Ramp and Physical Intelligence; ex-Flatiron Health.

From “Tri Dao: The End of Nvidia's Dominance, Why Inference Costs Fell & The Next 10X in Speed”, Sep 10, 2025. Watch the full episode

Answers “Is Moore’s law dead?” See all 5 answers

Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

  1. 24:14

    Since ChatShippity debut, I think it's probably reflected in the API cost as well. So on one side, on the modeling, people have just trained much, much better models for the same sort of number of parameters, right? And part of it is much more data. Part of it is, I think, better architecture, right? MOE certainly helps. People invent new sorts of efficient attention and so on, right? So that's on the modeling side. Models are getting much, much better for the same number of parameters.

  2. 24:52

    The other side is on the inference optimization, and we've just been seeing like an explosion of techniques there, right? I think in the early days, as a whole, we didn't understand what are the bottlenecks of inference. And after a while, people realize, hey, it's a lot about data movement, moving the weights in and out of the memory, moving the KV cache, which is part of the attention operation that you need to store the history, entire history to sort of make the next prediction, right?

  3. 25:32

    So a lot of optimizations are around how do we reduce the data movement. So things like you could quantize the model, right? So you use, instead of typically, I think maybe two, three years ago, it was typical to use like 16 bits per parameter. But now people are doing, 8 bits is pretty common now, and some new models are using 4 bits. There's some work using like 1 or 2 bits, which is pretty crazy.

  4. 26:01

    But you see this really, this compelling tradeoff. As you quantize the model, a lot of times you pretty much don't lose any quality. And that requires fairly sophisticated techniques, but that has worked amazingly well. So I think the most recent OpenAI release, GBD OSS, they released most of the layers are in 4-bits, which is crazy. They have, I think, total 120 billion parameters. But because each is using four bits, you could fit that in 60 gigabytes or something.

  5. 26:36

    And that has translated to really, really good inference performance. So quantization is one. The other one is this co-design of modern architecture and the hardware. As people understand much, much better, essentially people on both sides are talking to each other a lot more. I think Flash Attention was kind of like that, where there were people who understand the hardware really, really well. There were people who understand the algorithm and the model really, really well.

  6. 27:07

    But as you combine these ideas, you start to see, oh, I see exactly what the bottleneck on the hardware side is. So how do I change the algorithm? For Flash Attention, it was like we realized memory access was the main bottleneck. and we figure out sort of a new way to rewrite the attention algorithm to reduce memory access, right? And we're seeing that a lot for inference. So an example is this variant of attention from DeepSea called multi-head latent attention, right?

  7. 27:38

    Where they realize, hey, a lot of time is being spent on compressing, moving the KV cache, which is a summary of the history, right? And they realize, hey, we can make the KV cache much, much smaller by, they call it this latent projection where you project on a much smaller space, right? And that turns out to work really, really well. And DeepSeq, I think in the paper, they said they were able to serve this model very, very efficiently.

  8. 28:04

    Yeah. So that's one example. The other one is a mixture of experts where for each query, for each token, you don't use all of the parameters in the model. There's some sparsity. So you use some part of the model. And in the last couple of years, I think the trend has been making the models sparsely. sparser yeah right um I think for the first open source MOE model from Mistral was maybe a year, two years ago.

  9. 28:33

    They activate two experts out of eight experts per layer, right? So it's a ratio of 25%. But now for DeepSeq and OpenAI model, you activate, I think for OpenAI GPT-OSS, it was four out of 128 or something, right? It's a factor of 32. And we're getting sparser and sparser. So that's really, really good for if you serve lots and lots of users. So people are really understanding the workload. They're really co-designing the architecture with the inference.

  10. 29:05

    And I would say that's where a lot of improvement has come from, is this co-design between the model and the inference stack. And then looking forward, where do you think it's going to continue to come from? Right. So I think there's got to be another 10x, or so all right right i mean if you just seems to be the trend so far right extrapolating i just didn't know if we picked off the low-hanging fruit right or if they're still right uh i think it's uh you know we've we've done uh as a whole we've we've picked up a lot of low-hanging fruits for sure um but i think there's still lots to do um one is actually on the hardware side um which is um uh for a while uh because you couldn't really predict what the workload is going to be two years from now. So you can specialize very well.

  11. 29:53

    But as you as the architecture has gotten a little bit more stable, I think people designing chips are optimizing for inference now. So low precision get really good native hardware support. All the networking gets really good because as the model gets larger things like mixture of experts, the models get larger, but you don't activate all the parameters. You might need multiple GPUs or chips to store the model, and then networking becomes much more important.

  12. 30:25

    So I think on the hardware side, it would probably be 2, 3x just in one year. And on the software side, I think a couple of things. One is pushing on the model architecture. So I've worked on things like Mamba. and it's a way to, instead of storing the entire history as a KV cache, you could have the model compress that history into a smaller state vector. Of course, that's going to have certain trade-offs and so on, but we've seen pretty good success with this.

  13. 31:01

    And I think this is going to be especially important for large batch infants, which is what people are, some of the workloads are demanding these days, where things like test time compute and reasoning, like what you really, really want is you want the model to explore lots of trajectories or chains of thought at the same time. I think Google came up with this, Gemini DeepThink, I think, which that was the idea.

  14. 31:26

    I mean, they were winning IMO gold medals and so on, which is they explore multiple paths at the same time. And what that means is that you're doing model inference on, like, hundreds of sequences at the same time. And there, the KVCache becomes a much, much bigger problem. So you could try and get the model to sort of compress that KVCache. That was sort of the direction we were going with Mamba.

  15. 31:53

    And there's been a bunch of other variants coming out along that idea. So I think on the model side, it's going to be 2, 3x. Yeah. Right? And then on a kernel level, lots of people are getting really interested in the kernel side, and some of them are very, very talented. So we're getting very, very good kernels, and that's probably another 2x or so. So taken together, I think even in probably just one year, we would probably get another 10x.

  16. 32:23

    one thing I'm struck by is obviously