← Frontier Lab Interview Curriculum·Study guide 08 of 13
Senior-staff study guide · 08

LLM inference and serving design

LLM inference and serving design covers turning a trained model into an API: the arithmetic of prefill and decode, the KV cache, batching and scheduling, and the routing, caching and capacity decisions that set latency and cost per token. Frontier labs test it because inference is their largest GPU bill and their product surface; Anthropic staff loops ask for batch inference APIs, batched GPU APIs, routers and design critiques. At senior-staff level you must work from roofline numbers to GPU counts, separate TTFT and TPOT SLOs, explain when disaggregation, speculation or quantization stop paying off, and plan for failure, fairness and correctness across a fleet.

95resources5courses6with video62from 2025–2655%advanced65/65question groups covered6%of interview evidence (11% at staff+)
Intro 13Core 30Advanced 52

The senior-staff bar

What L7-level depth looks like in this topic, the follow-up an interviewer would push on, and the resources that prepare you for it.

From the interview reportsRises sharply in staff+ reports. Anthropic senior-staff and staff infra loops: batch inference API over GPU clusters, GPU inference API with batching, inference router, critique an inference design.

Start here

The best resources for a time-poor senior engineer, newest first.

2026Practice

Interview notes: LLM Inference API with Batched GPU Serving

zoezou2015 (community notes) · 2026 · ~2 h

A worked reference solution (about 6,500 words with Python estimates) for the Anthropic batching prompt: requirements, API, a dispatcher in front of GPU replicas, real-time and offline pools, KV bytes per token, prefix-cache savings, and a discrete-event simulation of a size-or-time batcher.

2025Blog post

Inside vLLM: Anatomy of a High-Throughput LLM Inference System

Aleksa Gordić (vLLM blog) · Sep 2025 · ~4 h

A code-level walkthrough of vLLM V1: engine core and scheduler loop, paged KV manager, prefix caching via block hashes, chunked prefill, guided decoding, speculative decoding, disaggregated P/D via KV connectors, multi-GPU/multi-node scaling, and the API server and DP load balancer.

2025Blog post

A postmortem of three recent issues

Anthropic · Sep 2025 · ~1 h

Anthropic's account of three overlapping Claude quality bugs: a context-window routing error that sent requests to the wrong server pool, TPU output corruption from a misconfiguration, and an approximate top-k XLA miscompile. It covers why they were hard to detect across hardware platforms and the eval and monitoring changes made afterwards.

2025Practice

nano-vllm

Xingkai Yu (GeeeekExplorer) · Jun 2025 · ~6 h

A roughly 1,200-line reimplementation of vLLM's core (scheduler, block manager with prefix caching, CUDA graphs, tensor parallelism) that you can read in an afternoon and modify.

2025Reference

DeepSeek-V3/R1 Inference System Overview

DeepSeek-AI · Mar 2025 · ~1 h

DeepSeek's production serving: prefill/decode disaggregation with cross-node expert parallelism (EP32 prefill, EP144 decode), dual-batch overlap to hide communication, load balancers for prefill, decode and experts, and a day of real costs, revenue and a claimed 545% cost-profit margin.

2025Book

How to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)

Jacob Austin, Sholto Douglas, Roy Frostig, Anselm Levskaya et al. (Google DeepMind) · Feb 2025 · ~8 h

The best single derivation of inference cost: the roofline for prefill and decode, the batch size at which decode turns compute-bound, KV-cache bytes per token, latency versus throughput Pareto curves, and sharding a model for serving. It includes worked problems with answers.

2024Paper

Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving

Ruoyu Qin et al. (Moonshot AI / Tsinghua), FAST 2025 best paper · Jul 2024 · ~3 h

Kimi's production design: separate prefill and decode clusters around a distributed KV-cache pool in CPU DRAM/SSD over RDMA, a KV-centric global scheduler (Conductor), and early rejection under overload, all driven by real traces.

2024Paper

DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM Serving

Yinmin Zhong, Shengyu Liu et al. (PKU / UCSD Hao Zhang), OSDI 2024 · Jan 2024 · ~3 h

Argues for goodput (requests per second meeting both TTFT and TPOT SLOs) as the serving objective, shows that prefill/decode interference forces over-provisioning, and places prefill and decode instances with separate parallelism configurations.

2023Paper

Efficient Memory Management for Large Language Model Serving with PagedAttention (vLLM)

Woosuk Kwon, Zhuohan Li, Siyuan Zhuang et al. (UC Berkeley), SOSP 2023 · Sep 2023 · ~3 h

Shows that contiguous KV allocation wastes 60–80% of memory through fragmentation and over-reservation, and fixes it with OS-style block tables, copy-on-write sharing for parallel sampling and beam search, and preemption by swapping or recomputation.

2022Blog post

Transformer Inference Arithmetic

kipply (Carol Chen) · Mar 2022 · ~1.5 h

The classic short derivation of KV-cache size (2·layers·d_model·bytes per token), memory-bandwidth-bound latency, the FLOPs-to-bytes ratio, and when batching becomes compute-bound, worked through for a 52B model.

Learning path

