Design a Multi-Tenant LLM Inference Platform for Many Open and Commercial Models
Last updated: November 29, 2026
Quick Overview
Design the serving layer behind a public LLM API that hosts a dozen models (from small edge models to large mixture-of-experts models), supports streaming, function calling and batch jobs, and enforces per-customer rate limits while maximizing GPU utilization.
Mistral AI
November 29, 20260
0
0 solved
Design the serving layer behind a public LLM API that hosts a dozen models (from small edge models to large mixture-of-experts models), supports streaming, function calling and batch jobs, and enforces per-customer rate limits while maximizing GPU utilization.
This mirrors La Plateforme, where Mistral AI serves many model sizes to developers and enterprises under tight GPU budgets and latency expectations. The interviewer probes request routing, continuous batching, KV memory management, tenant isolation and capacity planning, and whether you can trade time-to-first-token against throughput deliberately.
What the Interviewer Expects
- Separate a stateless API gateway from model-specific GPU worker pools
- Use continuous batching with a paged KV cache and admission control based on free blocks
- Enforce rate limits in tokens per minute as well as requests, per API key and tier
- Schedule batch-API jobs into idle capacity without hurting interactive latency
- Define SLOs (time to first token, inter-token latency) and the metrics to autoscale on
- Plan rollout, canarying and failure handling for model and kernel updates
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you serve a large MoE model whose experts do not fit on one node?
- When would you split prefill and decode onto different GPUs?
- How do you prevent one tenant's 100k-token prompts from starving others?
- How would you add speculative decoding and measure whether it helps?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Functional: chat completions with streaming, tool calls and JSON mode, embeddings, a batch API, many models and versions. Non-functional: p50 time to first token under about 500 ms for small models, s...
High-Level Design
Client to global load balancer to API gateway (auth, quota check, request validation, tokenization). Gateway pushes to a per-model router that tracks each replica's queue depth and free KV blocks. Eac...