Skip to content
nonconvexcard

The cost of waiting for the slowest sequence

ProofAdvanced⏱ 1 hourLLM Opsorder statisticsbatchingutilisation

Problem

Let S1,…,SBS_1,\dots,S_B be i.i.d. output lengths.

  1. Prove that static-batching utilisation UB=E[Sˉ]/E[max⁡iSi]U_B = \E[\bar S]/\E[\max_i S_i] satisfies UB≤1U_B \le 1, with equality only if the lengths are almost surely equal.
  2. For SiS_i i.i.d. exponential, prove UB=1/HBU_B = 1/H_B.
  3. For SiS_i i.i.d. uniform on [0,M][0, M], compute UBU_B and compare the decay with the exponential case.

Write a complete argument. Every inequality you use should be one you could state precisely.

Hints

Hints — 0 of 3 revealed

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
KV cache sizing with MHA and GQALLM OpsNumericalBeginner30 min
Ridge point and the batch size needed to saturateLLM OpsNumericalBeginner15 min
Apply Little's law to a serving targetLLM OpsProofIntermediate30 min
Derive the M/M/1 queue from detailed balanceAI SystemsProofIntermediate1 hour
How many users fit on one GPULLM OpsNumericalIntermediate30 min