Appendix C Checklists for System Design Answers
C.1 The 10-Minute LLM System Design Checklist
This checklist operationalizes the repeatable design framework from chapter 2 for a 45-60 minute interview slot. Each item should produce a concrete number or a named decision. Vague answers do not pass. Skip Phase 3 for purely serving-focused prompts; skip Phase 4 for purely training-focused ones.
Phase 1 - Clarify requirements (2 min)
-
State the serving SLO: time-to-first-token, inter-token latency, and token throughput (see subsection 2.1.1).
-
State the compute budget: number of GPUs, GPU-hours available, and cost ceiling per query.
-
Confirm expected traffic shape: median and peak QPS, context-length distribution.
-
Confirm quality target: benchmark name and minimum acceptable score.
Phase 2 - Size the model (2 min)
-
State parameter count and justify it (capability target, inference cost, or Chinchilla ratio; see chapter 14).
-
Compute inference memory: bytes (bf16) or bytes (int4) (see section A.1).
-
State whether the model fits on one node; if not, name the split strategy before proceeding.
-
Confirm GQA KV-head count ( for 7 B models) and its impact on KV cache budget (see subsection 16.1.1).
Phase 3 - Training system design (3 min)
-
Compute total training FLOPs: ; divide by cluster throughput to get projected wall-clock time (see section A.2).
-
State the parallelism layout: tensor-parallel degree first (up to the NVLink domain, on H100 nodes), then pipeline or ZeRO Stage 3/FSDP across nodes (see subsection 12.4.1).
-
State the ZeRO stage: Stage 1 is essentially free; escalate to Stage 3 only when per-GPU memory exceeds 80% of HBM (see subsection 12.1.2).
-
State global batch size relative to the critical batch size and confirm the learning rate schedule terminates correctly (see subsection 14.2.2).
-
State data: total token count, primary sources, and quality filter choice (see chapter 20 and chapter 21).
Phase 4 - Serving system design (2 min)
-
Compute KV cache per request at maximum context and the crossover batch size (see section A.3).
-
State batching strategy: continuous batching with paged attention for variable-length traffic (see subsection 18.2.1).
-
Name any compression applied (int8 weights, int4 AWQ, int8 KV cache) and the expected quality impact (see chapter 19).
-
State the autoscaling trigger: GPU KV-cache utilization or queue depth above threshold.
Phase 5 - Trade-offs and failure modes (1 min)
-
Name the dominant bottleneck: compute, memory, bandwidth, or inter-GPU communication (see subsection 2.2.1).
-
Name the first metric you would instrument: MFU for a training system, TTFT for a serving system.
-
Name one design decision you would revisit if the bottleneck shifts.
When to escalate
-
The model does not fit on the stated hardware without a coherent split plan: size memory correctly before proposing any architecture.
-
The stated batch size exceeds the critical batch size by more than : the extra parallelism buys nothing; reallocate compute to model scale or data volume.
-
TTFT SLO is under 500 ms for a 70 B model with no quantization or speculative decoding: flag the constraint explicitly and propose a mitigation.
-
Token count is below : the run is undertrained; quality claims need explicit justification.
C.2 The Pre-Training Run Readiness Checklist
Run this checklist before submitting a large pre-training job. It operationalizes chapter 12, chapter 13, chapter 14, chapter 20, and chapter 21. Items marked (BLOCK) will cause an incorrect or wasted run if skipped.
Data and tokenization
-
(BLOCK) Confirm the tokenizer vocabulary matches the one used in any continued pre-training or fine-tuning checkpoints.
-
(BLOCK) Confirm exact deduplication (URL or document hash) and near-deduplication (MinHash/LSH) have both been applied (see section 21.3).
-
Confirm quality filter is in place: at minimum, language identification, rule-based heuristics (punctuation, word ratio, length), and a fastText or model-based scorer (see subsection 21.1.2).
-
Confirm total token count. Chinchilla-optimal minimum is ; production runs now target to amortize inference cost (see subsection 14.2.1).
-
(BLOCK) Verify no evaluation benchmark contamination in the training corpus (see section 25.1).
-
Confirm multi-epoch token repetition is bounded: diminishing returns accelerate past 4 epochs of any single source.
Memory and parallelism layout
-
Compute per-GPU training memory: DP TP PP bytes for weights, gradients, and AdamW state, plus activation memory for the local micro-batch (see section A.1).
-
(BLOCK) Confirm per-GPU VRAM consumption is below 85% of device HBM capacity.
-
Set tensor-parallel (TP) degree to the count of NVLink-connected GPUs per node ( on H100 DGX nodes); increasing TP beyond one node incurs a large all-reduce penalty (see subsection 12.2.1).
-
Start with ZeRO Stage 1 (optimizer-state sharding); escalate to Stage 3/FSDP only if per-GPU memory still exceeds 80% of HBM after applying TP (see subsection 12.1.2).
-
If pipeline parallelism is needed, set the micro-batch count so that the bubble ratio where is the pipeline depth (see subsection 12.2.2).
-
For long-context runs (k): confirm context parallelism or ring-attention is configured to shard activation memory across the sequence dimension (see subsection 12.3.2).
Compute budget and batch size
-
Compute total training FLOPs: ; divide by cluster FLOP/s at target MFU to get projected wall-clock time (see section A.2).
-
Set global batch size (critical batch size). falls as target loss decreases; fit a scaling law or use as a rough starting point (see subsection 13.2.2).
-
(BLOCK) Fully specify the learning rate schedule, including the termination point. Cosine schedules cannot be truncated early without restarting from scratch. For a WSD schedule, reserve 10-20% of total steps for the decay phase (see subsection 14.2.2).
-
If using P, confirm per-layer learning rates are scaled by width and initialization variance by fanin (see subsection 14.3.1).
Monitoring and checkpointing
-
Confirm MFU instrumentation is in place; target for a well-tuned layout, for runs with significant pipeline or ZeRO Stage 3 overhead.
-
Log gradient norm every step. A norm within the first 500 steps signals instability before it manifests in the loss curve.
-
Set checkpoint frequency so that a single-node failure loses at most 30 minutes of compute.
-
(BLOCK) Run a 1,000-step diagnostic at full cluster size before committing the full job. Verify MFU, loss trajectory, and gradient norm are all as expected.
When to escalate
-
Estimated per-GPU memory exceeds device HBM at any proposed parallelism layout: do not start; revise the TP/PP/ZeRO configuration.
-
MFU is below 0.15 in the first 100 steps: communication is dominating compute; inspect NCCL and check for topology mismatches before continuing.
-
Loss diverges or shows spikes within the first 2,000 steps: check learning rate warm-up, gradient clipping threshold, and data pipeline integrity.
-
Projected wall-clock time exceeds 90 days at current MFU and cluster size: reconsider model scale or invest in additional cluster capacity before launching.
-
Token count is below : the run is severely undertrained; the resulting checkpoint will underperform Chinchilla-optimal models of the same size.
C.3 The Inference Deployment Readiness Checklist
Run this checklist before promoting an inference endpoint to production traffic. It operationalizes chapter 15, chapter 16, chapter 18, and chapter 19. Use the KV-cache formulas in section A.3 for all sizing steps.
Memory budget
-
Compute weight memory: bytes (bf16); bytes (int4 AWQ/GPTQ).
-
Compute KV cache per sequence at maximum context : bytes (see section A.3).
-
(BLOCK) Verify VRAM at the target maximum batch size.
-
Confirm GQA is enabled with for models 7 B; this shrinks by with accuracy loss at scale (see subsection 16.1.1).
-
If KV cache memory still dominates at target batch size: evaluate int8 KV quantization (halves , doubles ) or MLA (see subsection 16.1.2).
-
Enable paged attention to eliminate KV cache memory fragmentation; reduces effective VRAM waste by 20-40% under variable-length workloads (see subsection 18.2.2).
Latency SLOs and batching
-
State TTFT and ITL SLO numbers explicitly before configuration (e.g., TTFT ms, ITL ms) (see subsection 15.2.1).
-
Compute crossover batch size ; throughput gains are superlinear below and sublinear above it.
-
Compute decode step time at target batch : BW. Confirm ITL SLO.
-
Use continuous batching for variable-length request streams; it prevents the head-of-line blocking that plagues static batching at mixed context lengths (see subsection 18.2.1).
-
If TTFT dominates the latency budget and prefill is compute-bound, consider prefill/decode disaggregation or speculative decoding with a small draft model (see subsection 18.1.1).
Quantization and compression
-
State the quantization scheme and its expected accuracy impact before deploying: int8 weights (LLM.int8) quality loss; int4 (AWQ, GPTQ) -3% (see section 19.1).
-
(BLOCK) Benchmark token throughput and task accuracy before and after quantization on the deployment hardware; do not infer from published results on different hardware.
-
Do not quantize the KV cache without task-specific validation; numerical sensitivity varies significantly by domain.
Serving infrastructure and autoscaling
-
Provision replica count so the fleet sustains peak QPS with at least headroom under a single-replica failure.
-
Set autoscaling trigger on KV-cache utilization () and request queue depth ( requests at P95); do not scale on CPU metrics alone.
-
For long-context deployments: confirm context length limits are enforced server-side to prevent KV cache overflows that would silently OOM single requests.
Observability
-
Instrument all of: TTFT, ITL, token throughput, KV-cache utilization, GPU memory usage, and request queue depth.
-
Log per-request context length and output length; these are the primary drivers of KV cache pressure and are needed to diagnose latency tail events.
-
Alert when ITL exceeds the P50 value for more than 60 seconds: this indicates pathological batch composition or KV cache thrashing.
When to escalate
-
is below 8 at the target context length: the model is too large for the available hardware at that context; apply quantization or reduce the maximum context limit.
-
TTFT exceeds the SLO at all tested batch sizes: evaluate prefill/decode disaggregation or speculative decoding before adding hardware.
-
KV-cache utilization stays above 90% during normal traffic: add replicas or enforce a tighter maximum concurrency cap.
-
int4 quantization degrades the primary task metric by more than 5% relative: revert to int8 and add hardware instead of accepting the quality loss.
-
Any GPU OOM event during normal deployment: tighten -the sizing formula assumes uniform sequence lengths, but real workloads have heavy-tailed context distributions.