Spending Inference Time — Kevin Lu
Inference is king: at the end of the day, the user wants a mapping from the input query to their desired output. While the two big ideas from The Bitter Lesson are learning (~= training) and search (~= inference), at the end of the day, people don’t really care about how much the model cost to train. But they will measure how slow the model is to milliseconds and put up the API cost on big leaderboards. If you tell the user it will take 5s but they have to wait 10s, they will end up leaving and not coming back. So, how should we think about getting the most bang for our inference buck? Traditionally, search has been very powerful, leading to AI’s superhuman capabilities (DeepBlue, AlphaGo). Nowadays, the model’s forward pass alone can even be prohibitively expensive, and the open-source community frequently tries to fit models into consumer GPUs (eg, Stable Diffusion). I think inference is really interesting because: At a high level, inference typically has two key components – a model
Spending Inference Time How should we structure inference compute to maximize performance? Published March 2024 Inference is king: at the end of the day, the user wants a mapping from the input query to their desired output. While the two big ideas from The Bitter Lesson are learning (~= training) and search (~= inference), at the end of the day, people don’t really care about how much the model cost to train. But they will measure how slow the model is to milliseconds and put up the API cost on big leaderboards. If you tell the user it will take 5s but they have to wait 10s, they will end up
saved by
related reading
- Compute Allocation for AI Discovery and Searchrybindmitry.github.io
- LLM Inference Performance Engineering: Best Practices | Databricks Blogdatabricks.com
- Transformer Inference Arithmetic | kipply's blogkipp.ly
- The Only Important Technology Is The Internet - Kevin Lukevinlu.ai
- LoRA Without Regret - Thinking Machines Labthinkingmachines.ai
- On-Policy Distillation - Thinking Machines Labthinkingmachines.ai
- Optimally allocating compute between inference and trainingepoch.ai
- All About Transformer Inferencejax-ml.github.io
- Efficient LLM inferencefinbarrtimbers.substack.com
- Why Inference Matters 12x More Than Training | YC Paper Clubyoutube.com
- Trading off compute in training and inference | Epoch AIepochai.org
- OpenAI’s Strawberry and inference scaling lawsinterconnects.ai