The Eight ML-Infrastructure Designs

The design round that a general SWE cannot fake. Eight systems worked end to end — nine sections each, then attacked by a hostile staff-level interviewer, then revised. Six critiques per design, each naming a real defect in the first draft.

These are Track C's designs with the physics changed. The primitives are the same — fencing, floors, leases, segments, level-triggered reconciliation — but the binding constraint is HBM bandwidth and KV bytes, not CPU or disk. That substitution is the whole round.


Table of Contents


How to Use These

Same loop as Track C's twelve, with one addition that is specific to this round:

  1. Read only the prompt. Stop.
  2. Do the arithmetic first, before any diagram — 5 minutes with ../gpu_math.py. In this round the numbers select the architecture, and every one of these eight designs is decided by a calculation that fits on an index card.
  3. Write your own, 45 minutes, against the template.
  4. Score yourself against RUBRIC.md before reading further.
  5. Read sections 1–10, then the critique — try to answer each one first — then the revision.
  6. Everything you missed goes into ../../../review/ at 1 day.

The arithmetic step is not optional and it is the differentiator. Across all eight, the most common defect the critiques found was a claim that a two-line calculation disproves. If you write these designs without numbers you will produce a plausible architecture that a staff interviewer dismantles in ninety seconds.


The Eight

#DesignThe two hard partsWhy it is in the set
m01Multi-tenant LLM API platformfairness on a memory-bound resource · admission at the preemption cliffThe canonical AI-lab design round. Do this first
m02KV cache / prefix cache tierwhich storage tiers beat recompute · cache-key correctnessThe cleanest arithmetic in the set; one derivation deletes a component
m03GPU cluster schedulertopology-aware placement · gang scheduling without deadlockTraining and inference on one fleet; where the money is
m04Pretraining data pipelineglobal dedup at 15B docs · deterministic order and exact resumptionCorrectness at petabyte scale, with almost no compute
m05Evaluation harnessreproducibility in a non-deterministic stack · when a delta is realThe statistics round hiding inside a systems round
m06Retrieval-augmented servingwhere the latency budget actually goes · freshness vs index costRetrieval and serving; the tokens are the coupling
m07Multi-adapter (LoRA) servingbatching heterogeneous adapters · the cold-start long tailA serving constraint on a research parameter
m08Training fault tolerancethe goodput equation · failures that do not announce themselves233 interruptions in 30 days, and what to do about them

The Numbers That Decide Each Design

One calculation per design decides its architecture. If you can reproduce these eight, you can open any of these rounds with the sentence that reframes the question.

DesignThe calculationWhat it decides
m01A 128k-context request holds 40 GiB of KV = 23% of a 4×H100 replicaFairness must be in KV·seconds, not requests. A request limiter is off by 735×
m02Break-even BW = kv_bytes_per_token × FLOPS / 2N = 9.3 GB/s at TP4, independent of prefix lengthDRAM and RDMA qualify; NVMe at 7 GB/s is slower than recomputing. No disk tier
m03At 50% cluster free, expected fully-free 8-GPU nodes ≈ 0.5Fragmentation, not capacity, is the constraint. Best-fit + shape segregation
m04All-pairs dedup = (15e9)²/2 = 1.1e20 comparisons = 3.5M core-yearsWrong algorithm, not slow one. MinHash + LSH, threshold (1/b)^(1/r)
m05500-item benchmark: SE = 1.72 pp → resolves only differences > 6.7 ppMost reported improvements are noise. Paired testing recovers 2.4× for free
m06Retrieval 85 ms; prefilling what it returned 207 msOptimize k and the reranker, not the index. Every chunk costs 17.8 ms + 0.15 GiB
m07Distinct adapters at batch 128: +6% (attn r=8) vs +151% (all-modules r=64)A research hyperparameter moves serving cost 25×. Constrain it at registration
m08Restart term R/M = 5.4% of the run at 16,384 GPUs, invariant in the checkpoint intervalEveryone tunes the interval; the leverage is in restart time

Say the number, then the consequence. That ordering — measurement before architecture — is what the rubric's highest-weighted line is actually measuring.


What Carries Over From Track C, and What Does Not

Carries over unchanged. These are the same problems in different clothes, and recognizing them is worth real credit:

Track C primitiveWhere it reappears
Reserved floors over strict prioritym01 (enterprise tier) · m03 (quota) · m07 (tail adapter slots) — and d05, d12
Fencing tokens / epochsm03 R5 (node boot epoch) · m08 (leader supervisor)
Leases with heartbeatsm01 R4 (in-flight KV accounting) · m03 (worker liveness)
Immutable segments + tombstones + compactionm06 (vector index) — identical to d07, d09
Session guaranteesm06 §8 (delete visibility as an ACL boundary)
Level-triggered reconciliationm03 (allocations) — same as d12
Estimate-then-reconcilem01 §6 (token budgets) — same as d03
Cache admission (TinyLFU) over pure LRUm02 §8 · m07 §7

