50,000 Output Tokens/sec
Sustained peak request volume during high-traffic events.
Serve generative Large Language Models with continuous batching, PagedAttention KV cache memory management, and speculative decoding.
Target production parameters expected in a senior or staff interview round.
Sustained peak request volume during high-traffic events.
Daily active users generating read and write operations.
Projected data ingestion and replication storage capacity.
Strict end-to-end percentile latency SLA constraint.
Establish clear problem boundaries before proposing architectural components.
Step-by-step arithmetic conversions for QPS, storage, and bandwidth.
| Dimension | Calculation Formula | Estimated Result |
|---|---|---|
| Model Weights GPU VRAM Footprint | 70 Billion parameters * 2 bytes (FP16/BF16) = 140 GB (or 70 GB in INT8/FP8) | Requires 2x 80GB NVIDIA H100 GPUs minimum for weights alone |
| KV Cache Memory per Request | 2 * layers(80) * heads(64) * dim(128) * tokens(4096) * 2 bytes (FP16) | 1.07 GB VRAM per active 4k context sequence |
| Concurrent Concurrency on 8x H100 Node | (640 GB total VRAM - 140 GB weights) / 1.07 GB per sequence | ~467 concurrent streaming requests per 8-GPU node |
How requests navigate ingress gateways, application logic, caching, and persistence.
Inspect user system prompt hash and route requests to the GPU node that already holds cached KV prefixes.
Group active generation sequences into iteration-level batches; allocate non-contiguous physical GPU memory pages.
Split matrix multiplications across 8 GPUs simultaneously via NVLink (900 GB/s) for sub-20ms forward passes.
Evaluate prompt safety, enforce customer token spend rate limits, and record TTFT/ITL latency percentiles.
Entity models, indexing, and primary key partitioning.
PagedAttention memory mapping table maintained in CPU host memory and synchronized with CUDA kernels.
Redis cluster index enabling router to achieve 80%+ cache hits on common developer system prompts.
ClickHouse analytics table for tracking model serving costs and throughput SLAs.
How to defend engineering compromises when challenged by interviewers.
Rationale: Static batching causes severe GPU idle starvation because short requests wait for long requests to finish. Continuous batching inserts new requests on every token step, increasing throughput by 400%.
Rationale: Pre-allocating contiguous memory wastes 60-80% of GPU VRAM due to internal and external fragmentation. PagedAttention mirrors OS virtual memory, reducing memory waste to under 4% and doubling concurrency.
Key interview questions and conceptual defenses.
A tiny draft model (e.g. 1B params) rapidly generates 5 candidate tokens at high speed. The large 70B model verifies all 5 tokens in a single parallel forward pass, achieving 2x-3x faster generation.
Tensor parallelism splits attention matrix multiplications across GPUs. Between layers, GPUs must exchange partial activations via `AllReduce`. Without high-speed NVLink (900 GB/s), network transfer bottlenecks the entire pipeline.