Batch cap 4: 192 tokens/s; each token every 18 ms on average; the longest wait for a first token 6.26 s.4 of 4 seats busy · 0 waiting · KV cache 15% full
Chapter 6 of 7
Pace or throughput
Continuous batching helped. Now the team argues over the batch cap: sales wants more customers served, support wants replies that don’t crawl.
This chapter: What does a bigger batch buy, and what does each customer pay for it?
About this chapter
You will learn
- How the batch cap raises throughput and cuts the queue
- Why every request in a bigger batch gets its tokens more slowly
- Why there is no free setting, only a trade-off to choose
Words you’ll meet
- Batch cap
- The most requests the server runs in one pass. Others wait in the queue.
- Queue
- Requests that have arrived but haven’t been let into the batch yet.
Step 1 of 4
The is how many requests share a pass. A fuller pass takes longer. The cap is 4.
Predict raising it to 16.
| Batch cap | Throughput | Longest wait for a first token | Time per token, average |
|---|---|---|---|
| 1 | 62 tokens/s | 34.3 s | 15 ms |
| 2 | 113 tokens/s | 15.6 s | 16 ms |
| 4 | 192 tokens/s | 6.26 s | 18 ms |
| 8 | 284 tokens/s | 1.74 s | 22 ms |
| 16 | 321 tokens/s | 187 ms | 26 ms |
Times come from a simulated server: counted work at assumed unit costs, not a measurement of any real server or provider. Real times differ; what carries over is the shape: reading the prompt is mostly computing, writing the reply mostly reading weights from memory.