Skip to content
RED SAGSkills
mediumMLOps Engineer interview question

How would you estimate the GPUs needed to serve an open-weight LLM for a given number of users?

What the interviewer wants to hear

  • Weights memory from parameters times bytes per parameter
  • KV cache memory per token times context length times concurrent sequences
  • Leave headroom for activations and runtime overhead
  • Measure tokens per second and latency under realistic load
  • Consider quantisation, GQA and batching to change the numbers

Model answer

I start with weight memory: parameters times bytes per parameter, so a 70B model in 16-bit needs about 140 GB, and 4-bit cuts that to roughly 35 GB. Then I estimate the KV cache: 2 times layers times KV heads times head size times bytes, per token, multiplied by the typical context length and the number of sequences in flight. With grouped-query attention this can be several times smaller than the naive estimate. I add headroom for activations and runtime overhead, usually 10 to 20 percent. That tells me how many GPUs are needed just to fit the model and the concurrency, and whether tensor parallelism is needed. Then I benchmark with a realistic mix of prompt and output lengths to measure tokens per second and time to first token, and size the fleet for peak traffic with margin.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium MLOps Engineer questions