Skip to main content
← PROBLEMS / SYSTEM-DESIGN
An end-to-end domain learning journey

Design a 100M-Trace/Day Enterprise Synthetic
Data & Self-Play Pipeline.

Orchestrate 250M+ raw rollouts/day across 2,048 H100s (vLLM/SGLang FP8), verify in <125ms Firecracker microVMs, decontaminate via MinHash LSH + 13-gram Bloom filters, and commit 100M golden traces/day to Apache Iceberg.
Start the journey7 stages· Last modified Nov 24, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

If latency budgets leave no room for synchronous retries, 40% end-to-end verification + PRM yield turns 420 TB/day raw rollouts into 140 TB/day high-signal ACID datasets with sub-second rollback.

TL;DR30-second simplified summary
▾

Sustaining 2,894 raw rollouts/sec (7,500 peak) requires RadixAttention prefix sharing, userfaultfd microVM pools with zero-egress cgroups, LSH + Bloom decontamination (<=4ms/1K tok), and min_t(r_t) >= 0.78 PRM gating.

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
Verifier-Guided Self-Play & Synthetic Data Pipelines
Verifier-guided self-play pairs an entropy-bounded curriculum mutator with deterministic execution sandboxes (Lean4, Pytest, Z3), 13-gram/MinHash decontamination, and step-level Process Reward Models (PRM).
Distributed Diffusion Inference: Ring Attention & LCM Distillation
Ring Attention shards long spatio-temporal DiT token sequences across an NVLink GPU ring, overlapping P2P KV transfers with FP8 FlashAttention compute, while LCM distillation reduces denoising from 50 steps to 4–8.
Full walkthrough · 7 stages
01
Stage 1 · Foundationfoundation

Throughput Math & 420 TB/Day -> 140 TB/Day Yield Funnel.

Why this matters: Derive sustained/peak rollout QPS, H100 cluster sizing, and storage compression ratios from the 100M traces/day target.

With a 40% combined verification + PRM yield, 100M golden traces/day requires 250M raw rollouts/day (250,000,000 / 86,400 = 2,894 rollouts/sec average, 7,500 peak with 2.6x burst headroom). Across 2,048 H100 GPUs (256x 8-GPU HGX nodes) running FP8 + PagedAttention, each GPU sustains ~1.4–3.7 rollouts/sec.

def pipeline_rates(target_golden_per_day: int = 100_000_000, yield_rate: float = 0.40) -> dict[str, float]:
    if not (0.0 < yield_rate <= 1.0):
        raise ValueError("yield_rate must be in (0, 1]")
    raw_per_day = target_golden_per_day / yield_rate
    return {
        "raw_rollouts_per_sec": round(raw_per_day / 86_400, 1),
        "golden_commits_per_sec": round(target_golden_per_day / 86_400, 1),
    }
Capacity Funnel

250M Raw Rollouts -> 100M Golden Traces / Day

250M Raw/Day (420TB)sourceSandbox + Decontamprocess100M Golden/Day(140 TB)storeStorePRM >= 0.78

1.Burst Provisioning: Size verifier and network queues for 7,500 peak rollouts/sec (2.6x average).

2.Storage Savings: Pruning 60% low-signal traces before Iceberg commit saves 280 TB/day of S3 writes.

Caption: A 40% end-to-end yield funnel turns 250M raw rollouts into 100M verified Iceberg traces daily.

02
Stage 2 · Foundationfoundation

Typed gRPC Contracts Between Generators, Verifiers & PRMs.

Why this matters: Decouple GPU inference fleets from CPU sandbox farms with strict protobuf schemas and backpressure.

Think of Typed gRPC Contracts Between Generators, Verifiers & PRMs as the intuition layer for Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline: Decouple GPU inference fleets from CPU sandbox farms with strict protobuf schemas and backpressure.

Decoupling the H100 generation fleet from the CPU Firecracker verifier farm via typed gRPC (SubmitSelfPlayBatch, VerifyTrajectory) and bounded Kafka/NATS queues prevents slow Lean4/Pytest executions from stalling GPU KV-cache scheduling.

Service Boundaries

Typed gRPC Contracts & Async Queue Decoupling

