Design a Serverless Inference Platform for Open-Weight LLMs
Last updated: November 29, 2026
Quick Overview
Design a multi-tenant, per-token priced inference service that serves dozens of open models (from 8B to 400B+ parameters) plus customer LoRA adapters, meeting latency targets while keeping GPU utilization high.
Nebius
November 29, 20260
0
0 solved
Design a multi-tenant, per-token priced inference service that serves dozens of open models (from 8B to 400B+ parameters) plus customer LoRA adapters, meeting latency targets while keeping GPU utilization high.
This mirrors Nebius Token Factory, which serves open models such as Llama, Qwen and DeepSeek through an OpenAI-compatible API with fast and cheaper flavors and a batch tier. The interviewer checks serving fundamentals (continuous batching, KV cache, parallelism), capacity and autoscaling with slow model loads, and multi-tenant fairness.
What the Interviewer Expects
- Defines latency metrics (time to first token, inter-token latency) and throughput goals per tier
- Uses continuous batching and paged KV cache in the serving engine
- Chooses tensor or pipeline parallelism based on model size
- Handles cold starts with weight caching and warm pools
- Serves many LoRA adapters on shared base model replicas
- Routes with cache affinity and enforces per-tenant limits
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 do you separate a fast tier and a cheap tier on the same hardware?
- How would prefill and decode disaggregation change the design?
- A new model launch triples traffic in an hour; what happens?
- How do you test a new engine version without regressing quality?
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
OpenAI-compatible chat and completion endpoints, streaming. Tiers: fast (p50 time to first token under 500 ms, high tokens/s) and base (cheaper, looser latency), plus offline batch with a 24 hour SLA....
High-Level Design
API gateway (auth, rate limiting, metering) to a router, which picks a model pool and a replica. Each pool runs an engine such as vLLM or SGLang with continuous batching and paged attention. Models ab...