50,000 Output Tokens/sec
Sustained peak request volume during high-traffic events.
Design a hypothetical large language model (LLM) service. The scale and latency figures below are interview targets, not measured ClawPad or vLLM results.
Illustrative interview targets only. Validate feasibility for the selected model, hardware, prompt lengths and offered request rate; no benchmark is reported here.
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.
Hypothetical standard full-attention cache math, not a specification for every 70B, Llama or DeepSeek model. A key/value (KV) cache stores each layer's key and value vectors for tokens already processed.
Count KV heads, not query heads. Grouped-query attention lets multiple query heads share KV heads. Both examples use the stated KV-head count, a two-byte FP16 cache dtype (storage format), and cached prompt plus generated tokens. Sliding-window, compressed and other cache layouts need their own calculation.
GB means 1,000,000,000 bytes; GiB means 1,073,741,824 bytes. The assumed 400 GiB usable cache budget is after weights, runtime and other reserves. It is not a measured GPU-node capacity. The ceiling assumes independent sequences without prefix sharing.
A memory ceiling does not establish throughput, latency or admission capacity. Account for sharding, replication, per-device placement, block rounding and remaining runtime overhead before admitting requests.
To test the targets, record model/configuration and cache dtype, prompt/generated-length distribution, offered requests/sec, achieved output tokens/sec, TTFT and ITL percentiles, queued/rejected requests and cache occupancy. No serving benchmark was run for this example.
| Dimension | Calculation Formula | Estimated Result |
|---|---|---|
| Ideal model weights only | 70,000,000,000 parameters × 2 bytes/parameter (FP16/BF16) | 140 GB before runtime, activations, cache and other overhead. This is not a GPU-count recommendation. |
| One sequence, 64 KV heads | 2 (key + value) × 80 layers × 64 KV heads × 128 values/head × 4,096 cached tokens × 2 bytes/value | 10,737,418,240 bytes = 10 GiB = 10.73741824 GB |
| Comparison, 8 KV heads | 2 (key + value) × 80 layers × 8 KV heads × 128 values/head × 4,096 cached tokens × 2 bytes/value | 1,342,177,280 bytes = 1.25 GiB = 1.34217728 GB |
| Memory ceiling at 4,096 tokens | floor(400 GiB usable cache ÷ 10 GiB/sequence) | 40 whole sequences, each at 4,096 prompt + generated tokens |
| Memory ceiling at 8,192 tokens | 8,192 / 4,096 × 10 GiB = 20 GiB/sequence; floor(400 GiB usable cache ÷ 20 GiB/sequence) | 20 whole sequences at twice the cached context |
Reviewed October 21, 2026. Calculations use the hypothetical inputs above; source results are not benchmarks of this design.
How requests navigate ingress gateways, application logic, caching, and persistence.
Prefer a node holding the same eligible token prefix when cache state and queue length justify it. Preserve isolation between requests and tenants when reusing cached state.
Group active generation sequences into iteration-level batches; allocate non-contiguous physical GPU memory pages.
Partition model computation across GPUs when needed. Communication adds overhead; profile the chosen interconnect and topology with the actual model and batch sizes before making latency promises.
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.
Illustrative routing index, not the KV tensors themselves. Reuse depends on repeated exact eligible prefixes, routing and eviction; measure the hit rate for the workload.
ClickHouse analytics table for tracking model serving costs and throughput SLAs.
How to defend engineering compromises when challenged by interviewers.
Rationale: A static batch can leave completed request slots unused while longer requests finish. Continuous batching lets finished requests leave and waiting requests join between iterations. Measure throughput and latency with the chosen model, hardware and request-length distribution; this mechanism has no fixed percentage gain.
Rationale: Reserving maximum-length contiguous caches can leave memory unused. Block-based allocation can reduce unused allocation and enable sharing, but block rounding and shared-block lifetimes still affect usable memory. Measure occupancy and fragmentation for the configured workload; no universal waste percentage or concurrency multiplier follows.
Key interview questions and conceptual defenses.
No. In this hypothetical full-attention example, 4,096 cached prompt plus generated tokens use 10 GiB per sequence. An assumed 400 GiB cache budget fits 40 whole sequences, or 20 at 8,192 tokens. That is a memory ceiling, not a throughput, latency or admission guarantee. Reserve overhead, account for the actual KV-head configuration and cache placement, and benchmark your model and workload before setting request limits.
In a draft-model approach, a smaller model proposes candidate tokens and the target model verifies them, accepting a valid prefix. Not all proposed tokens will be accepted. Any speedup depends on acceptance rate, drafting and verification cost, model, traffic, hardware and sampling settings. Compare measured latency and throughput against ordinary decoding for the same workload.
Tensor parallelism partitions model computation and requires communication among GPUs. The cost depends on the parallel strategy, batch size and interconnect topology. Profile communication alongside compute on the chosen setup; a particular link name or bandwidth does not establish end-to-end latency.