BatchSpec -> H100FleetsourceBounded TrajectoryQueueprocessVerifyTrajectory ->VerdictstoreStoreVerdictResult

1.GPU Utilization: Async queuing keeps H100 Tensor Cores >85% utilized even when verifiers spike to 1.8s p95.

2.Explicit Verdicts: Structured enums distinguish EXECUTION_FAIL, TIMEOUT, DECONTAM_FAIL, and PRM_REJECT.

Caption: Async gRPC boundaries insulate H100 inference throughput from variable sandbox verification latencies.

Engineering Decision Framework
Problem
How to implement Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline without hitting unbounded tail latency, state divergence, or operational fragility.
Naive Solution
Use a single unpartitioned path with unbounded retries and synchronous global coordination.
Why It Fails
Global coordination serializes throughput under load, while unbounded retries amplify transient stalls into full outages.
Alternatives
Compare synchronous strict-consistency paths against bounded asynchronous replication, local caching, or partitioned ownership.
Engineering Decision
If latency budgets leave no room for synchronous retries, 40% end-to-end verification + PRM yield turns 420 TB/day raw rollouts into 140 TB/day high-signal ACID datasets with sub-second rollback.
Trade-Offs
Gains predictable p99 latency and fault isolation in exchange for explicit bounding, observability, and slightly higher implementation complexity.
Decision Exercise · Make the Call

When Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline experiences a sudden 5x traffic spike alongside a slow downstream dependency, which engineering choice best protects system stability?

03
Stage 3 · Intermediateintermediate

2,048-GPU Self-Play Fleet: vLLM/SGLang + Speculative Decoding.

Why this matters: Maximize token/sec across 256 HGX H100 nodes using FP8 KV-caches, prefix sharing, and draft-model speculation.

Think of 2,048-GPU Self-Play Fleet: vLLM/SGLang + Speculative Decoding as the intuition layer for Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline: Maximize token/sec across 256 HGX H100 nodes using FP8 KV-caches, prefix sharing, and draft-model speculation.

Self-play rollouts share long system prompts and curriculum prefixes across k parallel completions per seed. Using SGLang RadixAttention / vLLM PagedAttention with FP8 KV-caching shares prefix KV blocks across all k rollouts, while auxiliary draft models accelerate autoregressive reasoning chains by 1.8–2.4x.

Inference Fleet

256x 8-H100 HGX Nodes with RadixAttention & FP8

Shared Seed PrefixsourcevLLM / SGLang FP8process250M Rollouts / DaystoreStoreStream trajectories

1.Prefix Sharing: Sharing prompt KV blocks across k rollouts cuts HBM bandwidth pressure dramatically.

2.Speculative Draft: Draft models boost decode tokens/sec on repetitive code/math syntax.

Caption: Prefix-shared FP8 continuous batching lets 2,048 H100s sustain 250M+ daily rollouts.

04
Stage 4 · Intermediateintermediate

Firecracker Sandbox Farm: <125ms Restore & Fork-Bomb Defense.

Why this matters: Safely run untrusted code and Lean4 proofs at 2,894+ req/s with sub-125ms cold starts.

Think of Firecracker Sandbox Farm: <125ms Restore & Fork-Bomb Defense as the intuition layer for Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline: Safely run untrusted code and Lean4 proofs at 2,894+ req/s with sub-125ms cold starts.

Each bare-metal verifier host maintains a warm pool of Firecracker microVM snapshots pre-booted with Lean4, GCC 13.2, Rust 1.75, Pytest, SymPy, and Z3. Using userfaultfd lazy page restoration hits <125 ms startup, while cgroups v2 (pids.max, CPU quota, memory max), seccomp-bpf, and zero-egress TAP interfaces neutralize fork bombs and exfiltration.

Sandbox Isolation

Warm Firecracker Pool with userfaultfd & cgroups v2

Warm Snapshot Poolsourceuserfaultfd <125msprocessseccomp +Zero-EgressstoreStoreRun untrusted trace

1.Fork-Bomb Cap: cgroups v2 pids.max=64 stops process-exhaustion attacks inside the guest.

2.Zero Network Egress: Dropping all external routes prevents generated code from calling external APIs or benchmarks.

