Overtraining small models for cheap inference
Explain why serving cost per token scales with N. Explain why labs therefore train smaller models on far more than 20 tokens per parameter, accepting worse training efficiency.
Builds on: Compute-optimal training (Chinchilla)
What the animation says
Why overtrain?
Chinchilla's rule: for a fixed training budget, the lowest loss comes at about twenty training tokens per parameter. Now a popular open model: about eight billion parameters, trained on about fifteen trillion tokens. That's nearly two thousand tokens per parameter. Far past the optimum. For that loss, a bigger model on fewer tokens would have needed less training compute. So why would a lab knowingly overpay? What's your guess?
Paid once, served forever
Right: Chinchilla counts only training compute. And training happens once. Then the model serves millions of users, one generated token at a time. Each token is a full forward pass through every weight: about two times N operations, where N is the parameter count. And all N weights must sit in GPU memory and be read at every step. How much data the model was trained on doesn't change that bill at all. Halve N, and every served token costs half.
Count the whole life
So count the model's whole life. Training costs about six times N times training tokens. Serving costs about two times N times served tokens. Chinchilla is the case where served tokens are zero. Heavy serving pushes the best N smaller, so training data must grow to hold the same loss. Loss is a floor, plus a size term, plus a data term. Infinite data only removes the data term. So as N shrinks toward where the size term alone hits your target, the data needed shoots up.
70B vs 35B, same loss
Worked case, illustrative numbers: seventy billion parameters on one point four trillion tokens, or thirty-five billion on four point two trillion. Same loss. Training: five point nine versus eight point eight, times ten to the twenty-three. The small one costs about half again as much. Per served token: a hundred forty billion operations versus seventy billion. Extra training divided by savings per token: break-even near four point two trillion served tokens. If the lab serves only two trillion tokens, which is cheaper over its life?
Past break-even
At two trillion served, the seventy B totals about eight point seven times ten to the twenty-three. The thirty-five B, about ten to the twenty-four. Bigger wins. Now serve ten trillion tokens. Seventy B: about two times ten to the twenty-four. Thirty-five B: about one point six. The small model wins by about twenty percent. On a chart, that's two straight lines crossing at four point two trillion. Tap the side of the chart where the thirty-five B is cheaper.
Remember
Serving costs about two times N per token, plus memory for N weights, no matter how long the model trained. Lifetime compute adds that serving bill to the training bill. When a model will serve many trillions of tokens, a smaller model trained far past twenty tokens per parameter is cheapest. But check the break-even. Below it, the compute-optimal model wins. You pay a bigger training bill once, for a cheaper bill on every token after.
Training is paid once, serving forever
Lifetime compute, not training compute
70B vs 35B at equal loss
Remember
On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.
Bytewise
All courses