Design request batching for model inference on a single GPU

HardML design45 minSWEMLEPro outline

The question

You have one GPU serving a language model and many concurrent users. Design how requests are queued and batched to get good throughput without hurting latency too much.

Then write the part that decides when to run a batch.

What the interviewer is looking for

  • Separates prefill and decode behaviour
  • Compares static, dynamic and continuous batching
  • Uses KV cache memory as the real limit on batch size
  • Defines latency targets such as time to first token and time per output token
  • Covers fairness, timeouts and back-pressure

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Written by BlogLLM in the style of a publicly reported xAI question type: Request batching for model inference on a single GPU.

Reported in: aced.io

Practice question written by BlogLLM based on publicly reported interview formats. Not an official xAI question.