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
ML System Design
Machine Learning Engineer
Nebius
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

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
continuous batching
KV cache
tensor parallelism
autoscaling
multi-LoRA serving
request routing
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. 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 Problems
Sample 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...


Submit Your Answer
Markdown supported

Related Questions