Caption: userfaultfd snapshot cloning and cgroups v2 isolation deliver <125ms microVM starts at 2,894+ req/s.

05
Stage 5 · Intermediateintermediate

Streaming MinHash LSH & 13-Gram Decontamination.

Why this matters: Filter semantic near-duplicates and benchmark contamination at 1,157+ traces/sec with <=4ms p99 latency.

Think of Streaming MinHash LSH & 13-Gram Decontamination as the intuition layer for Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline: Filter semantic near-duplicates and benchmark contamination at 1,157+ traces/sec with <=4ms p99 latency.

Stateless decontamination workers hold an immutable, memory-mapped 13-gram Bloom filter containing all held-out evaluation benchmarks (MMLU, HumanEval, SWE-bench, GSM8K, MATH) alongside a distributed 128-perm MinHash LSH index (32 bands x 4 rows, J >= 0.80 drop threshold).

Decontamination

Dual-Stage LSH + 13-Gram Bloom Filter

Verified TracessourceMinHash LSH (32x4)process13-Gram BloomFilterstoreStoreRolling Rabin-Karp

1.Zero Eval Leakage: Any 13-gram overlap with held-out benchmarks immediately quarantines the trace.

2.Hot-Reloadable Filter: New benchmark releases are compiled into a shadow Bloom filter and swapped atomically.

Caption: Streaming LSH and 13-gram Bloom checks purge duplicates and benchmark leaks in under 4ms.

06
Stage 6 · Advancedadvanced

PRM Rejection Sampling & Early-Stop Tree Search.

Why this matters: Score intermediate reasoning steps at <=35ms p95 and prune low-reward branches mid-generation.

Think of PRM Rejection Sampling & Early-Stop Tree Search as the intuition layer for Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline: Score intermediate reasoning steps at <=35ms p95 and prune low-reward branches mid-generation.

A dedicated PRM inference tier evaluates step-level reward r_t in [0, 1] at <= 35 ms p95 per step. During multi-path tree search, partial trajectories dropping below 0.78 are pruned immediately, and full traces must satisfy min_t(r_t) >= 0.78 before entering Apache Iceberg.

PRM Gate

Step-Level Scoring & Early Branch Pruning

Clean TracessourcePRM Step Scorerprocessmin_t(r_t) >= 0.78storeStoreAccept golden traces

1.Early Pruning: Killing dead-end reasoning branches mid-rollout saves ~25–35% of H100 decode FLOPs.

2.Calibration Audit: Log score histograms to ClickHouse to detect PRM drift across domains.

Caption: PRM step scoring enforces high reasoning quality and cuts wasted decode compute via early pruning.

07
Stage 7 · Advancedadvanced

Poison-Batch Rollbacks via Apache Iceberg & ClickHouse.

Why this matters: Detect model collapse or contaminated batches in real time and roll back 10M+ traces atomically.

Think of Poison-Batch Rollbacks via Apache Iceberg & ClickHouse as the intuition layer for Design a 100M-Trace/Day Enterprise Synthetic Data & Self-Play Pipeline: Detect model collapse or contaminated batches in real time and roll back 10M+ traces atomically.

ClickHouse ingests per-batch telemetry (pass@k, KL divergence, lexical diversity, decontam drop rate, PRM distribution). If an anomaly alert fires (e.g., KL drops below 0.72 or eval-leak rate spikes), an automated runbook pauses downstream SFT/RL readers and executes an Apache Iceberg snapshot rollback to the last clean iceberg_commit_id.

Observability & Rollback

ClickHouse Collapse Alerts + Iceberg Atomic Revert

ClickHouseTelemetrysourceAnomaly DetectedwarningIceberg RollbackstoreStoreQuarantine batch_id

1.Time-Travel Queries: Downstream training jobs pin an immutable Iceberg snapshot ID for full reproducibility.

2.Zero Data Loss: Compaction retains prior snapshots for 30 days so rollbacks never lose earlier clean data.

Caption: ClickHouse anomaly telemetry paired with Apache Iceberg snapshots enables sub-second dataset rollbacks.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

At 40% combined verification + PRM yield, how many raw rollouts/sec must the 2,048-GPU H100 fleet sustain on average to persist 100M golden traces/day?

Recommended Learning Flow