Work through the stages in order. The last stage is the senior-staff layer: production case studies, papers to critique and large-scale trade-offs. Each resource's L7 line says what it adds at your level.

  1. 1

    Foundations: inference arithmetic

    Derive prefill vs decode bounds, KV bytes per token and tokens/s per GPU from first principles · Week 1

    • 2026
      Percy Liang, Tatsunori Hashimoto (Stanford) · Apr 2026 · Lecture · Core · ~2.5 h · video
      An 85-minute lecture that derives why prefill is compute-bound and decode is memory-bound, sizes the KV cache, and walks through the main ways to make decoding cheaper: GQA/MLA, quantization, speculative decoding, and paging/batching. The executable lecture trace lets you rerun the numbers yourself.
      L7Baseline for an ML engineer new to LLMs: watch it once so the arithmetic is automatic, then spend your time on the systems papers.
    • 2022
      kipply (Carol Chen) · Mar 2022 · Blog post · Core · ~1.5 h
      The classic short derivation of KV-cache size (2·layers·d_model·bytes per token), memory-bandwidth-bound latency, the FLOPs-to-bytes ratio, and when batching becomes compute-bound, worked through for a 52B model.
      L7Older but canonical. Learn its back-of-envelope method until you can size a 70B GQA model at 32k context in under two minutes; the candidates who can't usually stall on this.
    • 2022
      Horace He · Mar 2022 · Blog post · Intro · ~1 h
      Explains compute-bound, memory-bandwidth-bound and overhead-bound regimes using clear GPU examples. It is the intuition the roofline model relies on.
      L7Baseline; read it if 'memory-bound' is not yet intuitive. The overhead-bound section explains why CUDA graphs matter for small-batch decode.
    • 2025
      Jacob Austin, Sholto Douglas, Roy Frostig, Anselm Levskaya et al. (Google DeepMind) · Feb 2025 · Book · Advanced · ~8 h
      The best single derivation of inference cost: the roofline for prefill and decode, the batch size at which decode turns compute-bound, KV-cache bytes per token, latency versus throughput Pareto curves, and sharding a model for serving. It includes worked problems with answers.
      L7Lets you compute 'theoretical max throughput, then actual under a latency SLO' on the whiteboard, which is the exact Anthropic phone-screen prompt, and defend your sharding choice with numbers.
    • 2023
      Databricks Mosaic AI · Oct 2023 · Blog post · Core · ~1 h
      Defines TTFT, TPOT, latency and throughput, introduces MBU (model bandwidth utilization) as the decode efficiency metric, and measures the effect of batch size and tensor-parallel degree on latency and cost.
      L7MBU is the number to quote when you say decode is memory-bound. This post shows how to measure it and what good values look like.
    • 2023
      Joshua Ainslie et al. (Google Research) · May 2023 · Paper · Core · ~1 h
      Grouped-query attention: share K/V heads across groups of query heads, cutting KV-cache size by n_heads/n_kv_heads (8x for Llama-70B) at little quality cost, with uptraining from MHA checkpoints.
      L7Baseline, but you must put the GQA factor into every KV-cache estimate. Getting it wrong is a common error on '70B at 128k' questions.
    • 2025
      Hugging Face · Jun 2025 · Tutorial · Intro · ~1 h
      Implements a KV cache in a small PyTorch model, showing why past K and V are reusable while the query is only needed for the current token, and how prefill and decode differ in code.
      L7Baseline; answers 'why cache K and V but never Q' in code. Skip if obvious.
    • 2023
      Horace He et al. (PyTorch team, Meta) · Nov 2023 · Tutorial · Core · ~3 h
      Takes Llama-7B decode from 25 to about 240 tokens/s in under 1,000 lines of PyTorch using torch.compile, static KV cache, INT8/INT4 weight-only quantization, speculative decoding and tensor parallelism, measuring against the bandwidth roofline at each step.
      L7Hands-on proof of the decode roofline: reproduce the numbers and you can explain each optimisation's speedup from first principles.
  2. 2

    Serving toolbox

    Know how continuous batching, paging, prefix caching, chunked prefill, disaggregation, speculation, quantization and decode kernels work and what each costs · Weeks 2–3

    • 2023
      Cade Daniel et al. (Anyscale) · Jun 2023 · Blog post · Intro · ~1 h
      The standard explainer of static, dynamic and continuous batching, with throughput and latency benchmarks across vLLM, TGI and Ray Serve.
      L7Baseline, but its diagrams are the clearest way to explain the idea in 60 seconds before going deeper.
    • 2022
      Gyeong-In Yu et al. (Seoul National Univ. / FriendliAI), OSDI 2022 · Jul 2022 · Paper · Advanced · ~2.5 h
      The origin of iteration-level scheduling (continuous batching) and selective batching: the scheduler re-forms the batch at every decode step instead of waiting for the slowest sequence.
      L7Lets you explain why static batching wastes GPU time and what continuous batching changes in the scheduler loop, which is what the Fellows OA and xAI coding rounds ask you to implement.
    • 2023
      Woosuk Kwon, Zhuohan Li, Siyuan Zhuang et al. (UC Berkeley), SOSP 2023 · Sep 2023 · Paper · Advanced · ~3 h
      Shows that contiguous KV allocation wastes 60–80% of memory through fragmentation and over-reservation, and fixes it with OS-style block tables, copy-on-write sharing for parallel sampling and beam search, and preemption by swapping or recomputation.
      L7Lets you answer 'hundreds of requests with different context lengths, how do you manage KV memory' with block size, preemption policy and their trade-offs, which is the core KV interview probe.
    • 2025
      Aleksa Gordić (vLLM blog) · Sep 2025 · Blog post · Advanced · ~4 h
      A code-level walkthrough of vLLM V1: engine core and scheduler loop, paged KV manager, prefix caching via block hashes, chunked prefill, guided decoding, speculative decoding, disaggregated P/D via KV connectors, multi-GPU/multi-node scaling, and the API server and DP load balancer.
      L7The best single source for drawing a real engine's request lifecycle on the whiteboard and saying where queueing, preemption and cache misses happen. It is also the map for the Fellows OA's 'vLLM-like codebase'.
    • 2023
      Lianmin Zheng, Liangsheng Yin, Ying Sheng et al. (Stanford / Berkeley / LMSYS), NeurIPS 2024 · Dec 2023 · Paper · Advanced · ~3 h
      Introduces RadixAttention: the KV cache is kept in a radix tree with LRU eviction so any shared prefix (system prompts, few-shot examples, multi-turn history) is reused automatically, plus cache-aware scheduling that orders requests by longest prefix match.
      L7Lets you quantify prefix-cache value (hit rate times prefill FLOPs saved) and explain the conflict between cache-aware ordering and fairness.
    • 2024
      Amey Agrawal, Nitin Kedia, Ashish Panwar et al. (Microsoft Research India / Georgia Tech), OSDI 2024 · Mar 2024 · Paper · Advanced · ~2.5 h
      Shows that long prefills stall in-flight decodes (generation stalls), and fixes this with chunked prefill plus stall-free batching under a per-iteration token budget. This is now the default in vLLM and SGLang.
      L7Lets you diagnose 'tail latency is terrible when long prompts arrive' and choose between chunked prefill and full disaggregation with a clear criterion.
    • 2024
      Yinmin Zhong, Shengyu Liu et al. (PKU / UCSD Hao Zhang), OSDI 2024 · Jan 2024 · Paper · Advanced · ~3 h
      Argues for goodput (requests per second meeting both TTFT and TPOT SLOs) as the serving objective, shows that prefill/decode interference forces over-provisioning, and places prefill and decode instances with separate parallelism configurations.
      L7Gives you the vocabulary and the decision rule (separate SLOs, interference, KV transfer cost) for the disaggregation trade-off, a near-certain senior-staff follow-up.
    • 2022
      Yaniv Leviathan, Matan Kalman, Yossi Matias (Google), ICML 2023 · Nov 2022 · Paper · Core · ~1.5 h
      The original speculative decoding paper: a draft model proposes tokens and the target verifies them in one forward pass, with a rejection-sampling rule that keeps the output distribution exact. It gives an expected speedup as a function of acceptance rate.
      L7Lets you derive when speculation helps (memory-bound decode, high acceptance) and when it hurts (large batches, compute-bound), which is the senior-staff caveat.
    • 2025
      Yuhui Li, Fangyun Wei, Chao Zhang, Hongyang Zhang (Peking Univ. / Microsoft / Waterloo) · Mar 2025 · Paper · Advanced · ~2 h
      The current state-of-the-art draft architecture used by vLLM and SGLang: it predicts tokens directly using fused multi-layer features and training-time test, reaching about 3–6.5x speedups.
      L7The method production engines actually ship in 2025–26; lets you discuss draft training and acceptance-rate drift under distribution shift.
    • 2023
      Ji Lin, Jiaming Tang et al. (MIT HAN Lab), MLSys 2024 best paper · Jun 2023 · Paper · Advanced · ~1.5 h
      Protects the roughly 1% of salient weight channels (chosen by activation magnitude) through per-channel scaling, giving robust INT4 weight-only quantization without backprop.
      L7Lets you compare AWQ and GPTQ for a customer's hardware choice: calibration cost, generalisation and kernel availability.
    • 2022
      Guangxuan Xiao, Ji Lin et al. (MIT / NVIDIA), ICML 2023 · Nov 2022 · Paper · Advanced · ~1.5 h
      Moves activation outliers into the weights with a per-channel scaling factor so both weights and activations can be INT8 (W8A8), which speeds up compute-bound prefill.
      L7Lets you explain 'what breaks at each step down': activation outliers are why W8A8 and FP8 activations need special handling.
    • 2023
      Tri Dao, Daniel Haziza, Francisco Massa, Grigory Sizov (Stanford CRFM / Meta) · Oct 2023 · Blog post · Core · ~0.5 h
      Explains why FlashAttention underuses the GPU during decode (batch × heads is small), and splits the KV sequence across thread blocks with a final reduction, up to 8x faster for long contexts.
      L7Answers 'why does decode slow down as context grows': per-step attention reads grow linearly with context, and Flash-Decoding plus paged KV kernels are the fix.
    • 2023
      Albert Q. Jiang et al. (Mistral AI) · Oct 2023 · Paper · Core · ~1 h
      Describes sliding-window attention with a fixed-size rolling buffer KV cache (position i mod W) and prefill chunking, the design Mistral interviewers ask about directly.
      L7Baseline; read the short sections on SWA, the rolling buffer and pre-fill chunking, then be ready to discuss how a rolling buffer interacts with paging and prefix caching.
  3. 3

    Hands-on: serve and measure

    Serve a model with vLLM and SGLang, plot TTFT/ITL/throughput against load, turn on prefix caching, and modify a small engine · Week 3 (8–12 h)

    • 2026
      DeepLearning.AI with the vLLM team · Jun 2026 · Course · Intro · ~2 h · video
      A short hands-on video course on serving with vLLM: KV cache and paging, continuous batching, prefix caching and quantized serving, with notebooks. It is the quickest route to having a running server to measure.
      L7Baseline; skim if you already run vLLM. Its value is getting step 3 of the learning path (serve and measure) done in an evening.
    • 2026
      vLLM project · 2026 · Tool · Core · ~6 h
      Serve a model, enable automatic prefix caching, speculative decoding and FP8, then run 'vllm bench serve' to plot TTFT, ITL and throughput against request rate and concurrency. This is step 3 of the learning path.
      L7Measured curves from your own runs (the knee where TTFT climbs as concurrency rises) give you real numbers to cite in a design round.
    • 2026
      SGLang project (LMSYS) · 2026 · Tool · Core · ~4 h
      Install, send requests, then try RadixAttention prefix reuse, PD disaggregation, HiCache and speculative decoding on the same model to compare with vLLM.
      L7Running both engines lets you discuss scheduler and cache trade-offs from experience, not just from reading.
    • 2025
      Xingkai Yu (GeeeekExplorer) · Jun 2025 · Practice · Core · ~6 h
      A roughly 1,200-line reimplementation of vLLM's core (scheduler, block manager with prefix caching, CUDA graphs, tensor parallelism) that you can read in an afternoon and modify.
      L7The best rehearsal for the Anthropic Fellows inference-engine OA and xAI 'implement batching' rounds: add a prefill/decode-aware scheduler or load balancer to it yourself.
    • 2026
      vLLM project (Red Hat / Neural Magic) · 2026 · Tool · Intro · ~2 h
      A load generator for OpenAI-compatible endpoints that sweeps request rates and reports TTFT, ITL and throughput against SLO targets. Use it to check whether your deployment meets its SLO.
      L7Baseline tool; the value is turning SLO talk into a measured sweep.
    • 2026
      vLLM project · 2026 · Reference · Core · ~1 h
      The Prometheus metrics a vLLM server exports: TTFT, inter-token latency, e2e and queue-time histograms, running and waiting requests, KV-cache usage, prefix-cache hit rate, and preemptions.
      L7Your debugging checklist for 'p99 doubled after a deploy': split p99 into queue, prefill and decode time, then check KV usage and preemptions before blaming the model.
  4. 4

    Design the reported prompts

    Rehearse batch API, batched online API, router, Sora fair queueing, chat backend and design-doc critique with numbers · Week 4

    • 2026
      Anthropic · 2026 · Reference · Core · ~0.5 h
      The product contract of a real batch inference API: async submission of up to 100k requests, results within 24 hours, 50% price discount, per-request results, expiry and cancellation semantics.
      L7Lets you start the 'batch inference API over GPU clusters' design from a real SLA and API shape, then explain how off-peak capacity and preemptible scheduling make the discount possible.
    • 2026
      zoezou2015 (community notes) · 2026 · Practice · Advanced · ~2 h
      A worked reference solution (about 6,500 words with Python estimates) for the Anthropic batching prompt: requirements, API, a dispatcher in front of GPU replicas, real-time and offline pools, KV bytes per token, prefix-cache savings, and a discrete-event simulation of a size-or-time batcher.
      L7Practise against it after writing your own answer. Check its numbers rather than memorising them, and be ready to change assumptions when pushed.
    • 2026
      Adam1679 (community notes) · 2026 · Practice · Advanced · ~1.5 h
      A worked consumer-chat serving design with traffic math (multi-turn prompt growth), KV bytes per token, decode step time inflated by shared prefill, and replica accounting.
      L7Rehearses the ChatGPT-scale prompt with numbers. Use it to check your own estimates.
    • 2026
      Adam1679 (community notes) · 2026 · Practice · Advanced · ~1.5 h
      A worked Sora-style design: arrival rates, GPU-seconds per job by resolution, Little's law for pool size, capacity-dip scenarios with requeueing, plus queueing and cancellation.
      L7Pair it with the VTC fairness paper to answer the OpenAI one-GPU-per-task fair-queueing and cancellation question at depth.
    • 2024
      Ying Sheng, Shiyi Cao, Dacheng Li et al. (Stanford / Berkeley), OSDI 2024 · Jan 2024 · Paper · Advanced · ~2 h
      Defines fairness for LLM serving in terms of weighted input and output tokens, not requests, and gives the Virtual Token Counter scheduler, a work-conserving fair-queueing algorithm with proven bounds. It is the standard reference for multi-tenant fair queueing.
      L7Lets you answer the OpenAI Sora fair-queueing question and the token-cost rate-limiter question with a cost function and a scheduler that has guarantees, instead of only proposing per-tenant queues.
    • 2025
      llm-d maintainers (IBM, Red Hat, Google) · Sep 2025 · Blog post · Advanced · ~1.5 h
      Moves from approximate (traffic-estimated) to precise (KV-event-driven) prefix-cache-aware routing across vLLM pods, with measured TTFT and throughput effects, and explains why round-robin destroys cache reuse.
      L7Directly prepares 'add a router between the API and many backends': scorers for cache affinity versus load, what the router must know, and the hot-spotting it causes.
    • 2025
      vLLM team · Dec 2025 · Blog post · Advanced · ~1 h
      The vLLM project's Rust router: consistent hashing for sticky, KV-cache-friendly routing, power-of-two-choices, round robin and random policies, P/D-aware routing (prefill worker, then decode worker), health checks, retries with backoff and jitter, and circuit breakers.
      L7A concrete design for the 'inference router' question (policies, state the router needs, failure handling) to compare against your own.
    • 2026
      Anyscale / Ray project · 2026 · Tool · Core · ~2 h
      Offline batch inference with vLLM inside Ray Data pipelines: streaming execution across CPU preprocessing stages and GPU model stages, with separate autoscaling of each stage's actor pool.
      L7Directly maps to the Mistral PDF-to-Markdown and batch-API questions: a heterogeneous CPU, GPU and memory pipeline with backpressure.
    • 2026
      Anthropic · 2026 · Reference · Intro · ~0.5 h
      Token-aware rate limiting in production: requests per minute, input and output tokens per minute, token-bucket refill, tiers, and how cached tokens count.
      L7Baseline; gives a real reference for 'cost scales with tokens, not requests' (estimate output tokens at admission, then reconcile).
    • 2026
      Anthropic · 2026 · Reference · Intro · ~0.5 h
      The SSE event protocol of a production LLM API: message_start, content_block_delta, ping, message_stop, and error events mid-stream.
      L7Baseline; enough to design the streaming layer and mid-stream failure semantics of a chat or token-streaming server.
    • 2026
      zoezou2015 (community notes) · 2026 · Practice · Advanced · ~1.5 h
      A practice 'tear apart this design doc' exercise with a ranked review: recomputing the doc's own capacity numbers, the cache-offset-is-not-a-hit-rate error, missing sections, and splitting a shared 8-GPU pool by traffic class.
      L7Directly rehearses the critique format used in Anthropic EM and staff loops, where you are judged on ranking issues, not listing them.
    • 2026
      techinterview.org · Apr 2026 · Practice · Intro · ~1 h
      A primer-level design write-up (requirements, KV cache, continuous batching, routing, prompt caching) with flaws: its 70B KV-cache example is off by about 2x and ignores GQA, and it has no failure handling.
      L7Use it as a 'critique this design' drill: find the arithmetic error, the missing SLO decomposition and the absent failure modes in 10 minutes.
  5. 5

    Senior-staff depth

    Argue frontier-scale trade-offs (cost per token, KV storage, disaggregation, MoE, reliability, correctness) from production case studies and papers you can critique · Weeks 5–6

    • 2022
      Reiner Pope, Sholto Douglas, Aakanksha Chowdhery et al. (Google) · Nov 2022 · Paper · Advanced · ~4 h
      Google's PaLM inference paper. It gives an analytical model for choosing partitioning (2D weight-stationary, batch-sharded attention) to trade latency against cost per token at 500B scale, with multi-query attention as the KV-cache lever.
      L7The template for answering 'how would you shard a 500B model for low-latency versus high-throughput serving' with a cost model rather than by guessing.
    • 2024
      Ruoyu Qin et al. (Moonshot AI / Tsinghua), FAST 2025 best paper · Jul 2024 · Paper · Advanced · ~3 h
      Kimi's production design: separate prefill and decode clusters around a distributed KV-cache pool in CPU DRAM/SSD over RDMA, a KV-centric global scheduler (Conductor), and early rejection under overload, all driven by real traces.
      L7A frontier-lab production case: lets you design KV storage, P/D disaggregation and overload shedding together, with real hit-rate and SLO numbers.
    • 2025
      DeepSeek-AI · Mar 2025 · Reference · Advanced · ~1 h
      DeepSeek's production serving: prefill/decode disaggregation with cross-node expert parallelism (EP32 prefill, EP144 decode), dual-batch overlap to hide communication, load balancers for prefill, decode and experts, and a day of real costs, revenue and a claimed 545% cost-profit margin.
      L7The best public frontier-scale cost-per-token case: lets you reason from H800 counts and tokens per second to dollars per million tokens.
    • 2025
      SGLang team (LMSYS) · May 2025 · Blog post · Advanced · ~1.5 h
      An open reproduction of DeepSeek-style serving in SGLang: PD disaggregation, DeepEP all-to-all, two-batch overlap and expert load balancing (EPLB), with throughput per node and the cost per million tokens compared to DeepSeek's API.
      L7Lets you size an MoE serving deployment and name its failure modes (expert hot-spotting, all-to-all latency).
    • 2025
      Anthropic · Sep 2025 · Blog post · Advanced · ~1 h
      Anthropic's account of three overlapping Claude quality bugs: a context-window routing error that sent requests to the wrong server pool, TPU output corruption from a misconfiguration, and an approximate top-k XLA miscompile. It covers why they were hard to detect across hardware platforms and the eval and monitoring changes made afterwards.
      L7Frontier-lab production evidence: lets you discuss sticky routing, cross-hardware consistency and quality monitoring in a latency/quality debugging round.
    • 2024
      Character.AI · Jun 2024 · Blog post · Advanced · ~0.5 h
      Serving over 20,000 queries per second: MQA plus hybrid local/global attention plus cross-layer KV sharing cut the KV cache by more than 20x, with int8 training and serving and a 95% inter-turn prefix-cache hit rate from sticky routing and an LRU tree cache.
      L7A compact consumer-chat case study: lets you argue model-architecture changes as serving-cost levers, and justify sticky sessions with a hit-rate number.
    • 2025
      Horace He et al. (Thinking Machines Lab) · Sep 2025 · Blog post · Advanced · ~1.5 h
      Shows that run-to-run nondeterminism comes mainly from a lack of batch invariance (kernel reduction order changes with batch size), not from floating-point concurrency alone, and builds batch-invariant matmul, RMSNorm and attention kernels to fix it.
      L7A senior-staff point to raise unprompted: dynamic batching changes outputs. Lets you discuss the cost of determinism for evals, RL on-policy training and debugging.
    • 2026
      Martin Hickey (IBM Research), vLLM blog · Sep 2026 · Blog post · Advanced · ~1.5 h
      A 2026 practitioner guide to what disaggregation buys and costs in vLLM: prefill/decode split, multi-turn KV reuse, a GPU-less frontend and render tier, streaming, and who runs it in production.
      L7Current view on when not to disaggregate (small models, short prompts, poor interconnect), which is what an interviewer means by 'and its costs'.
    • 2025
      ByteDance AIBrix team · Apr 2025 · Paper · Advanced · ~2 h
      A production control plane around vLLM: LLM-specific autoscaling, prefix-aware routing, a distributed KV cache, high-density LoRA management, heterogeneous-GPU optimisation and failure diagnostics.
      L7Shows what the control plane around the engine has to do. Use it to discuss autoscaling signals (KV usage, queue depth) instead of CPU utilisation.
    • 2024
      Eldar Kurtic et al. (Neural Magic / Red Hat, IST Austria) · Nov 2024 · Paper · Advanced · ~2 h
      Over 500k evaluations of FP8, INT8 and INT4 schemes on Llama-3.1 across academic and real-world benchmarks, with deployment guidance by hardware and workload (latency- versus throughput-bound).
      L7Gives you the method for 'how do you prove quality hasn't regressed': which evals, which metrics, and what recovery to expect per scheme.
    • 2026
      Jie Li, Tongyang Wang, Yong Chen · Jun 2026 · Survey paper · Advanced · ~4 h
      The newest KV-cache systems survey. It classifies more than 30 systems by locality, lifetime, ownership and substrate into five archetypes (local-paged, disaggregated-pipeline, shared-store, memory-pool, hybrid-tier) and lists the KV-specific measurements that current evaluations leave out.
      L7Gives you a framework for 'the KV cache as a storage system', so you can design cross-worker prefix reuse and argue who owns the cache and when it gets evicted.
    • 2026
      SGLang team (LMSYS) · Mar 2026 · Blog post · Advanced · ~1 h
      How wide-EP deployments survive the loss of a GPU or node without a full restart: redistributing experts and keeping serving with degraded capacity.
      L7Failure handling at scale: a 96-GPU EP group is one failure domain unless you design it otherwise, which is the reliability point senior-staff answers should make.
    • 2025
      SemiAnalysis · Oct 2025 · Blog post · Advanced · ~1 h
      Nightly open benchmarks of vLLM, SGLang and TensorRT-LLM across H100, H200, B200, GB200 and MI300X/MI355X, plotted as throughput per GPU against interactivity, and converted to cost per million tokens.
      L7Lets you quote current cost-per-token versus tokens-per-second-per-user curves by hardware, which helps when an interviewer asks 'where does the money go'.

