Estimate the GPUs Needed to Serve an AI Chat Product
The interviewer asksA chat product will serve a 70B-parameter model to 1 million daily users. Estimate how many GPUs you need, and what it will cost.
AI Infrastructure PMAI TPMAI Platform PM (secondary)AdvancedTechnical roundRepresentative10–15 min
On this page
The 30-second version
- Demand: users × messages × output tokens per day → average tokens per second → peak (×2–3).
- Supply: output tokens per second per server at your latency target (the key assumption).
- Servers = peak ÷ per-server throughput, plus 20–30% headroom.
- Check memory: 140 GB of weights at 16-bit, plus KV cache for concurrent conversations.
- Cost = GPUs × $/hour × hours; then per user, and the levers to cut it.
What it's really testing
- A clear estimation structure
- Stating and ranking assumptions
- Knowing what limits serving: throughput, memory, latency
- Turning an estimate into a decision
How to structure your answer
- Clarify usage and latency expectations.
- Demand: tokens per second, average and peak.
- Supply: throughput per server at the latency target.
- Servers and GPUsGraphics processing unit. The chips most AI models are trained and served on. Read the full explanation, with headroom.
- Sanity-check memory.
- Cost, per month and per user, and what would change it.
The interview, played out
- InterviewerA chat product will serve a 70B-parameter model to 1 million daily users. Estimate how many GPUs you need, and what it will cost.
- CandidateHow much does each user use it? Messages per day and typical answer length?
- Revealed when askedAssume 10 messages per user per day, about 500 output tokens per answer.
- CandidateThen output demand is 1 million × 10 × 500 = 5 billion tokens a day. Over 86,400 seconds that's about 58,000 tokens per second on average. Chat has peaks, so I'll plan for about 2.5 times that: roughly 150,000 tokens per second at peak.
- Strong moveConverts daily volume to a peak rate, which is what capacity is sized for.
- CandidateNext, supply. A 70B model at 16-bit is 140 GB of weights, so I'd serve it on 8-GPU servers with 80 GB each. My key assumption: one server produces around 2,400 output tokens per second across all users at an interactive latency. That's the number I'd check first with the serving team.
- InterviewerWhy that much? Isn't each user's response slower than that?
- CandidateYes. Each user might get 20–40 tokens per second, but batching serves many conversations at once. So peak 150,000 ÷ 2,400 is about 63 servers. Add 25% headroom for failures and spikes: about 80 servers, 640 GPUs.
- InterviewerIs memory OK for that many conversations?
- CandidateWeights use 140 of the 640 GB per server, leaving about 500 GB. Oh, and the KV cacheKey-value cache. Stored attention keys and values that let a model generate each new token without recomputing the whole context. Read the full explanation needs that space.
- Missed signalMemory for the KV cache should be part of the check unprompted.
- CandidateAt around 330 KB per token for a model this size, a 4,000-token conversation is about 1.3 GB, so roughly 380 active conversations per server. At 20–40 tokens per second each, that's in line with 2,400 tokens per second. So the assumption holds up.
- RecoveryUses the KV cache to cross-check the throughput assumption.
- InterviewerCost?
- CandidateAt about $3 per GPU-hour: 640 × $3 × 24 × 30 ≈ $1.4 million a month, or about $1.40 per daily user per month. To cut it: route simple messages to a smaller model, quantise to 8-bit, cache common prompts, and use cheaper reserved capacity for the base load. Throughput per server is the assumption that moves the answer most.
The strong answer, distilled
- Demand: 1M users × 10 messages × 500 output tokens = 5B tokens/day ≈ 58k tokens/s on average, ~150k tokens/s at a 2.5× peak.
- Supply: 8-GPU servers (140 GB of weights at 16-bit), assumed ~2,400 output tokens/s each at an interactive latency. That's the key assumption to verify.
- Count: 150k ÷ 2.4k ≈ 63 servers, plus 25% headroom ≈ 80 servers ≈ 640 GPUs.
- Memory check: ~500 GB left per server for KV cache ≈ 380 concurrent 4k-token conversations, consistent with the throughput assumption.
- Cost: 640 GPUs × ~$3/hour ≈ $1.4M/month ≈ $1.40 per daily user per month.
- Levers: routing to smaller models, quantisation, prompt caching, reserved capacity for base load.
These are rough estimates; the method and assumptions are what's being tested.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Structure | A guess | Some steps | Demand → peak → supply → count → headroom → cost |
| Assumptions | Hidden | Stated | Stated and ranked by sensitivity |
| Depth | Weights only | Weights and throughput | Plus KV cache as a cross-check, and latency target |
| Judgment | Stops at the number | Gives cost | Cost per user and levers to reduce it |
Round scorecard: AI Infrastructure PM: technical round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Structure | Jumps to a number. | Some steps. | Formula first, steps said out loud. | Strong. Demand → peak → per-server throughput → servers → headroom → cost, out loud. |
| Assumptions | Hidden or wrong. | Stated. | Stated, reasonable, and the sensitive ones identified. | Strong. Stated each one and flagged throughput per server as the most sensitive. |
| Technical depth | Weights only. | Weights and throughput. | Weights, KV cache, batching and latency targets. | Passable. Checked memory for weights; needed a prompt to bring in the KV cache. |
| Product judgment | Stops at the number. | Mentions cost. | Turns the estimate into a capacity and cost decision. | Strong. Turned the number into cost per user and options to reduce it. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI Infrastructure PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Throughput assumptions, latency targets and cost levers |
| AI TPMTechnical Program Manager. Owns plans, dependencies, risks and delivery for large cross-team programmes. Read the full explanation | Procurement lead times, reserved vs on-demand, and the capacity plan |
| AI Platform PM | How the cost per token feeds pricing and rate limits |
Common mistakes
- Sizing for average load instead of peak
- Forgetting batching, and sizing as if each GPU serves one user
- Ignoring KV cache memory
- False precision: an exact GPU count with no ranges
More follow-ups to practise
- "Average context grows from 4k to 32k tokens. What changes?" Hint: KV cache per conversation, and concurrency.
- "Latency target halves. What changes?" Hint: smaller batches, lower throughput per server.
- "Half the traffic could use a 8B model. Re-estimate." Hint: very different throughput per GPU.
Go deeper
- Module: Inference and serving
- Framework: Back-of-Envelope Method for AI Numbers
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: Capacity and cost planning
- Lesson: The KV cache and batching
- Lesson: Estimating cost per token
- Lesson: A back-of-envelope method
- Also tests: AI numbers: memory and compute
- Also tests: AI numbers: serving, cost and latency
Sources
Representative question: written to match infrastructure PM and TPM estimation rounds, not a specific reported interview. Figures are illustrative assumptions.