Skip to content
Inference Academy

Capstone: design a production inference platform

Design a complete LLM serving platform from a written brief: a 70B model for interactive chat plus a nightly batch job, with latency targets and 99.9% availability. Size prefill and decode, choose the replica layout, design the request path, routing, autoscaling and batch scheduling, plan for failures and rollouts, pick the metrics and alerts, and price it, with every number worked out.

By

Key takeaways

  • Start from the brief: traffic, prompt and output lengths, prefix reuse, latency targets and availability decide the design.
  • Size prefill by compute and decode by the per-token budget and KV memory; with chunked prefill, time per token is roughly the decode step divided by the share of time not spent on prefill.
  • Size for N+1: the design must still meet its targets with a replica or a whole node down.
  • Run batch work on spare and off-peak capacity with lower priority instead of buying more GPUs.
  • Write the design as a one-page document: assumptions, sizing, request path, failure plan, rollout plan, metrics and cost.
35 min · verified 2026-113 animated diagramsHands-on labPro
Share

This capstone pulls the whole course together. You'll get a written brief, the kind a platform team receives from a product team, and turn it into a design you could defend in a review: how many GPUs, laid out how, behind what request path, scaled by which signals, surviving which failures, at what cost.

Every number below is worked out from the brief and the published H100 specs, with stated efficiency assumptions. Treat them as the first draft of a plan, to be replaced by your own measurements before you buy anything (how to benchmark an LLM server).

#The brief

A company runs an internal assistant for its staff and a nightly document-summarisation job. Both use the same open model.

Requirement Value
Model Llama-class 70B (80 layers, 8 KV heads, head dimension 128), FP8 weights and FP8 KV cache
Interactive traffic Peak 10 requests per second for 8 working hours; about 3 per second the other 16 hours
Interactive prompts About 4,096 tokens: a 2,000-token shared system prompt and tool definitions, plus history and the question
Interactive answers About 512 tokens on average
Interactive targets P95 time to first token under 1.5 s; P95 time per output token under 40 ms
Batch job 200,000 documents a day, about 6,000 tokens in and 300 tokens out each, finished within 24 hours
Availability 99.9% monthly for the interactive service
Hardware H100 SXM 80 GB, 8 per node with NVLink, in one cloud region

The 99.9% target allows about 43 minutes of downtime in a 30-day month. That's less than one long incident, which shapes the failure plan more than anything else.

#Step 1: write down the assumptions

Before any sizing, list what the plan depends on. Reviewers will challenge these first, and you'll replace them with measurements later:

  • Prefill efficiency: about 50% of the H100's dense FP8 peak, so about 0.99×10150.99 \times 10^{15} FLOP/s per GPU.
  • Decode efficiency: about 70% of peak memory bandwidth, so about 2.35 TB/s per GPU.
  • Prefix cache hit rate: 90% for the 2,000-token shared prefix (it's identical for every request, so this should be achievable, if the application keeps it at the start of the prompt).
  • KV cache per token: 2×80×8×128×12 \times 80 \times 8 \times 128 \times 1 byte =160= 160 KiB in FP8 (KV cache explained).
  • Engine: vLLM or SGLang with continuous batching, chunked prefill and automatic prefix caching (continuous batching explained).

Pro content

Keep reading with Inference Academy Pro

Unlock this full lab, including 3 animated diagrams, plus every advanced lesson, hands-on lab, the larger playground models and completion certificates.

Still to come in this lab

  1. Step 2: size prefill
  2. Step 3: choose the replica shape
  3. Step 4: combine prefill and decode on shared replicas
  4. Step 5: fit the batch job
  5. Step 6: the layout
  6. Step 7: the request path
  7. Step 8: scaling and scheduling
  8. Step 9: failures and the error budget
  9. Step 10: rollouts
  10. Step 11: observability
  11. Step 12: cost
  12. What changes the design most
  13. The design document
  14. Common mistakes
  15. Exercise

You will be able to answer

  • Prefill takes 27% of each replica's time. The decode step alone is 9.3 ms. Roughly what time per output token do users see?
  • Why does the design keep three serving replicas when two already meet the latency targets?
  • The nightly batch job needs about 57 GPU-hours a day. What's the cheapest sensible way to run it?
  • Which signal should drive autoscaling for this platform?
  • The prompt starts with the current date, then a 2,000-token system prompt. What's the cheapest fix for TTFT?