22/41
Part 4 of 7 · Sharing the fleetLearn and do

Share tokens, not requests

Turns by request aren't fair when requests differ in size.

A request with a 100,000-token prompt costs at least as much prefill as fifty 2,000-token requests. It costs more once attention counts, since attention's cost grows with the square of the length. So count each tenant's share in tokens.

Deficit round-robin does it. Each round, every tenant with work gets a fixed allowance of tokens and keeps what it doesn't spend. A queue sends its next request only once its saved allowance covers that request.

Predict

Deficit round-robin gives each tenant 4,000 tokens of allowance a round. A's next prompt is 100,000 tokens. When does it go?

Pick an answer above to see the rest