Does not carry over — and getting these wrong is the tell that you learned distributed systems and assumed it transferred:

Instinct from Track CWhy it fails here
"Utilization is the load signal"nvidia-smi reads ~100% during a batch-1 decode using 1/295th of the machine. Use KV occupancy
"Add a disk cache tier"m02: below ~9 GB/s, recompute is faster. Storage hierarchies invert when the cached object is enormous
"Degradation is gradual near saturation"KV exhaustion causes preemption + full prefill recompute, a positive feedback loop. It is a cliff, not a slope
"Scale out to fix latency"Decode is bandwidth-bound; more replicas add throughput, not speed. And TP across nodes costs +52%
"Retry the failed request"An in-flight generation's state is the KV cache. There is nothing to retry onto
"More data / more items is the fix"m05: it is, but the arithmetic says how much — and paired testing is 2.4× cheaper

The unifying sentence: in Track C the scarce resource is coordination; in Track D it is bandwidth. Every mechanism that assumed cheap memory movement has to be re-derived.


Cross-Cutting Patterns

Specific to this track — the ideas that recur across the eight and nowhere in Track C:

PatternWhere it appears
KV cache is the capacity unitm01 (fairness) · m02 (the cache is the resource) · m06 (retrieval inflates it 7.2×) · m07 (adapters compete with it)
Prefill vs decode are different workloadsm01 (chunked prefill) · m06 (the 207 ms) · m07 (prefill reads adapters per chunk)
The break-even calculationm02 (fetch vs recompute) · m03 (preempt vs wait) · m08 (checkpoint vs lose work)
A research parameter with a serving costm07 (rank, target modules) · m04 (vocab size doubles the corpus) · m02 (MLA changes every tier)
Cache made of the resource it caches form02 (KV cache vs in-flight KV) · m07 (adapters vs KV)
Affinity is required, not an optimizationm02 R2 · m06 (per-tenant index) · m07 R2 — a cache sized against the global working set is always wrong
Measured signal, not target signalm01 R1 (measured TPOT) · m08 (measured MTBF drives the interval) · m05 (measured seed variance)
Silent wrongness over loud failurem02 §7 (cache keys) · m05 §6 (batch composition) · m07 §8 (adapter/base mismatch) · m08 §7 (SDC)
The head and the tail want different architecturesm07 (merge the top 50, page the rest) · m06 (big tenants shard, small ones brute-force) · m05 (tiered evals)

The last one is worth internalizing. Four of the eight designs conclude that an 80/20 traffic distribution should be served by two mechanisms, not one stretched across both. That is a generalizable move and it is rarely the first instinct.


What the Critiques Found

Forty-eight critiques across eight designs. The clusters, and what they say about how these designs fail:

Defect classCountExample
Arithmetic never done9m07: host DRAM budget assumed 500 GB; m02's KV tier already claims 300 of it
A control loop with the wrong sign4m01: KV estimate uses target TPOT, so it under-estimates exactly when the fleet is loaded
A mechanism that needs the thing it provides5m06: defragmentation needs free capacity; it runs because there is none
A guarantee that is not the one sold4m01: enterprise bought latency; the floor delivered admission
An identity that can be reused3m03: a replacement node with the same hostname inherits allocations
A policy the caller must declare3m02: caller-supplied cache policy could not classify the highest-value case
A threshold on an unsized resource4m08: pinning guard at 50%, on a cache never sized with Little's law
A statistical claim without an interval3m05: seed variance conflated with engine variance
A rule with no path to yes2m07: rejecting rank-64 adapters that a customer genuinely needs
Alerting that will be muted2m08: paging on normal hardware failure at MTBF 3.1 h

The two most instructive classes are new relative to Track C:

  • Control loops with the wrong sign (m01 R1, m08 R2). A controller fed a target instead of a measurement behaves correctly in the healthy case and backwards in the loaded one — which is the only case that matters. Check every controller's behaviour at the point where target and measurement diverge.
  • Thresholds on unsized resources (m08 R3, m07 R3). A threshold chosen before the resource was sized with Little's law either never fires or always fires. Size, then threshold.

And the perennial: arithmetic never done is still the largest single class, at 9 of 48 — down from 10 of 12 in Track C, which is what happens when the design opens with §2 instead of §5.


The Order to Work Them

Mandatory, in this order:

  1. m01 — the canonical round. Everything else references its numbers.
  2. m02 — the cleanest derivation in the program. Short, and it teaches the habit the whole track depends on.
  3. m08 — the training side, and the goodput equation is the most portable idea here.

Then by leverage:

  1. m03 — the fragmentation number is unforgettable and widely useful
  2. m06 — the most commonly asked in product-facing AI roles
  3. m05 — the one nobody prepares for; large differentiation per hour spent
  4. m07 — narrower, but the serving-constrains-research argument is unique
  5. m04 — deep, and only asked by labs that build corpora

One per week, 45 minutes to write plus 30 to critique — the same cadence as Track C's twelve, and they interleave: alternate a d and an m so the primitives reinforce across substrates.


References