You will self-host an open-weight LLM for an internal assistant used by 8,000 employees. How do you work out how many GPUs you need?
Deployment and LLMOps · Pro 2
Short answer
Estimate peak load, not the average: concurrent requests at the busiest hour, with typical input and output tokens. Load test one replica to find the throughput it sustains while meeting the latency target. Divide peak load by that number, then add headroom for spikes and one failed node. Check the result with a full load test and plan autoscaling.
Deeper answer
The number of users says little. What matters is how many requests arrive in the busiest minutes and how long each one is. From pilot logs or a careful guess I would get requests per second at peak, and the token profile: perhaps 1,500 tokens in and 300 out. Output length drives the time each request holds a place in the batch.
Then measure. Serve the model on one GPU with a batching server such as vLLM, and raise concurrency until time to first token or total latency breaks the target. That gives the safe capacity of one replica. It depends on the model size, quantisation and context length, so it cannot be looked up. Replicas needed is peak divided by that capacity, plus headroom of perhaps 30%, plus one spare so a node failure does not cause an outage. Because GPU nodes start slowly, autoscaling must act early or keep a warm minimum. Interviewers listen for peak load, measured throughput under a latency target, and headroom.
What a strong answer covers
- Estimates peak concurrent load, not the average or the user count
- Uses the token profile: input and output lengths
- Load tests one replica to find throughput at the latency target
- Divides peak by replica capacity and adds headroom and a spare
- Plans for slow GPU start-up with a warm minimum or early autoscaling
Answer it out loud in the mock interview about 2.5 min
Follow-ups to expect
- How would your plan change if every prompt had 20,000 tokens of context?
- What would you do if the budget covers only half the GPUs?
- Why can you not plan from average requests per day?
Common mistakes
- Planning from the number of users or the daily average
- Using a benchmark number from the internet as replica capacity
- No spare capacity for a node failure or a slow scale-up
Learn it
Latency budgets and load testing
- When would you serve predictions in batch, and when online?
- How would you set up CI/CD for an LLM application?
- What is the difference between data parallelism and model parallelism?
- Why does experiment tracking matter, and what do you record?
- Your model scored well offline but performed badly after launch. What could explain it?
- Explain Kubernetes pods, deployments and services, and why you would use Kubernetes for AI apps.
- What is the KV cache, and why can it cause out-of-memory errors when serving an LLM?
- How would you load test an LLM feature and set a latency budget?
- Your model provider has an outage during peak hours. What should already be in place?
- How do you manage API keys and secrets across environments?
- Finance says the GPU bill has doubled, and you find that average GPU utilisation is under 30%. What do you do?
- Your LLM provider has announced that it will retire the model version that 14 of your features are pinned to. Plan the migration.
- You are on call, and at 2 am an alert says the p99 latency of the recommendation model service has gone from 80 ms to 2 seconds. Walk me through what you do.
- What do you need to pin so that a training run can be reproduced six months later, and why can two runs still differ slightly?
- What is the difference between a shadow release and a canary release for a model, and when would you use each?
- An upstream team changed the amount column from rupees to paise, nothing crashed, and your credit model made bad decisions for two days. What do you put in place?
- LLM outputs change from run to run. How do you build an eval gate in CI that blocks real regressions but does not fail at random?
- How do you detect and handle model drift in production?
- A bank wants your AI system but says no data may leave its network. What are the options?
- Why does an LLM reply have a wait before the first word and then a different speed after it?
- What is quantisation, and what are the trade-offs?
- When would you use a semantic cache for an LLM app, and what can go wrong?
- How would you serve an LLM feature as an API for a web app?
- How would you serve a model that is too big for one GPU, and how would you scale it to more users?
- Your shared inference gateway has a 99.9% availability target, but five incidents this quarter have used up the whole error budget, and product teams still want to ship three launches through it this month. What do you do?
- At 7 in the evening your support assistant starts telling customers wrong refund amounts in about 4% of chats, and three teams shipped a prompt change, a model version change and a new search index that same day. You are the incident lead: how do you run the first hour?
- Twelve teams train and deploy models with their own scripts, and a new model takes about six weeks to reach production. You can buy a managed ML platform, assemble open-source tools on Kubernetes, or improve what exists: how do you choose?
- In six months your ML platform has had four serious incidents, and all four postmortems name the same cause, a manual configuration change, with action items that were never completed. As the new lead, what do you change?
- Your company pays about ₹1.2 crore a month to an LLM API provider, and the CFO asks whether hosting an open-weight model yourselves would halve the bill. How do you decide, and what do you tell the CFO?
- Serving your model with 4-bit weights instead of 16-bit would cut the fleet from 20 GPUs to 12, but your eval score falls from 91% to 89.5%. How do you decide whether to ship the quantized model?
- How would you add single sign-on to an enterprise AI assistant?
- How do you version prompts and models so you can roll back safely?
- What would you capture in traces for an LLM application?
- Why use Docker for an AI application?
- What does an LLM gateway do, and when do you need one?
- Why use vLLM to serve an open-weight model instead of a simple Hugging Face script?