All Questions
Llm Inference Serving hard

A static-batching server groups 32 requests and runs each batch until every sequence finishes. Output lengths range from 20 to 2,000 tokens. Throughput is poor, and short requests wait behind long ones. Which change best fixes both problems?

  1. A Bucket requests by prompt length before batching, so sequences within a batch finish at similar times and padding waste is minimized.
  2. B Reduce the static batch size to 8, so each batch completes sooner and short requests spend less time stuck behind the long-running ones.
  3. C Schedule at iteration level: after each decode step, remove finished sequences and admit queued requests into the freed slots.
  4. D Sort the queue by requested max_tokens and run shortest-job-first batches, so short requests never share a batch with long ones.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions