CH. 01 · TRACING
Four-Budget Ledger
TraceGraph DAG decomposition across Latency, Memory, Financial, and Trust budgets plus five runtime enforcement contracts.
llmlab/tracing/
Production LLM systems fail at the seams between latency math, memory contracts, and durable state.
CORE QUESTION — How do memory walls, queueing coupling, and ambiguous side effects constrain production LLM architectures from first principles?
llmlab pairs formal analytical systems models (Part 1: tracing DAGs, four budgets, H100/H200/B200 Roofline, MHA/GQA/MLA KV-cache bytes, Radix prefix caching, and P/D disaggregation) with a zero-cloud PostgreSQL 16 durable execution engine (Part 3: append-only ledger, HMAC two-phase side effects, zero-compute HITL suspension, and capability-enforced envelopes).
Maturity · Isolated Evaluation Harness — MIT v0.1.2 companion reference repository for Inside Production LLM Systems (Ch. 1–4 & Ch. 10), verified on GitHub Actions CI.
COMPANION REFERENCE RUNTIME · V0.1.2
Select architectural plane inside TensorScholar/llmlab
CH. 01 · TRACING
TraceGraph DAG decomposition across Latency, Memory, Financial, and Trust budgets plus five runtime enforcement contracts.
llmlab/tracing/
CH. 02 · MEMORY WALL
H100_SXM5, H200_SXM, and B200_SXM ridge models paired with MHA/GQA/MLA KV-byte solvers across FP16/FP8/INT4/NVFP4.
llmlab/memory/
CH. 03 · LOADGEN
Little's Law KV saturation coupling plus open-loop Poisson/burst vs closed-loop coordinated-omission diagnostics.
llmlab/loadgen/
CH. 04 · SCHEDULER
PagedKVBlockManager CoW branching, chunked prefill slack, RadixPrefixTree LRU, and NVLink/RDMA P/D topology planning.
llmlab/serving/
CI gate: make verify-part1 (Python 3.11 + PG 16)
Latency · Memory · Financial · Trust
H100/B200 ridge · MHA/GQA/MLA bytes
Kingman VUT · Little's Law KV saturation
PagedAttention · chunked prefill · Radix · P/D
PostgreSQL 16 append-only state machine
HMAC-SHA256 two-phase & HITL suspension
Engineering decisions — ledger of 3, as recorded. The signal edge marks the rejected alternative in each row.
| Ref | Decision — and why | Trade-off accepted | Rejected alternative |
|---|---|---|---|
| A | Keep Part 1 analytical models dependency-free Latency decomposition, KV bytes, and queueing coupling should be testable and reproducible in milliseconds without spinning up databases or GPUs. | Analytical estimators model hardware specs instead of reading live NVML hardware counters. | Couple queueing and Roofline checks to heavyweight GPU simulation containers. |
| B | Enforce state & fencing inside PostgreSQL SQL transitions Application-level locks fail under split-brain workers; single-use CAS redemption and lease fencing must hold in the storage engine. | Full integration verification requires PostgreSQL 16 rather than SQLite. | Reimplement optimistic locking purely in Python worker memory. |
| C | Model open-loop vs closed-loop load omission explicitly Closed-loop benchmarks mask tail queueing collapse under coordinated omission. | Open-loop generators produce harsher tail spikes that reject undersized cluster configs early. | Report closed-loop fixed-concurrency median latency as production SLO capacity. |
Revision table — evidence provenance, verbatim from the record
| Rev | Evidence | Result | Semantics |
|---|---|---|---|
| A | Part 1 analytical & contract suite Reproducible without Docker via make verify-part1; verifies analytical equations and contract invariants rather than physical GPU silicon counters. | mypy --strict + non-DB pytest suite covering Ch. 1–4 & Ch. 10 graph invariants | REPRODUCIBLE Verified |
| B | PostgreSQL 16 durable execution CI Verified in .github/workflows/ci.yml on ubuntu-latest; power-loss fsync durability relies on OS storage semantics. | GitHub Actions runs full pytest suite against PostgreSQL 16 service container | REPRODUCIBLE Verified |
| C | Serving & disaggregation envelope models Parameterized analytical capacity & migration evaluators; not a live multi-node cluster telemetry claim. | H100_SXM5 / H200_SXM / B200_SXM Roofline + NVLink4/NVLink5/RDMA P/D estimators | REPRODUCIBLE Synthetic |
Schedule of capabilities — 10 entries, as recorded
Audience — LLM Inference & Platform Engineers · AI Infrastructure Architects · Distributed Systems Engineers · Agent Reliability Teams
| Artifact | https://github.com/TensorScholar/llmlab |
|---|---|
| Pinned commit | 892aa1f383f4ab6f2c79777004def0b355744c81 |
| Verification | make verify-part1 |
EVALUATION METHOD
Inference capacity and agentic durability depend on quantitative hardware/queueing math and transactional SQL transitions, not intuition.
Strict mypy --strict checking, dependency-free analytical unit checks (make verify-part1), and full CI verification against PostgreSQL 16 service containers.
NOTE 1 — OWNERSHIP.
Personal authored book & reference runtime
Published under MIT at github.com/TensorScholar/llmlab (v0.1.2). Companion code for Inside Production LLM Systems; GPU hardware throughput and power-loss fsync durability are explicitly out of scope for local CI.
NOTE 2 — READING. Numbers on this page carry their boundary lines. Quoting a result without its boundary omits its scope.