All Questions
Llm Inference Serving medium

Every request to your assistant API starts with the same 3,000-token system prompt, followed by a ~200-token user message and a ~150-token reply. GPUs spend most of their time in prefill and TTFT is high. Which change gives the largest TTFT improvement, and what does it require?

  1. A Raise the maximum batch size so more prefills run together, amortizing the system prompt across requests in each batch.
  2. B Quantize weights to 4-bit so each prefill moves fewer bytes, which proportionally shortens the 3,200-token prefill.
  3. C Enable prefix caching so the system prompt's KV is computed once and reused; the shared prefix must be byte-identical.
  4. D Stream the first tokens sooner by flushing after the system prompt is prefetched, which hides the prefill cost from users.

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

Get the app

Related questions