Batching and its limits

Lesson 14 of 28 · Serving and scaling · 2 min Get the course to watch

A GPU is fast at doing the same arithmetic on many things at once, and slow at doing it for one. So a model server that served one request at a time would waste most of the card and cost you several times more per token.

The fix is batching, which means running many conversations through the model together, and the way modern servers do it explains both your throughput and your latency.

The rest of this lesson

  • Continuous batching
  • The knobs
  • The trade
  • Tune with a load test

The full lesson is animated and narrated, with a short quiz, and you can pause it to ask a question. It comes with Run AI in production on Kubernetes.