What the interviews ask

Problems that recur in this track across 53 reports (17 firsthand), with the resources that prepare you for each.

ReportsProblemPrepare with
24Batch inference API over GPUs7 firsthand · example reportMooncake: A KVCache-centric Disaggregated Architecture for LLM ServingHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)DeepSeek-V3/R1 Inference System Overviewnano-vllmInside vLLM: Anatomy of a High-Throughput LLM Inference System
20LLM inference API / router / service8 firsthand · example reportEfficient Memory Management for Large Language Model Serving with PagedAttention (vLLM)DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingMooncake: A KVCache-centric Disaggregated Architecture for LLM ServingHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)DeepSeek-V3/R1 Inference System Overview
11Latency debugging (p99, TTFT, decode)4 firsthand · example reportTransformer Inference ArithmeticDistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)Inside vLLM: Anatomy of a High-Throughput LLM Inference SystemA postmortem of three recent issues
7KV cache, paging and prefix reuse1 firsthand · example reportTransformer Inference ArithmeticEfficient Memory Management for Large Language Model Serving with PagedAttention (vLLM)Mooncake: A KVCache-centric Disaggregated Architecture for LLM ServingHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)nano-vllm

Question coverage

Every question group collected for this topic from candidate reports, mapped to the resources that prepare you for it. 65 of 65 groups are covered, which is 100% of all report mentions. Hover an example to see the full question.

