Try it: Latency versus throughput
This is a simplified model in which each extra request in the batch slows every decode step by a fixed percentage. Real servers behave less linearly; the default numbers are illustrative.
Input tokens per request.
Output tokens per request.
How many sequences the server decodes together.
Time per output token when the request has the server to itself. Illustrative.
How much each extra sequence in the batch slows every step. Illustrative.
How fast the prompt is read. Illustrative.
- Time per output token
- 25.6 ms
- 20 × (1 + 4% × (8 − 1)) = 25.6 ms
- Time to first token
- 100 ms
- 1000 ÷ 10000 tokens/s = 100 ms
- Full answer, per user
- 6,474 ms
- 100 + (250 − 1) × 25.6 = 6474 ms
- Speed one user sees
- 39.1 tokens/s
- 1000 ÷ 25.6 ms
- Server throughput
- 313 tokens/s
- 8 × 39.1
- Requests finished
- 74.1 per minute
- 8 ÷ 6474 ms × 60 000
Assumptions
- Each extra request in the batch slows every decode step by a fixed percentage (a simple linear model; real engines vary).
- Prefill runs once per request at a constant speed and does not wait for other requests.
- Requests in the batch have the same prompt and answer length.
- All speeds are illustrative inputs, not measurements of a particular model or GPU.