Design the Serving Platform for a 1,000 Token-Per-Second Diffusion LLM API

Last updated: November 29, 2026

Quick Overview

Design the inference serving system behind an OpenAI-compatible API for a diffusion LLM, covering request routing, batching across denoising steps, autoscaling on GPUs, model rollout, and the latency and throughput SLAs for both chat and streaming use cases.

Inception
ML System Design
Machine Learning Engineer
Inception
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the inference serving system behind an OpenAI-compatible API for a diffusion LLM, covering request routing, batching across denoising steps, autoscaling on GPUs, model rollout, and the latency and throughput SLAs for both chat and streaming use cases.

This maps directly to Inception's inference serving team, which runs Mercury on GPUs behind its own API, AWS Bedrock and Azure Foundry. The interviewer checks whether the candidate adapts autoregressive serving ideas (continuous batching, KV cache, speculative decoding) to a model that refines a full canvas over a fixed number of steps.

What the Interviewer Expects
  • Separate the control plane (routing, quotas, rollout) from the data plane (GPU workers)
  • Explain batching at the denoising-step level and why canvas length matters
  • Define SLOs such as time to first token, tokens per second and p99 end-to-end latency
  • Plan autoscaling with GPU warm pools since model load is slow
  • Cover canary deployments and zero-downtime model version swaps
  • Discuss streaming semantics when tokens are revealed out of order
Key Topics to Cover
Model Serving
GPU Batching
Autoscaling
Canary Deployment
Latency SLOs
Diffusion LLMs
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 stream output to a client when the model commits tokens in non-left-to-right order?
  • How would you serve multiple model sizes on a shared GPU fleet?
  • What would you change to give enterprise tenants a guaranteed dedicated capacity?
  • How do you detect a quality regression in a new model build before full rollout?
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

Functional: chat and completion endpoints compatible with OpenAI, streaming and non-streaming, max_tokens, structured output. Non-functional: high throughput (on the order of 1,000 output tokens per s...

High-Level Design

Edge gateway (auth, rate limits, request validation, token counting) routes to a regional router. The router picks a model pool and a replica using load signals (queue depth, free canvas memory). Each...


Submit Your Answer
Markdown supported

Related Questions