ReportsQuestion group and examplePrepare with
3GPU inference APIAnthropic 3 · 1 staff+System design: design an efficient GPU inference APIInterview notes: LLM Inference API with Batched GPU ServingInside vLLM: Anatomy of a High-Throughput LLM Inference SystemHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)Dispatcher plus engine request lifecycle plus roofline throughput math
3single-GPU inference batchingAnthropic 2, xAI 1Design a batched inference system where 100 requests take the same time as 1.How to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)How continuous batching enables 23x throughput in LLM inference while reducing p50 latencyExponent (Aced): inference batching system questionMemory-bound decode: batch of 100 costs about one weight read
3batched LLM inference APIAnthropic 3 · 1 staff+LLM Inference API with Batched GPU Serving: Design the public API and *dispatcher* that sit in front of a pool of GPU model replicas serving…Interview notes: LLM Inference API with Batched GPU ServingvLLM Router: A High-Performance and Prefill/Decode Aware Load Balancer for Large-scale ServingWorked dispatcher in front of a GPU replica pool; P/D-aware router
2PDF-to-Markdown inference APIMistral 2Design an inference API for PDF-to-Markdown conversion given CPU-intensive page splitting, a GPU-intensive OCR engine and a memory-expensive…Ray Data: Working with LLMs (batch inference)Heterogeneous CPU/GPU/memory pipeline stages with separate autoscaling and backpressure
2continuous batchingUnspecified frontier 1, Anthropic 1, xAI 1Explain continuous batching and why static batching wastes GPU time in LLM decoding.Orca: A Distributed Serving System for Transformer-Based Generative ModelsHow continuous batching enables 23x throughput in LLM inference while reducing p50 latencyIteration-level scheduling versus static batching, with benchmarks
2KV cache memoryOpenAI 1, xAI 1, Mistral 1What is the KV cache, and what are its memory implications at scale? Derive the formula.Transformer Inference ArithmeticHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)KV bytes-per-token derivation and cost-per-token arithmetic
2LLM sampling API with batchingAnthropic 2Design an API to let users sample from large language models efficiently, with good batching and request orchestration.Interview notes: LLM Inference API with Batched GPU ServingInside vLLM: Anatomy of a High-Throughput LLM Inference SystemExponent (Aced): inference batching system questionSampling API shape, batching dispatcher, engine orchestration
2ChatGPT-style chat backendOpenAI 2 · 1 staff+Design ChatGPTHello Interview: Design ChatGPTInterview notes: LLM Inference Serving (consumer chat backend)Chat product breakdown plus inference-tier math for consumer chat
1LLM sampling API batchingAnthropic 1Design an API to let users sample from large language models efficiently, with good batching and request orchestration.Exponent (Aced): inference batching system questionInterview notes: LLM Inference API with Batched GPU ServingPractice prompt with answers; worked batched sampling design
1critique inference designAnthropic 1EM system design: critique a prebuilt, half-finished Anthropic-style inference design ('tear it apart') rather than designing from a blank s…Interview notes: Design Doc Review: A Batched Inference ServiceDesign an LLM Inference API (techinterview.org) — use as a critique exerciseRanked teardown of a batched inference design doc; flawed write-up to critique
1inference router designAnthropic 1 · 1 staff+System design: add a router between the inference server (many backends) and the API service — traffic prioritization, batching service, que…KV-Cache Wins You Can See: from prefix caching in vLLM to distributed scheduling with llm-dvLLM Router: A High-Performance and Prefill/Decode Aware Load Balancer for Large-scale ServingPrompt cachingCache-aware routing, P/D-aware router, prefix/query caching semantics
1GPU request batchingAnthropic 1System design: batch GPU requestsInterview notes: LLM Inference API with Batched GPU ServingOrca: A Distributed Serving System for Transformer-Based Generative ModelsSize-or-time batcher simulation; iteration-level batching
1GPU inference throughput/batchingAnthropic 1Design an ML inference service: batching strategy, compute theoretical max throughput then estimate actual throughput under latency constrai…How to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)LLM Inference Performance Engineering: Best PracticesKV-Cache Wins You Can See: from prefix caching in vLLM to distributed scheduling with llm-dTheoretical versus SLO-bound throughput, MBU, cache-aware load balancing
1Sora fair queueing + cancellationOpenAI 1Design Sora where each task uses only one GPU: fair queueing approaches and trade-offs, then cancellation approachesInterview notes: Video Generation Pipeline (Sora-style)Fairness in Serving Large Language Models (Virtual Token Counter)Sora-style GPU job queueing and cancellation; token-weighted fair queueing (VTC)
1dynamic batching decode loopxAI 1Given a simulated language model that returns next tokens for a batch of prefixes, implement a batched sampling/decoding pipeline with dynam…nano-vllmAccelerating Generative AI with PyTorch II: GPT, FastSmall engine scheduler to modify; batched decode loop in PyTorch
1inference request batchingxAI 1Implement a simplified inference engine in Python from sample code: batch incoming requests, run the inference call per batch, collect resul…nano-vllmMini-SGLang: Efficient Inference Engine in a NutshellCompact engines with request batching loops to reimplement
1inference API designAnthropic 1Design an inference APIInside vLLM: Anatomy of a High-Throughput LLM Inference SystemInterview notes: LLM Inference API with Batched GPU ServingEnd-to-end inference API architecture and request lifecycle
1inference engine prefill/decodeAnthropic 1Anthropic Fellows OA1: an "Inference Engine" problem involving prefill/decode requests, implemented against provided custom classes and a RE…nano-vllmTaming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve (chunked prefill)Prefill/decode handling in a minimal engine; chunked-prefill scheduling
1inference load balancerAnthropic 1Anthropic Fellows OA1: implement the load-balancer functions for an inference enginevLLM Router: A High-Performance and Prefill/Decode Aware Load Balancer for Large-scale ServingKV-Cache Wins You Can See: from prefix caching in vLLM to distributed scheduling with llm-dLoad-balancer policies: cache affinity versus load, health checks
1prefill/decode schedulerAnthropic 1Anthropic Fellows OA1: add prefill and decode handling to a scheduler (same inference-engine question as other commenters)Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve (chunked prefill)nano-vllmInside vLLM: Anatomy of a High-Throughput LLM Inference SystemToken-budget scheduler mixing prefill chunks with decodes
1batch inference over GPU clusterAnthropic 1 · 1 staff+Design a batch inferencing API over GPU clusters (model treated as a black box: scheduling, API shape, queueing).Batch processing (Message Batches API)Ray Data: Working with LLMs (batch inference)Vidur: A Large-Scale Simulation Framework For LLM InferenceReal batch API contract, Ray batch pipelines, simulated capacity planning
1AI inference serviceAnthropic 1System design like design an AI inference serviceInside vLLM: Anatomy of a High-Throughput LLM Inference SystemInference EngineeringEngine internals plus production chapter on autoscaling and rollout
1batched inference APIAnthropic 1Design a high-concurrency LLM inference API that batches requests before sending them to the GPU, with <500ms-1s latency and limited GPUsInterview notes: LLM Inference API with Batched GPU ServingHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)Latency-bounded batching under limited GPUs with throughput math
1request batching APIAnthropic 1Design an HTTP API where users send individual requests and the system batches them for GPU efficiencyInterview notes: LLM Inference API with Batched GPU ServingExponent (Aced): inference batching system questionHTTP front end batching individual requests for GPUs
1ChatGPT systemOpenAI 1Design ChatGPTHello Interview: Design ChatGPTInterview notes: LLM Inference Serving (consumer chat backend)ChatGPT breakdown plus serving-tier numbers
Show the other 40 question groups
1LLM request batchingAnthropic 1Design a system for efficient request batching for language model inferenceOrca: A Distributed Serving System for Transformer-Based Generative ModelsInterview notes: LLM Inference API with Batched GPU ServingContinuous batching and a worked batching service
1LLM serving tradeoffsGoogle DeepMind 1Gemini team ML system design: throughput, memory and latency tradeoffs for LLM deployment, sharding strategies, KV cache optimization, quant…How to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)Efficiently Scaling Transformer InferenceSharding, latency/throughput Pareto, KV and quantization trade-offs
1vLLM-like server featuresAnthropic 1Anthropic Fellows OA (Nov cohort): implement features on top of a mid-sized, poorly documented vLLM-like inference server codebase (cache, p…nano-vllmInside vLLM: Anatomy of a High-Throughput LLM Inference SystemRead and extend a vLLM-like codebase: cache, prefill, scheduler
1batched model runsAnthropic 1 · 1 staff+Batched Model Runs (system design).Interview notes: LLM Inference API with Batched GPU ServingBatch processing (Message Batches API)Batched model runs: offline pool and batch API contract
1KV cache contentsUnspecified frontier 1Why does the KV cache store K and V but never Q?KV Cache from scratch in nanoVLMCode shows past K/V reused; Q only needed for current token
1KV cache at scaleUnspecified frontier 1How do LLMs handle GBs of KV cache in production (prefix reuse across workers, cache as a storage system)?From Tensor Buffer to Distributed Memory Hierarchy: A Survey of KV Cache Management for LLM ServingMooncake: A KVCache-centric Disaggregated Architecture for LLM ServingSGLang HiCache: Fast Hierarchical KV Caching with Your Favorite Storage BackendsKV as storage hierarchy: shared pools, tiering, cross-worker reuse
1p99 latency debuggingUnspecified frontier 1Your LLM serves 500 users; GPU utilization is high but p99 latency is terrible. Where do you start? (follow-up: TTFT fine but inter-token la…vLLM Production MetricsFlash-Decoding for long-context inferenceTaming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve (chunked prefill)Split p99 into queue/prefill/decode; context-length attention cost; chunked prefill
1paged KV memoryUnspecified frontier 1With hundreds of requests of different context lengths, how do you manage their KV caches in GPU memory?Efficient Memory Management for Large Language Model Serving with PagedAttention (vLLM)Block tables, fragmentation, preemption by swap or recompute
1decode memory bandwidthUnspecified frontier 1If the KV cache makes decoding cheaper, why does inference still slow down as context grows, and how would you improve it?Flash-Decoding for long-context inferenceHow to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)Per-step KV reads grow with context; Flash-Decoding and roofline
1prefill-decode disaggregationUnspecified frontier 1Your LLM has terrible tail latency when long prompts arrive. What do you do? (prefill/decode disaggregation and its costs)Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve (chunked prefill)DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingTaking vLLM Apart: A Practical Guide to Disaggregated ServingChunked prefill versus P/D disaggregation and its costs
1quantizationUnspecified frontier 1Why do we need quantization; FP16 vs INT8 vs INT4 trade-offs?MIT 6.5940 TinyML and Efficient AI Computing (Fall 2026)GPTQ: Accurate Post-Training Quantization for Generative Pre-trained TransformersWhy quantize: memory-bound decode; INT8/INT4 weight-only trade-offs
1serving precision formats FP8/INT4Mistral 1Compare FP16, BF16, FP8, INT8, INT4 and FP4 for serving. What breaks at each step down?FP8 Formats for Deep LearningSmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language ModelsThe State of FP8 KV-Cache and Attention Quantization in vLLMFP8 formats, activation outliers at INT8, FP8/FP4 KV accuracy caveats
1p99 latency regression diagnosisOpenAI 1Your p99 latency doubled after a deploy with no model change. Walk through the diagnosis.vLLM Production MetricsA postmortem of three recent issuesMetrics-driven diagnosis; real routing/compiler regressions after deploys
1consumer chat assistant serving stackOpenAI 2, Anthropic 1, Google DeepMind 1Design the serving stack for a consumer chat assistant at hundreds of millions of users.Interview notes: LLM Inference Serving (consumer chat backend)Optimizing AI Inference at Character.AIConsumer chat serving math; Character.AI 20k QPS case study
1Claude-scale API serving stackAnthropic 1Design the serving stack for a Claude-scale LLM API. Maximise GPU utilisation without wrecking p99 latency.DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingKV-Cache Wins You Can See: from prefix caching in vLLM to distributed scheduling with llm-dDeepSeek-V3/R1 Inference System OverviewGoodput under SLOs, cache-aware routing, DeepSeek production utilisation
1multimodal assistant servingGoogle DeepMind 1Design the serving system for a multimodal assistant (text + image in, streaming text out) at hundreds of millions of users.Encoder Disaggregation for Scalable Multimodal Model ServingEncoder disaggregation for image-in, text-out serving
1serving 70B Llama at scaleMeta MSL 1You need to serve a Llama-class 70B+ model to hundreds of millions of assistant users. What does the serving stack look like and where does …DeepSeek-V3/R1 Inference System OverviewInferenceMAX: Open Source Inference BenchmarkingInterview notes: LLM Inference Serving (consumer chat backend)Cost per token from GPU counts; hardware cost curves; chat traffic math
1KV cache 70B 128k contextxAI 1Estimate the KV-cache memory to serve a 70B-class model at 128k context. What do you do when it doesn't fit?Transformer Inference ArithmeticGQA: Training Generalized Multi-Query Transformer Models from Multi-Head CheckpointsDeepSeek-V2 (Multi-head Latent Attention)Tiered KV Cache Offloading in vLLMKV sizing with GQA; MLA, offload when it doesn't fit
1token-cost rate limiterxAI 1Design a rate limiter for an LLM API where cost scales with tokens, not requests.Rate limitsFairness in Serving Large Language Models (Virtual Token Counter)Token-bucket ITPM/OTPM limits; token-weighted fairness
1chatbot with real-time social searchxAI 1Design the serving stack for a consumer chatbot with real-time search over a social-media firehose.RAGO: Systematic Performance Optimization for Retrieval-Augmented Generation ServingMulti-stage RAG serving with per-stage resource allocation
1rolling-buffer KV cacheMistral 1Estimate the KV-cache memory for serving Mistral 7B, and design the rolling-buffer cache that sliding-window attention enables.Mistral 7B (sliding-window attention and rolling buffer cache)Sliding-window attention and rolling buffer cache (i mod W)
1quantization scheme choiceMistral 1You need to quantize a model for a customer's hardware. How do you choose a scheme, and how do you prove quality hasn't regressed?"Give Me BF16 or Give Me Death"? Accuracy-Performance Trade-Offs in LLM QuantizationAWQ: Activation-aware Weight Quantization for LLM Compression and AccelerationScheme choice by hardware and workload; large-scale accuracy evaluation
1LLM serving API batchingAnthropic 1System design: design an API for serving large language models efficiently, covering request batching, queuing, and GPU utilization under va…Interview notes: LLM Inference API with Batched GPU ServingInside vLLM: Anatomy of a High-Throughput LLM Inference SystemBatching, queueing and utilisation under variable load
1Claude chat serviceAnthropic 1Design a Claude chat serviceInterview notes: Design the Gemini AppStreaming messagesPrompt cachingMulti-turn assistant backend, SSE streaming, prompt caching
1token-generation service 100k rpsAnthropic 1Design a scalable system for a token-generation service used by an LLM that needs to handle up to 100,000 requests per second.DeepSeek-V3/R1 Inference System OverviewStreaming messagesAIBrix: Towards Scalable, Cost-Effective Large Language Model Inference InfrastructureHigh-QPS token serving: fleet design, streaming, autoscaling control plane
1LLM query batching systemAnthropic 1Design an end-to-end batching system for LLM queries.Interview notes: LLM Inference API with Batched GPU ServingExponent (Aced): inference batching system questionEnd-to-end batching service with worked numbers
1design ChatGPTOpenAI 1Design ChatGPTHello Interview: Design ChatGPTDesign ChatGPT breakdown
1LLM-style word streaming serverCohere 1Design and build a streaming server that streams words like an actual LLM server.Streaming messagesSSE token-streaming protocol and mid-stream errors
1critique inference service design docAnthropic 1Review this design document for an inference service and identify what you'd change.Interview notes: Design Doc Review: A Batched Inference ServiceRanked design-doc review of an inference service
1batching under limited computeAnthropic 1Extract more AI performance out of a limited set of infrastructure (e.g. input batching), discussing trade-offs, risks and scaling with limi…How to Scale Your Model — 'All About Transformer Inference' (with the Rooflines chapter)Accelerating Generative AI with PyTorch II: GPT, FastFast Inference from Transformers via Speculative DecodingSqueeze fixed hardware: batching, quantization, speculation, CUDA graphs
1ChatGPT serving at scaleOpenAI 1Design the infrastructure for serving ChatGPT to 100M users.Interview notes: LLM Inference Serving (consumer chat backend)Hello Interview: Design ChatGPTChatGPT-scale serving numbers plus product-level design
170B MoE serving p95Mistral 1Design the inference-serving system for a 70B MoE model hitting 10K req/sec with p95 <1 sec latency.Deploying DeepSeek with PD Disaggregation and Large-Scale Expert Parallelism on 96 H100 GPUsDeepSeek-V3/R1 Inference System OverviewDistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingMoE with PD disaggregation and EP; SLO goodput sizing
1batched KV cache managementMistral 1Implement KV-cache management for batched inference.Efficient Memory Management for Large Language Model Serving with PagedAttention (vLLM)nano-vllmPaged KV block manager design and a code implementation
1consumer chat LLM servingOpenAI 1LLM Inference Serving: Design the backend for a consumer chat product built on a large language model:Interview notes: LLM Inference Serving (consumer chat backend)Worked consumer-chat LLM serving backend
1video generation pipelineOpenAI 1Video Generation Pipeline (Sora-style) (60 min)Interview notes: Video Generation Pipeline (Sora-style)Worked Sora-style video generation pipeline
1Gemini app backendGoogle DeepMind 1Design the Gemini App: Design the backend of a consumer AI assistant app, with web and mobile clients, where a signed-in user holds multi-tu…Interview notes: Design the Gemini AppWorked Gemini app backend
1batching design doc reviewAnthropic 1Design Doc Review: A Batched Inference Service (55 min)Interview notes: Design Doc Review: A Batched Inference ServiceWorked batched-inference design doc review
1LLM inference engine architectureMistral 1Walk through the architecture of a high-throughput LLM inference engine, outlining your strategies for prompt caching, dynamic batching, and…Inside vLLM: Anatomy of a High-Throughput LLM Inference SystemSGLang: Efficient Execution of Structured Language Model Programs (RadixAttention)Mistral 7B (sliding-window attention and rolling buffer cache)Engine architecture: prefix caching, continuous batching, sliding-window context
1low-latency model servingxAI 1Design a system for serving AI models at scale with low latencyDistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingFast Inference from Transformers via Speculative DecodingvLLM Router: A High-Performance and Prefill/Decode Aware Load Balancer for Large-scale ServingLow-latency serving: SLO goodput, speculative decoding, routing
1LLM API safety layerAnthropic 1System design: design an API for an LLM with a safety layer.Constitutional Classifiers: Defending against Universal JailbreaksInput/streaming-output safety classifiers in the serving path, with overhead

All resources

Everything collected for this topic, newest first. 2026 items are marked green. ★ marks a top pick.

Type
Level
Subtopic

  • 2026
    Song Han, MIT HAN Lab · Sep 2026 · Course · Core · ~25 h · video
    Song Han's course: the quantization lectures (5–6), 'LLM Quantization and Deployment' (13) and 'Long Context LLM' (15) explain SmoothQuant, AWQ, QServe and StreamingLLM. These methods came out of his lab. Recorded videos are posted as the term goes on.
    L7Lets you explain why W4A16 helps decode but not prefill, and why activation outliers block W8A8, which is the level of detail an interviewer pushes on after 'we'll quantize it'.
    Fall 2026 is in progress; later lecture videos are not posted yet. Use the Fall 2024 recordings for the LLM lectures.
  • 2026
    Or Ozeri, Danny Harnik, Ronen Schaffer et al. (IBM Research / vLLM) · Sep 2026 · Blog post · Advanced · ~1 h
    vLLM's host-centric offload design with filesystem, object-storage and peer-to-peer tiers, and how offloading works with P/D disaggregation, load balancing, KV events and hybrid models.
    L7Current 2026 engine design: lets you specify how an evicted prefix is found and reloaded across a fleet.
  • 2026
    Martin Hickey (IBM Research), vLLM blog · Sep 2026 · Blog post · Advanced · ~1.5 h
    A 2026 practitioner guide to what disaggregation buys and costs in vLLM: prefill/decode split, multi-turn KV reuse, a GPU-less frontend and render tier, streaming, and who runs it in production.
    L7Current view on when not to disaggregate (small models, short prompts, poor interconnect), which is what an interviewer means by 'and its costs'.
  • 2026
    Own X report: Frontier-lab interview posts (Sep 2026)
    Own analysis (local artifact) · Sep 2026 · Practice · Core · ~1 h
    Your own scan of X posts about frontier-lab interviews, including the LLM inference questions that came up (KV cache, latency debugging, disaggregation).
    L7Use it to check you can answer every inference question in the set; it adds no new depth.
    Local artifact in the private catalog; not a public URL.
  • 2026
    DeepLearning.AI with the vLLM team · Jun 2026 · Course · Intro · ~2 h · video
    A short hands-on video course on serving with vLLM: KV cache and paging, continuous batching, prefix caching and quantized serving, with notebooks. It is the quickest route to having a running server to measure.
    L7Baseline; skim if you already run vLLM. Its value is getting step 3 of the learning path (serve and measure) done in an evening.
  • 2026
    Jie Li, Tongyang Wang, Yong Chen · Jun 2026 · Survey paper · Advanced · ~4 h
    The newest KV-cache systems survey. It classifies more than 30 systems by locality, lifetime, ownership and substrate into five archetypes (local-paged, disaggregated-pipeline, shared-store, memory-pool, hybrid-tier) and lists the KV-specific measurements that current evaluations leave out.
    L7Gives you a framework for 'the KV cache as a storage system', so you can design cross-worker prefix reuse and argue who owns the cache and when it gets evicted.
  • 2026
    Percy Liang, Tatsunori Hashimoto (Stanford) · Apr 2026 · Lecture · Core · ~2.5 h · video
    An 85-minute lecture that derives why prefill is compute-bound and decode is memory-bound, sizes the KV cache, and walks through the main ways to make decoding cheaper: GQA/MLA, quantization, speculative decoding, and paging/batching. The executable lecture trace lets you rerun the numbers yourself.
    L7Baseline for an ML engineer new to LLMs: watch it once so the arithmetic is automatic, then spend your time on the systems papers.
  • 2026
    Jonas Kübler (AWS), Eldar Kurtić, Lucas Wilkinson, Michael Goin et al. (Red Hat AI) · Apr 2026 · Blog post · Advanced · ~1 h
    A 2026 status report on FP8 KV cache and FP8 attention in vLLM: FlashAttention-3 kernel fixes, H100/B200 performance, accuracy on reasoning and long-context benchmarks with uncalibrated per-tensor scales, and when to calibrate, use per-head scales, or stay in BF16 (sliding-window layers, very short contexts).
    L7Current production practice on halving KV memory, with the accuracy caveats you should raise unprompted.
  • 2026
    techinterview.org · Apr 2026 · Practice · Intro · ~1 h
    A primer-level design write-up (requirements, KV cache, continuous batching, routing, prompt caching) with flaws: its 70B KV-cache example is off by about 2x and ignores GQA, and it has no failure handling.
    L7Use it as a 'critique this design' drill: find the arithmetic error, the missing SLO decomposition and the absent failure modes in 10 minutes.
    Unsourced numbers; do not learn its figures.
  • 2026
    SGLang team (LMSYS) · Mar 2026 · Blog post · Advanced · ~1 h
    How wide-EP deployments survive the loss of a GPU or node without a full restart: redistributing experts and keeping serving with degraded capacity.
    L7Failure handling at scale: a 96-GPU EP group is one failure domain unless you design it otherwise, which is the reliability point senior-staff answers should make.
  • 2026
    Carnegie Mellon University (LLM Systems course staff), with guest lectures from vLLM, SGLang, NVIDIA Dynamo, LMCache and DistServe authors · Jan 2026 · Course · Advanced · ~30 h
    The serving half of the syllabus has slides and readings for speculative decoding, the SGLang scheduler and RadixAttention, vLLM/PagedAttention (Woosuk Kwon), Dynamo prefill/decode disaggregation (Vikram Mailthody), LMCache (Junchen Jiang), DistServe (Hao Zhang), and Mooncake/KTransformers. Few other courses cover the 2025–26 serving stack this well.
    L7The guest decks come straight from the people who built each system, so you can explain the design reasoning behind vLLM, SGLang, Dynamo and LMCache, not just their feature lists.
    No lecture videos listed for 2026; slides and readings only.
  • 2026
    GPU MODE community (talks by kernel and serving engineers) · 2026 · Video · Advanced · ~10 h · video
    A YouTube series of practitioner talks on CUDA/Triton kernels, attention kernels and serving-engine internals, with slides and code on GitHub. Choose the inference-kernel and serving-engine talks.
    L7Gives you enough GPU-level detail (occupancy, memory traffic, CUDA graphs) to argue why a decode step is slower than the roofline predicts.
  • 2026
    Philip Kiely (Baseten Books) · 2026 · Book · Core · ~10 h
    A free online book (about 256 pages) covering the whole serving stack: hardware, runtimes, techniques (quantization, speculative decoding, KV caching, parallelism), modalities, and production (containers, autoscaling, rollout). It has a glossary and a recommended-reading appendix.
    L7Mostly breadth. Use chapter 7 (production: autoscaling, cold starts, multi-cloud capacity) to support the operations part of a design answer.
    Written by a vendor (Baseten), so expect some product framing.
  • 2026
    Anthropic · 2026 · Reference · Core · ~0.5 h
    The product contract of a real batch inference API: async submission of up to 100k requests, results within 24 hours, 50% price discount, per-request results, expiry and cancellation semantics.
    L7Lets you start the 'batch inference API over GPU clusters' design from a real SLA and API shape, then explain how off-peak capacity and preemptible scheduling make the discount possible.
  • 2026
    Anthropic · 2026 · Reference · Intro · ~0.5 h
    Prefix caching as a product: cache breakpoints, TTLs, minimum cacheable lengths, and write versus read pricing.
    L7Baseline, but it ties KV reuse to pricing and TTL decisions, which helps with the 'caching value' part of the Anthropic phone screen.
  • 2026
    Anthropic · 2026 · Reference · Intro · ~0.5 h
    Token-aware rate limiting in production: requests per minute, input and output tokens per minute, token-bucket refill, tiers, and how cached tokens count.
    L7Baseline; gives a real reference for 'cost scales with tokens, not requests' (estimate output tokens at admission, then reconcile).
  • 2026
    Anthropic · 2026 · Reference · Intro · ~0.5 h
    The SSE event protocol of a production LLM API: message_start, content_block_delta, ping, message_stop, and error events mid-stream.
    L7Baseline; enough to design the streaming layer and mid-stream failure semantics of a chat or token-streaming server.
  • 2026
    Anyscale / Ray project · 2026 · Tool · Core · ~2 h
    Offline batch inference with vLLM inside Ray Data pipelines: streaming execution across CPU preprocessing stages and GPU model stages, with separate autoscaling of each stage's actor pool.
    L7Directly maps to the Mistral PDF-to-Markdown and batch-API questions: a heterogeneous CPU, GPU and memory pipeline with backpressure.
  • 2026
    vLLM project · 2026 · Reference · Core · ~1 h
    The Prometheus metrics a vLLM server exports: TTFT, inter-token latency, e2e and queue-time histograms, running and waiting requests, KV-cache usage, prefix-cache hit rate, and preemptions.
    L7Your debugging checklist for 'p99 doubled after a deploy': split p99 into queue, prefill and decode time, then check KV usage and preemptions before blaming the model.
  • 2026
    vLLM project · 2026 · Tool · Core · ~6 h
    Serve a model, enable automatic prefix caching, speculative decoding and FP8, then run 'vllm bench serve' to plot TTFT, ITL and throughput against request rate and concurrency. This is step 3 of the learning path.
    L7Measured curves from your own runs (the knee where TTFT climbs as concurrency rises) give you real numbers to cite in a design round.
  • 2026
    SGLang project (LMSYS) · 2026 · Tool · Core · ~4 h
    Install, send requests, then try RadixAttention prefix reuse, PD disaggregation, HiCache and speculative decoding on the same model to compare with vLLM.
    L7Running both engines lets you discuss scheduler and cache trade-offs from experience, not just from reading.
  • 2026
    vLLM project (Red Hat / Neural Magic) · 2026 · Tool · Intro · ~2 h
    A load generator for OpenAI-compatible endpoints that sweeps request rates and reports TTFT, ITL and throughput against SLO targets. Use it to check whether your deployment meets its SLO.
    L7Baseline tool; the value is turning SLO talk into a measured sweep.
  • 2026
    NVIDIA · 2026 · Tool · Core · ~3 h
    NVIDIA's inference engine: in-flight batching, paged KV, FP8/FP4 kernels, speculative decoding, and disaggregated serving through Dynamo. It is the reference for vendor-optimised kernels.
    L7Know where it beats the open engines (kernels, FP4 on Blackwell) and what it costs (build complexity, NVIDIA lock-in) for a make-or-buy discussion.
  • 2026
    zoezou2015 (community notes) · 2026 · Practice · Advanced · ~2 h
    A worked reference solution (about 6,500 words with Python estimates) for the Anthropic batching prompt: requirements, API, a dispatcher in front of GPU replicas, real-time and offline pools, KV bytes per token, prefix-cache savings, and a discrete-event simulation of a size-or-time batcher.
    L7Practise against it after writing your own answer. Check its numbers rather than memorising them, and be ready to change assumptions when pushed.
    Community-written; not verified by Anthropic.
  • 2026
    zoezou2015 (community notes) · 2026 · Practice · Advanced · ~1.5 h
    A practice 'tear apart this design doc' exercise with a ranked review: recomputing the doc's own capacity numbers, the cache-offset-is-not-a-hit-rate error, missing sections, and splitting a shared 8-GPU pool by traffic class.
    L7Directly rehearses the critique format used in Anthropic EM and staff loops, where you are judged on ranking issues, not listing them.
    Community-written.
  • 2026
    Adam1679 (community notes) · 2026 · Practice · Advanced · ~1.5 h
    A worked consumer-chat serving design with traffic math (multi-turn prompt growth), KV bytes per token, decode step time inflated by shared prefill, and replica accounting.
    L7Rehearses the ChatGPT-scale prompt with numbers. Use it to check your own estimates.
    Community-written.
  • 2026
    Adam1679 (community notes) · 2026 · Practice · Advanced · ~1.5 h
    A worked Sora-style design: arrival rates, GPU-seconds per job by resolution, Little's law for pool size, capacity-dip scenarios with requeueing, plus queueing and cancellation.
    L7Pair it with the VTC fairness paper to answer the OpenAI one-GPU-per-task fair-queueing and cancellation question at depth.
    Community-written.
  • 2026
    ShellyYin96 (community notes) · 2026 · Practice · Advanced · ~1.5 h
    A worked consumer-assistant backend: turn rates, separate prefill and decode token rates and host counts, model-tier routing, conversation and image storage, and prefix-cache savings in context assembly.
    L7Rehearses multi-turn assistant designs (Gemini, Claude chat, ChatGPT) with full cost accounting.
    Community-written.
  • 2026
    Hello Interview · 2026 · Practice · Core · ~1 h
    A product-level breakdown of the 'Design ChatGPT' prompt: conversations, streaming, storage and scaling. It is the generalist system-design layer around the inference tier.
    L7Covers the non-GPU half (conversation store, streaming fan-out) at mid-level depth. Add the inference-tier material yourself to reach senior-staff level.
    Parts may require Hello Interview Premium.
  • 2026
    Aced (formerly Exponent) · 2026 · Practice · Core · ~1 h
    A question page with community answers for the single-GPU batching prompt (up to 100 inputs per batch, users waiting synchronously); related pages cover LLM sampling APIs, end-to-end batching and streaming servers.
    L7Use it for timed mock practice; the answers are uneven, so treat them as prompts.
    Some answers require an Aced subscription.
  • 2026
    pallavi-shekhar (community question bank) · 2026 · Practice · Core · ~2 h
    A community question bank organised by lab, with inference-serving and GPU-performance sections (continuous batching, KV-cache formula, precision formats, p99 diagnosis, 70B at 128k context, token-cost rate limiting).
    L7Use it as a drill list: answer each inference question aloud with numbers in 3 minutes.
    Questions only; few answers.
  • 2025
    vLLM Multimodality Workstream · Dec 2025 · Blog post · Advanced · ~1 h
    Moves the vision encoder into its own scalable service (encode-prefill-decode, EPD) with a remote cache of image embeddings, so image encoding no longer stalls text prefill and decode. It reports 2x goodput and 20–50% lower p99 for multi-image requests on Qwen3-VL.
    L7Prepares the multimodal assistant design: where image preprocessing and encoding run, and how to cache and scale them separately.
  • 2025
    vLLM team · Dec 2025 · Blog post · Advanced · ~1 h
    vLLM's wide expert parallelism with DP attention, dual-batch overlap, EPLB and P/D disaggregation for DeepSeek-class MoE, with per-GPU throughput results.
    L7A second independent data point on MoE serving economics, so your numbers aren't based on a single source.
  • 2025
    vLLM team · Dec 2025 · Blog post · Advanced · ~1 h
    The vLLM project's Rust router: consistent hashing for sticky, KV-cache-friendly routing, power-of-two-choices, round robin and random policies, P/D-aware routing (prefill worker, then decode worker), health checks, retries with backoff and jitter, and circuit breakers.
    L7A concrete design for the 'inference router' question (policies, state the router needs, failure handling) to compare against your own.
  • 2025
    SGLang team (LMSYS) · Dec 2025 · Practice · Core · ~4 h
    A compact, readable SGLang core (radix cache, overlap scheduling, chunked prefill, tensor parallelism) released for learning and research.
    L7A second small codebase to practise on; compare its radix-tree cache with nano-vllm's block hashing.
  • 2025
    Yuhan Liu, Yihua Cheng, Jiayi Yao et al. (UChicago / TensorMesh) · Oct 2025 · Paper · Advanced · ~2 h
    A KV-cache layer that offloads caches to CPU, disk and remote storage and shares them across engine instances (vLLM, SGLang), with usage statistics showing stored KV growing far beyond GPU memory.
    L7Lets you discuss cache tiering as a cost decision: the price of recomputing a prefix versus the bandwidth to reload it, by tier.
  • 2025
    Together AI · Oct 2025 · Blog post · Advanced · ~1 h
    A production speculator that keeps learning from live traffic, adapting the drafter to each customer's workload to keep acceptance rates high as traffic changes.
    L7A production-scale lesson: a static drafter loses acceptance as workloads drift, so speculation needs monitoring and retraining.
  • 2025
    SemiAnalysis · Oct 2025 · Blog post · Advanced · ~1 h
    Nightly open benchmarks of vLLM, SGLang and TensorRT-LLM across H100, H200, B200, GB200 and MI300X/MI355X, plotted as throughput per GPU against interactivity, and converted to cost per million tokens.
    L7Lets you quote current cost-per-token versus tokens-per-second-per-user curves by hardware, which helps when an interviewer asks 'where does the money go'.
    Analyst firm; the newsletter has some paywalled sections.
  • 2025
    Tri Dao (Princeton / Together AI) · Sep 2025 · Course · Advanced · ~15 h
    A PhD seminar built on its reading list: training and inference systems, attention kernels, and hardware-aware algorithms. Use the list to choose which primary papers to read in depth.
    L7Builds the habit of critiquing papers (what is the bottleneck, what does the baseline hide), which is the skill tested in 'critique an inference design'.
    Seminar format with no videos; the value is the curated paper list.
  • 2025
    Horace He et al. (Thinking Machines Lab) · Sep 2025 · Blog post · Advanced · ~1.5 h
    Shows that run-to-run nondeterminism comes mainly from a lack of batch invariance (kernel reduction order changes with batch size), not from floating-point concurrency alone, and builds batch-invariant matmul, RMSNorm and attention kernels to fix it.
    L7A senior-staff point to raise unprompted: dynamic batching changes outputs. Lets you discuss the cost of determinism for evals, RL on-policy training and debugging.
  • 2025
    Aleksa Gordić (vLLM blog) · Sep 2025 · Blog post · Advanced · ~4 h
    A code-level walkthrough of vLLM V1: engine core and scheduler loop, paged KV manager, prefix caching via block hashes, chunked prefill, guided decoding, speculative decoding, disaggregated P/D via KV connectors, multi-GPU/multi-node scaling, and the API server and DP load balancer.
    L7The best single source for drawing a real engine's request lifecycle on the whiteboard and saying where queueing, preemption and cache misses happen. It is also the map for the Fellows OA's 'vLLM-like codebase'.
  • 2025
    SGLang team (LMSYS) · Sep 2025 · Blog post · Advanced · ~1 h
    Extends RadixAttention to a GPU, host-memory and storage hierarchy with prefetching and write-back policies, and reports TTFT and throughput gains for multi-turn and agentic workloads.
    L7Practical numbers for 'GBs of KV cache in production': when tiering pays off and what overlaps with compute.
  • 2025
    llm-d maintainers (IBM, Red Hat, Google) · Sep 2025 · Blog post · Advanced · ~1.5 h
    Moves from approximate (traffic-estimated) to precise (KV-event-driven) prefix-cache-aware routing across vLLM pods, with measured TTFT and throughput effects, and explains why round-robin destroys cache reuse.
    L7Directly prepares 'add a router between the API and many backends': scorers for cache affinity versus load, what the router must know, and the hot-spotting it causes.
  • 2025
    Anthropic · Sep 2025 · Blog post · Advanced · ~1 h
    Anthropic's account of three overlapping Claude quality bugs: a context-window routing error that sent requests to the wrong server pool, TPU output corruption from a misconfiguration, and an approximate top-k XLA miscompile. It covers why they were hard to detect across hardware platforms and the eval and monitoring changes made afterwards.
    L7Frontier-lab production evidence: lets you discuss sticky routing, cross-hardware consistency and quality monitoring in a latency/quality debugging round.
  • 2025
    Hugging Face · Jun 2025 · Tutorial · Intro · ~1 h
    Implements a KV cache in a small PyTorch model, showing why past K and V are reusable while the query is only needed for the current token, and how prefill and decode differ in code.
    L7Baseline; answers 'why cache K and V but never Q' in code. Skip if obvious.
  • 2025
    Xingkai Yu (GeeeekExplorer) · Jun 2025 · Practice · Core · ~6 h
    A roughly 1,200-line reimplementation of vLLM's core (scheduler, block manager with prefix caching, CUDA graphs, tensor parallelism) that you can read in an afternoon and modify.
    L7The best rehearsal for the Anthropic Fellows inference-engine OA and xAI 'implement batching' rounds: add a prefill/decode-aware scheduler or load balancer to it yourself.
  • 2025
    SGLang team (LMSYS) · May 2025 · Blog post · Advanced · ~1.5 h
    An open reproduction of DeepSeek-style serving in SGLang: PD disaggregation, DeepEP all-to-all, two-batch overlap and expert load balancing (EPLB), with throughput per node and the cost per million tokens compared to DeepSeek's API.
    L7Lets you size an MoE serving deployment and name its failure modes (expert hot-spotting, all-to-all latency).
  • 2025
    NVIDIA Technical Blog · Apr 2025 · Blog post · Intro · ~1 h
    Defines how serving metrics are measured (TTFT, ITL, TPS per user versus per system, request concurrency) and the common traps, such as tokenizer differences and whether TTFT includes queueing.
    L7Baseline. Mainly useful for not getting caught on metric definitions in a latency-debugging round.
  • 2025
    ByteDance Seed / Peking University · Apr 2025 · Paper · Advanced · ~2 h
    Separates attention and FFN/expert modules onto different GPU pools (attention-FFN disaggregation), with ping-pong micro-batch pipelining and a custom M2N communication library, for higher per-GPU MoE decode throughput.
    L7Hyperscale MoE design where the unit of disaggregation is the module, not the phase. Useful for a 'what would you do at 10x' follow-up.
  • 2025
    ByteDance AIBrix team · Apr 2025 · Paper · Advanced · ~2 h
    A production control plane around vLLM: LLM-specific autoscaling, prefix-aware routing, a distributed KV cache, high-density LoRA management, heterogeneous-GPU optimisation and failure diagnostics.
    L7Shows what the control plane around the engine has to do. Use it to discuss autoscaling signals (KV usage, queue depth) instead of CPU utilisation.
  • 2025
    Ranran Zhen, Juntao Li et al. · Apr 2025 · Survey paper · Core · ~3 h
    A 2025 serving survey organised by instance-level work (placement, request scheduling, decoding length prediction, KV storage, P/D disaggregation), cluster-level work (heterogeneous GPUs, load balancing, cloud) and emerging scenarios.
    L7Breadth map for checking you have not missed a serving-system category. Read the taxonomy, not every citation.
  • 2025
    NVIDIA Technical Blog · Mar 2025 · Blog post · Core · ~1.5 h
    Introduces Dynamo's components: disaggregated serving with dynamic rate matching between prefill and decode pools, a KV-aware smart router, a KV block manager for tiered offload, and NIXL for low-latency KV transfer.
    L7Gives a concrete reference architecture (planner, router, KV manager, transfer library) to adapt in a datacenter-scale design.
    Vendor post; check the benchmark claims against the papers.
  • 2025
    Yuhui Li, Fangyun Wei, Chao Zhang, Hongyang Zhang (Peking Univ. / Microsoft / Waterloo) · Mar 2025 · Paper · Advanced · ~2 h
    The current state-of-the-art draft architecture used by vLLM and SGLang: it predicts tokens directly using fused multi-layer features and training-time test, reaching about 3–6.5x speedups.
    L7The method production engines actually ship in 2025–26; lets you discuss draft training and acceptance-rate drift under distribution shift.
  • 2025
    DeepSeek-AI · Mar 2025 · Reference · Advanced · ~1 h
    DeepSeek's production serving: prefill/decode disaggregation with cross-node expert parallelism (EP32 prefill, EP144 decode), dual-batch overlap to hide communication, load balancers for prefill, decode and experts, and a day of real costs, revenue and a claimed 545% cost-profit margin.
    L7The best public frontier-scale cost-per-token case: lets you reason from H800 counts and tokens per second to dollars per million tokens.
  • 2025
    Wenqi Jiang et al. (ETH Zürich / Google) · Mar 2025 · Paper · Advanced · ~2 h
    Models RAG serving as a pipeline (retrieval, encoders, rewriters, prefill, decode), defines RAGSchema, and searches resource allocation and batching per stage, showing the bottleneck moves with the workload.
    L7Lets you design 'chatbot with real-time search over a firehose' as a multi-stage serving problem with per-stage SLOs, not just 'add a vector DB'.
  • 2025
    Jacob Austin, Sholto Douglas, Roy Frostig, Anselm Levskaya et al. (Google DeepMind) · Feb 2025 · Book · Advanced · ~8 h
    The best single derivation of inference cost: the roofline for prefill and decode, the batch size at which decode turns compute-bound, KV-cache bytes per token, latency versus throughput Pareto curves, and sharding a model for serving. It includes worked problems with answers.
    L7Lets you compute 'theoretical max throughput, then actual under a latency SLO' on the whiteboard, which is the exact Anthropic phone-screen prompt, and defend your sharding choice with numbers.
  • 2025
    Hao Zhang (UCSD Hao AI Lab; co-author of vLLM and DistServe) · Jan 2025 · Course · Core · ~20 h
    Week 8 covers LLM inference and serving (PagedAttention, continuous batching, speculative decoding), with a guest lecture on fast inference. Earlier weeks build up GPUs, collectives and parallelism.
    L7Taught by a vLLM/DistServe co-author, so the serving lectures explain why goodput is the right metric. Skim the earlier weeks if you already know distributed training.
    Lecture recordings are on podcast.ucsd.edu and may require UCSD SSO.
  • 2025
    Chip Huyen (O'Reilly) · Jan 2025 · Book · Intro · ~4 h · paid
    A clear chapter on inference metrics (TTFT, TPOT, throughput, goodput, MFU/MBU), the main optimizations (batching, quantization, speculative decoding, prompt caching, parallelism), and the cost of each.
    L7Baseline vocabulary. Read it if the metric names are not yet automatic, then move to the primary sources.
    Paid book; O'Reilly subscription or purchase.
  • 2025
    Zihao Ye et al. (UW / NVIDIA / CMU), MLSys 2025 · Jan 2025 · Paper · Advanced · ~2 h
    The attention kernel library behind vLLM and SGLang: block-sparse KV formats that unify paged, radix and ragged layouts, JIT-customised attention variants, and load-balanced scheduling that works with CUDA graphs.
    L7Connects KV memory layout choices to kernel efficiency, which you need to defend a block-size or cache-format decision.
  • 2025
    Mrinank Sharma et al. (Anthropic) · Jan 2025 · Paper · Advanced · ~2 h
    Input and streaming output classifiers trained on constitution-generated data, with measured over-refusal rates and about 24% inference overhead. It shows how a safety layer sits in the serving path.
    L7Lets you design the 'API with a safety layer' with real costs: where classifiers run (pre-fill or streaming), latency overhead, and false-positive budgets.
  • 2025
    BentoML · 2025 · Reference · Intro · ~3 h
    A practical handbook: inference metrics, prefill/decode, continuous batching, prefix caching, speculative decoding, disaggregation, and an infrastructure section on autoscaling and cold starts. Each page is short and gives the definition.
    L7Baseline; good for quick lookup. Not deep enough for senior-staff probes.
  • 2025
    Hugging Face · 2025 · Reference · Intro · ~1 h
    Hugging Face's serving server, with short conceptual pages on PagedAttention, streaming, quantization and guidance, and a multi-backend router (TRT-LLM, vLLM).
    L7Baseline only. TGI is now in maintenance mode, which is itself a useful data point on how quickly engines consolidated around vLLM and SGLang.
    Repository README states TGI is in maintenance mode.
  • 2024
    Eldar Kurtic et al. (Neural Magic / Red Hat, IST Austria) · Nov 2024 · Paper · Advanced · ~2 h
    Over 500k evaluations of FP8, INT8 and INT4 schemes on Llama-3.1 across academic and real-world benchmarks, with deployment guidance by hardware and workload (latency- versus throughput-bound).
    L7Gives you the method for 'how do you prove quality hasn't regressed': which evals, which metrics, and what recovery to expect per scheme.
  • 2024
    Ruoyu Qin et al. (Moonshot AI / Tsinghua), FAST 2025 best paper · Jul 2024 · Paper · Advanced · ~3 h
    Kimi's production design: separate prefill and decode clusters around a distributed KV-cache pool in CPU DRAM/SSD over RDMA, a KV-centric global scheduler (Conductor), and early rejection under overload, all driven by real traces.
    L7A frontier-lab production case: lets you design KV storage, P/D disaggregation and overload shedding together, with real hit-rate and SLO numbers.
  • 2024
    Biao Sun et al. (Alibaba), OSDI 2024 · Jun 2024 · Paper · Advanced · ~2 h
    Cluster-level rescheduling: live migration of in-flight requests (and their KV cache) between instances for load balancing, de-fragmentation, priorities and auto-scaling.
    L7Lets you argue the router-level trade-off: placement at admission versus migration later, and what KV migration costs in bandwidth.
  • 2024
    Character.AI · Jun 2024 · Blog post · Advanced · ~0.5 h
    Serving over 20,000 queries per second: MQA plus hybrid local/global attention plus cross-layer KV sharing cut the KV cache by more than 20x, with int8 training and serving and a 95% inter-turn prefix-cache hit rate from sticky routing and an LRU tree cache.
    L7A compact consumer-chat case study: lets you argue model-architecture changes as serving-cost levers, and justify sticky sessions with a hit-rate number.
    Moved from research.character.ai/optimizing-inference/ to blog.character.ai.
  • 2024
    DeepSeek-AI · May 2024 · Paper · Advanced · ~3 h
    Introduces MLA: low-rank joint compression of K and V into a small latent vector per token (plus decoupled RoPE), cutting the KV cache by about 93% compared with MHA while keeping quality, in a 236B MoE.
    L7Lets you compare GQA, MLA, KV quantization and sliding windows as answers to 'it doesn't fit', and say which needs retraining.
  • 2024
    Amey Agrawal et al. (Microsoft Research / Georgia Tech), MLSys 2024 · May 2024 · Paper · Advanced · ~2 h
    A profiling-based simulator that predicts TTFT, TPOT and throughput for any model, hardware, parallelism and scheduler configuration, plus Vidur-Search for finding the cheapest configuration that meets SLOs.
    L7Capacity planning by simulation: lets you explain how you would choose GPU counts and configurations without burning a cluster on trials.
  • 2024
    Zixuan Zhou, Xuefei Ning et al. (Tsinghua / Infinigence-AI) · Apr 2024 · Survey paper · Core · ~3 h
    Classifies efficiency work into data-level, model-level (quantization, sparsity, efficient architectures) and system-level (engines, serving) optimisation, with comparative experiments on quantization and speculative decoding.
    L7Breadth only; use it to place techniques by the bottleneck they target (compute, memory, I/O).
  • 2024
    Amey Agrawal, Nitin Kedia, Ashish Panwar et al. (Microsoft Research India / Georgia Tech), OSDI 2024 · Mar 2024 · Paper · Advanced · ~2.5 h
    Shows that long prefills stall in-flight decodes (generation stalls), and fixes this with chunked prefill plus stall-free batching under a per-iteration token budget. This is now the default in vLLM and SGLang.
    L7Lets you diagnose 'tail latency is terrible when long prompts arrive' and choose between chunked prefill and full disaggregation with a clear criterion.
  • 2024
    Zirui Liu et al. (Rice / Texas A&M / CMU), ICML 2024 · Feb 2024 · Paper · Advanced · ~1.5 h
    Finds that keys have per-channel outliers and values do not, so it quantizes K per-channel and V per-token to 2 bits, giving roughly 2.6x less KV memory and larger batches.
    L7One of the 'compress the cache' options. Pair it with the eviction papers (H2O, SnapKV, StreamingLLM) so you can say when lossy KV is acceptable.
  • 2024
    Ying Sheng, Shiyi Cao, Dacheng Li et al. (Stanford / Berkeley), OSDI 2024 · Jan 2024 · Paper · Advanced · ~2 h
    Defines fairness for LLM serving in terms of weighted input and output tokens, not requests, and gives the Virtual Token Counter scheduler, a work-conserving fair-queueing algorithm with proven bounds. It is the standard reference for multi-tenant fair queueing.
    L7Lets you answer the OpenAI Sora fair-queueing question and the token-cost rate-limiter question with a cost function and a scheduler that has guarantees, instead of only proposing per-tenant queues.
  • 2024
    Yinmin Zhong, Shengyu Liu et al. (PKU / UCSD Hao Zhang), OSDI 2024 · Jan 2024 · Paper · Advanced · ~3 h
    Argues for goodput (requests per second meeting both TTFT and TPOT SLOs) as the serving objective, shows that prefill/decode interference forces over-provisioning, and places prefill and decode instances with separate parallelism configurations.
    L7Gives you the vocabulary and the decision rule (separate SLOs, interference, KV transfer cost) for the disaggregation trade-off, a near-certain senior-staff follow-up.
  • 2024
    Tianle Cai et al. (Princeton / Together AI) · Jan 2024 · Paper · Advanced · ~1.5 h
    Adds extra decoding heads to the target model and verifies a tree of candidate continuations with tree attention, so no separate draft model is needed.
    L7Lets you compare draft-model, multi-head and feature-level (EAGLE) speculation on serving cost and operational complexity.
  • 2024
    Heming Xia et al. (PolyU / PKU / Microsoft), ACL Findings 2024 · Jan 2024 · Survey paper · Core · ~3 h
    A taxonomy of drafters (independent, self-drafting, retrieval) and verification strategies, with Spec-Bench comparisons.
    L7Breadth only; use it to place EAGLE and Medusa and to name alternatives such as n-gram/prompt-lookup drafting.
  • 2023
    Lianmin Zheng, Liangsheng Yin, Ying Sheng et al. (Stanford / Berkeley / LMSYS), NeurIPS 2024 · Dec 2023 · Paper · Advanced · ~3 h
    Introduces RadixAttention: the KV cache is kept in a radix tree with LRU eviction so any shared prefix (system prompts, few-shot examples, multi-turn history) is reused automatically, plus cache-aware scheduling that orders requests by longest prefix match.
    L7Lets you quantify prefix-cache value (hit rate times prefill FLOPs saved) and explain the conflict between cache-aware ordering and fairness.
  • 2023
    Pratyush Patel et al. (UW / Microsoft Azure), ISCA 2024 · Nov 2023 · Paper · Advanced · ~2 h
    Uses Azure production traces to show prefill and decode differ in power, compute and memory needs, then splits them onto separate machine pools (including different GPU generations) for better throughput per dollar and per watt.
    L7Lets you bring hardware heterogeneity and power into a cost-per-token argument, a hyperscale angle mid-level candidates miss.
  • 2023
    Horace He et al. (PyTorch team, Meta) · Nov 2023 · Tutorial · Core · ~3 h
    Takes Llama-7B decode from 25 to about 240 tokens/s in under 1,000 lines of PyTorch using torch.compile, static KV cache, INT8/INT4 weight-only quantization, speculative decoding and tensor parallelism, measuring against the bandwidth roofline at each step.
    L7Hands-on proof of the decode roofline: reproduce the numbers and you can explain each optimisation's speedup from first principles.
  • 2023
    Databricks Mosaic AI · Oct 2023 · Blog post · Core · ~1 h
    Defines TTFT, TPOT, latency and throughput, introduces MBU (model bandwidth utilization) as the decode efficiency metric, and measures the effect of batch size and tensor-parallel degree on latency and cost.
    L7MBU is the number to quote when you say decode is memory-bound. This post shows how to measure it and what good values look like.
  • 2023
    Albert Q. Jiang et al. (Mistral AI) · Oct 2023 · Paper · Core · ~1 h
    Describes sliding-window attention with a fixed-size rolling buffer KV cache (position i mod W) and prefill chunking, the design Mistral interviewers ask about directly.
    L7Baseline; read the short sections on SWA, the rolling buffer and pre-fill chunking, then be ready to discuss how a rolling buffer interacts with paging and prefix caching.
  • 2023
    Tri Dao, Daniel Haziza, Francisco Massa, Grigory Sizov (Stanford CRFM / Meta) · Oct 2023 · Blog post · Core · ~0.5 h
    Explains why FlashAttention underuses the GPU during decode (batch × heads is small), and splits the KV sequence across thread blocks with a final reduction, up to 8x faster for long contexts.
    L7Answers 'why does decode slow down as context grows': per-step attention reads grow linearly with context, and Flash-Decoding plus paged KV kernels are the fix.
  • 2023
    Woosuk Kwon, Zhuohan Li, Siyuan Zhuang et al. (UC Berkeley), SOSP 2023 · Sep 2023 · Paper · Advanced · ~3 h
    Shows that contiguous KV allocation wastes 60–80% of memory through fragmentation and over-reservation, and fixes it with OS-style block tables, copy-on-write sharing for parallel sampling and beam search, and preemption by swapping or recomputation.
    L7Lets you answer 'hundreds of requests with different context lengths, how do you manage KV memory' with block size, preemption policy and their trade-offs, which is the core KV interview probe.
  • 2023
    Cade Daniel et al. (Anyscale) · Jun 2023 · Blog post · Intro · ~1 h
    The standard explainer of static, dynamic and continuous batching, with throughput and latency benchmarks across vLLM, TGI and Ray Serve.
    L7Baseline, but its diagrams are the clearest way to explain the idea in 60 seconds before going deeper.
  • 2023
    Ji Lin, Jiaming Tang et al. (MIT HAN Lab), MLSys 2024 best paper · Jun 2023 · Paper · Advanced · ~1.5 h
    Protects the roughly 1% of salient weight channels (chosen by activation magnitude) through per-channel scaling, giving robust INT4 weight-only quantization without backprop.
    L7Lets you compare AWQ and GPTQ for a customer's hardware choice: calibration cost, generalisation and kernel availability.
  • 2023
    Joshua Ainslie et al. (Google Research) · May 2023 · Paper · Core · ~1 h
    Grouped-query attention: share K/V heads across groups of query heads, cutting KV-cache size by n_heads/n_kv_heads (8x for Llama-70B) at little quality cost, with uptraining from MHA checkpoints.
    L7Baseline, but you must put the GQA factor into every KV-cache estimate. Getting it wrong is a common error on '70B at 128k' questions.
  • 2023
    Lilian Weng · Jan 2023 · Blog post · Core · ~2 h
    A dense literature map of distillation, quantization (LLM.int8, SmoothQuant, GPTQ), pruning/sparsity, MoE and architecture changes for inference.
    L7Older but well organised. Use it to place quantization and sparsity methods on a map, and skip the parts that 2024–26 serving work has made obsolete.
  • 2022
    Reiner Pope, Sholto Douglas, Aakanksha Chowdhery et al. (Google) · Nov 2022 · Paper · Advanced · ~4 h
    Google's PaLM inference paper. It gives an analytical model for choosing partitioning (2D weight-stationary, batch-sharded attention) to trade latency against cost per token at 500B scale, with multi-query attention as the KV-cache lever.
    L7The template for answering 'how would you shard a 500B model for low-latency versus high-throughput serving' with a cost model rather than by guessing.
  • 2022
    Yaniv Leviathan, Matan Kalman, Yossi Matias (Google), ICML 2023 · Nov 2022 · Paper · Core · ~1.5 h
    The original speculative decoding paper: a draft model proposes tokens and the target verifies them in one forward pass, with a rejection-sampling rule that keeps the output distribution exact. It gives an expected speedup as a function of acceptance rate.
    L7Lets you derive when speculation helps (memory-bound decode, high acceptance) and when it hurts (large batches, compute-bound), which is the senior-staff caveat.
  • 2022
    Guangxuan Xiao, Ji Lin et al. (MIT / NVIDIA), ICML 2023 · Nov 2022 · Paper · Advanced · ~1.5 h
    Moves activation outliers into the weights with a per-channel scaling factor so both weights and activations can be INT8 (W8A8), which speeds up compute-bound prefill.
    L7Lets you explain 'what breaks at each step down': activation outliers are why W8A8 and FP8 activations need special handling.
  • 2022
    Elias Frantar, Saleh Ashkboos, Torsten Hoefler, Dan Alistarh (IST Austria / ETH), ICLR 2023 · Oct 2022 · Paper · Advanced · ~2 h
    Second-order (Hessian-based) one-shot weight quantization to 3–4 bits per layer using a small calibration set; the basis of most INT4 weight-only checkpoints.
    L7Lets you explain why weight-only INT4 speeds up memory-bound decode but not prefill, and what the calibration data does.
  • 2022
    Paulius Micikevicius et al. (NVIDIA / Arm / Intel) · Sep 2022 · Paper · Core · ~1 h
    Defines the E4M3 and E5M2 FP8 formats and shows they match 16-bit quality for training and inference with per-tensor scaling. This is the format behind H100/B200 FP8 serving.
    L7Baseline; read it to understand the formats before thinking about FP8 serving and its scaling-factor failure modes.
  • 2022
    Gyeong-In Yu et al. (Seoul National Univ. / FriendliAI), OSDI 2022 · Jul 2022 · Paper · Advanced · ~2.5 h
    The origin of iteration-level scheduling (continuous batching) and selective batching: the scheduler re-forms the batch at every decode step instead of waiting for the slowest sequence.
    L7Lets you explain why static batching wastes GPU time and what continuous batching changes in the scheduler loop, which is what the Fellows OA and xAI coding rounds ask you to implement.
  • 2022
    Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, Christopher Ré (Stanford) · May 2022 · Paper · Core · ~2 h
    Tiles attention through SRAM with an online softmax so the N×N matrix never reaches HBM. It is the IO-aware argument behind every modern attention kernel. FA2 and FA3 add parallelism, Hopper asynchrony and FP8; FA4 targets Blackwell.
    L7Know the IO argument and what each version changed. Interviewers rarely go deeper unless you claim kernel expertise.
  • 2022
    kipply (Carol Chen) · Mar 2022 · Blog post · Core · ~1.5 h
    The classic short derivation of KV-cache size (2·layers·d_model·bytes per token), memory-bandwidth-bound latency, the FLOPs-to-bytes ratio, and when batching becomes compute-bound, worked through for a 52B model.
    L7Older but canonical. Learn its back-of-envelope method until you can size a 70B GQA model at 32k context in under two minutes; the candidates who can't usually stall on this.
    2022, before GQA/MLA were standard: redo its numbers with n_kv_heads in place of n_heads.
  • 2022
    Horace He · Mar 2022 · Blog post · Intro · ~1 h
    Explains compute-bound, memory-bandwidth-bound and overhead-bound regimes using clear GPU examples. It is the intuition the roofline model relies on.
    L7Baseline; read it if 'memory-bound' is not yet intuitive. The overhead-bound section explains why CUDA graphs matter for small-batch decode.
Not found or not verified. Not found or not verified: (1) a 2025–26 Berkeley CS294 ML-systems course page with inference lectures (old ucbsky site is 404; only Gonzalez's teaching page exists), and any UW course on efficient LLM inference; (2) a ByteByteGo article specifically on LLM serving design; (3) lecture videos for CMU 11-868 Spring 2026 (slides only) and public recordings for UCSD CSE 234 (podcast.ucsd.edu needs SSO); (4) a full Hello Interview inference-specific breakdown (only 'Design ChatGPT', which may be Premium, plus a community question); (5) the 2026 FlashAttention-4 paper and several 2026 vLLM/SGLang posts post-date my training and were checked by title and summary only; (6) Chip Huyen ch. 9 is paywalled and O'Reilly blocks curl (403). Every question group is covered; the weakest coverage is inference-q45 (real-time social firehose search) and inference-q50 (100k-rps token service), where no interview-specific write-up exists and the coverage is RAGO plus general fleet-design sources. Resource count (95) is above the 35–60 guide because ADDENDUM 2 required covering all 65 question groups; picks and stages show the priority path. Links checked 27 Oct 2026.