Lesson deck

Inference engineering: interview drills flashcards

Reviewing needs JavaScript. You can read every card in the list below.

Loading your cards...

Back to the lesson13 cards in this deck

Read all 13 cards as a list
  1. Front
    Give the 90-second answer: why is decode memory-bound?
    Back
    Each step reads all weights for about 2 operations each, so intensity is near the batch size (for BF16), far below the ridge (about 295 on an H100). Batching raises intensity almost for free.
  2. Front
    What limits concurrency per GPU?
    Back
    The KV pool left after weights and overhead, divided by bytes per sequence. 2 × layers × KV heads × head dim × bytes per token, times tokens per sequence.
  3. Front
    Which levers move TTFT, and which move ITL?
    Back
    TTFT (queue plus prefill): prefix caching, chunked prefill, shorter prompts, capacity. ITL (decode step): fewer bytes (quantization), smaller batch or context, speculative decoding, parallelism.
  4. Front
    Batch-1 decode bound, worked.
    Back
    Step ≥ weight bytes ÷ aggregate bandwidth. 14B in 8-bit on 1.5 TB/s: 14 GB ÷ 1.5 TB/s = 9.3 ms, about 107 tokens per second. Ignores cache, communication and overhead.
  5. Front
    KV bytes and concurrency, worked.
    Back
    40 layers, 8 KV heads, 128, FP8: 81,920 bytes per token. A 4,096-token sequence is about 0.34 GB, so a 30 GB pool holds about 89.
  6. Front
    Speculative speedup, worked.
    Back
    α = 0.85, γ = 5, c = 0.08: expected tokens (1 − 0.85⁶)/0.15 = 4.15; speedup 4.15 ÷ 1.4 = about 2.97.
  7. Front
    Cost and replicas, worked.
    Back
    $2.80 per hour, 2,200 tokens/s at 50 percent: $0.71 per million. 18 req/s × 300 tokens = 5,400 tokens/s ÷ (1,500 × 0.65) = 5.5, so 6 plus 1 spare.
  8. Front
    What are the seven parts of a platform design answer?
    Back
    Clarify targets, estimate (Little's law, weights, cache), choose the stack, architecture, evaluation and rollout, failure modes and operations, cost and trade-offs.
  9. Front
    What marks a strong design answer?
    Back
    Numbers with assumptions, interactive and batch separated, cache arithmetic driving concurrency, autoscaling on queue or cache, a cold-start plan, a quality gate for quantization, failure modes raised unprompted.
  10. Front
    What do you do when the interviewer changes a constraint?
    Back
    Re-cost the design aloud: say what changes in the arithmetic, what you would add or give up, and what quality or operational risk you accept.
  11. Front
    Why does a reasoning model change serving cost?
    Back
    Hidden reasoning tokens are generated like output, so decode time, cache per request and cost all grow. Cap, budget or route by difficulty.
  12. Front
    What can explain a production TTFT four times worse than the benchmark?
    Back
    Fixed short prompts, closed-loop clients and a hot prefix cache in the benchmark. Replay real traces with open-loop arrivals and control the cache.
  13. Front
    Why scope KV-cache quantization by context length?
    Back
    Its accuracy risk grows with context. Evaluate by input length and keep 16-bit cache where long inputs matter.