What We Learned: Inference From First Principles
The completed argument of the book: preserve identity through every inference stage, explain gains with mechanisms, audit claims against artefacts, and choose the next experiment from what remains uncertain.
The runtime finished every order request in Chapter 44’s synthetic extraction task. Its batched implementation completed the 60-item set in a median 30.1 seconds with eight running requests, against 127.3 seconds for the serial capstone. Yet both extracted the correct fields from only 17 of 60 orders after the scorer removed surrounding text; only 5 of 60 responses were exact as written. Completion, speed, schema validity and correctness were four different observations. An engineer reporting only one of them could describe a successful system while leaving the user’s actual requirement unsatisfied.
That final experiment in Benchmarking Against Established Engines returns us to the distinction at the start of the book. A model can compute its prescribed distribution and still produce an unsuitable answer. A runtime can reproduce that answer but serve it too slowly. A benchmark can record a very early first token while overlooking a failed end-to-end service objective. To explain an inference result, we must follow the whole request and specify the obligation at each boundary, rather than allowing success at one stage to stand in for another.
This conclusion has two jobs. It gathers the mechanisms learned across the book into an engineering method, and it leaves an honest account of the artefacts that support that method. The capstone is a small, inspectable research runtime, not a production serving engine; the manuscript’s inventory is not an independent reproduction. What matters at the end is whether another engineer can tell which claims were measured, which remain hypotheses, which cannot yet be tested, and what observation could change our minds.
Follow one request to the end
The book’s central chain is:
model parameters -> request -> tokens -> computation
-> generated tokens -> served response -> measured outcome
The arrows matter as much as the objects. Model parameters need an exact artefact, revision and compatible implementation. A request needs validated options and a specified rendering rule. Input tokens need a tokenizer and vocabulary. Computation needs state ownership, precision, device and a reproducible execution description. Generated tokens need a decoding and stopping rule. A served response needs a protocol that preserves authority and content boundaries. A measured outcome needs a workload, observation point, scoring rule and uncertainty statement. Removing any one identity can leave two apparently comparable results answering different questions.
Follow the Chapter 44 order task through that chain. The pinned Qwen3-0.6B model and tokenizer determine the model identity. The chat template turns each order description and schema instruction into input tokens. The chosen backend and its KV state produce logits; greedy selection produces a sequence of tokens; the stopping rule determines which tokens are returned. The decoder turns them into text. Finally, the scorer either evaluates that text as written or extracts an object from inside it before checking the fields against the synthetic gold record. The observed result depends on every one of those choices, not only the model weights.
The two extraction scores answer different questions. Requiring exact structured output as written yielded 5/60 correct for the serial and batched-eight capstone paths. Permitting the scorer to remove surrounding text raised that to 17/60. The post-processing did not make the underlying model more knowledgeable; it changed what the service was allowed to accept. A client that requires immediately parseable JSON cannot be promised the 17/60 figure without adopting the same extraction policy. Neither score measures general accuracy on real orders.
This is why the book distinguishes model quality, numerical agreement, runtime correctness, protocol validity and task success. The order matters: a correct computation does not imply correct field values; matching final text does not imply that those values are right; and a schema-valid object is not necessarily a faithful extraction. A useful experiment identifies the transition it tests, its observable acceptance criterion, and the upstream identities that must stay fixed.
What the early chapters established
What Is Inference? began with a concrete continuation. The following chapters unpacked the file, the tokenizer, the forward computation and the generation loop. They made it possible to ask what happened between an input string and an output string.
The model artefact is more than a parameter count. Loading it involves configuration, tensor names, tied weights, buffers and implementation choices. Evaluation mode and disabled gradient recording solve different problems. A model name alone cannot explain a measurement whose file, revision or execution mode has changed.
Tokens are a representation with consequences. The bytes a user writes are not the integer sequence the model consumes; a token is neither a fixed amount of text nor a constant amount of computation. The vocabulary, special-token handling and rendering path must remain attached to the input and output counts. Otherwise a benchmark can change the request before its first matrix multiplication and still appear to time the same work. This is also a trust boundary: data that merely resembles a structural token must not silently become an instruction.
Writing a forward pass by hand made tensor shapes and state transitions inspectable. Its agreement with a library on declared examples was a local conformance result. It did not establish every architecture, precision or context length. The important capability was being able to compare intermediate quantities, rather than accepting a fluent final sentence as proof that the implementation was correct.
Autoregressive generation exposed its sequential dependency: a newly selected token changes the context for the next selection. Parallel scoring of a known continuation is not parallel generation of an unknown one. The sampling chapters added a second lesson: a seed alone does not identify a replay. Reproducibility also depends on how random draws are allocated to requests and steps, which sampler is used, and the numerical path through the model. The early sampler defect was instructive because plausible output hid correlated streams; a later change in batch shape exposed a different route to diverging tokens.
The first part supplied a baseline that could be inspected. It did not supply a portable latency promise or a guarantee that generated text would solve a task. That narrower foundation was sufficient for the systems questions that followed.
Speed has a mechanism and a price
The computational chapters separated prefill from decode, arithmetic from memory movement, device computation from host dispatch, and throughput from the latency a request experiences. Their common lesson is operational: an optimisation claim should name the work removed, shared, reordered or made cheaper, and show that the proposed counterfactual performs the same relevant task. Without that comparison, a faster clock reading is an observation but not a causal explanation.
A KV cache avoids recomputing past attention keys and values on successive decode steps. That saves work but introduces persistent state whose ownership and identity must be maintained. A prefix hit is valid only under the model, tokenizer and relevant execution assumptions that produced the cached state. If the wrong state is reused, a seemingly plausible output is not evidence that the cache was sound: the effect may remain hidden until a later token. Cache correctness therefore needs checks on state transitions as well as examples of final-text agreement.
Memory-efficient attention changes the way intermediate values are materialised. The block-wise implementation in the book demonstrated the algebra and a memory saving while being slower than the straightforward implementation on the measured path. That negative performance result separates an algorithm’s memory property from the specialised kernel engineering needed to realise a speed advantage.
Paging and allocation policy concern which state can remain resident as requests come and go. The book’s simulators exposed fragmentation and reservation effects, but those simulations were not measurements of accelerator throughput. Prefix reuse saved prefill work in the implemented scheduler; its copying cache also consumed additional memory. Reuse has an isolation boundary: a timing difference between hits and misses can reveal information, and sharing across tenants requires an explicit policy and tests. A hit-rate improvement is not, by itself, evidence of a safe multi-tenant service.
Speculative decoding trades draft proposals and verification for fewer expensive target steps when enough proposals are accepted. Graph replay and compilation trade repeated host work for setup cost and constraints on shapes and state lifetimes. Quantisation trades numerical representation and sometimes arithmetic precision for smaller weights or caches, but lower bit width does not guarantee a faster kernel or preserved task quality. These are different mechanisms. Their measured value depends on acceptance rates, bottlenecks, launch costs, memory movement and output obligations—not the technique’s name.
Those mechanisms do not add up to a universal recipe. A decode path limited by launch overhead has a different opportunity from a long prefill limited by attention memory. A workload with repeated prefixes has a different opportunity from unrelated prompts. The local measurements support explanations under their recorded conditions; applying them elsewhere begins with diagnosing the new bottleneck.
A useful performance claim has a counterfactual. For the same requests, token policy and measurement boundary, what happens without the mechanism? Which variables did the experiment change unintentionally, and what did that change cost in memory, agreement or failures? The result may be negative. That is still progress: a slower readable implementation can validate an algorithmic idea while showing that the missing advantage lies in kernel engineering rather than in the mathematical identity.
Architecture constrains the runtime
The architecture chapters ask what the runtime must honour about the model it executes. They do not grant permission to redesign the model while calling the result an equivalent optimisation.
Mixture-of-experts inference makes the architecture/runtime boundary concrete. The per-token active parameter count does not tell us how many distinct experts a whole batch loads or executes. Routing diversity, expert imbalance, memory placement and capacity limits all affect the work performed. Dropping tokens or restricting experts to fit a resource budget may change the model’s computation, rather than simply schedule the same computation more efficiently. Such a policy needs a separate quality acceptance test.
Attention variants change state size and admissible computation. Sharing key/value heads can reduce cache storage as a property of the architecture. A runtime cannot assume that deleting attention history from a model trained for full attention preserves its behaviour. The sliding-window experiments were useful precisely because accepting modified execution did not establish its quality.
Long-context support has at least four meanings: the model’s position scheme accepts the requested indices; the runtime can construct and retain the required state; hardware can execute the workload within a specified memory and time budget; and the model can actually use distant information to answer correctly. Demonstrating one does not establish the others. An implementation that silently spills state into host memory may still run, but can cross a latency cliff and invalidate a capacity estimate based on device-resident execution.
Model Architecture Versus Runtime Architecture brought these constraints together. Two implementations can aim at the same mathematical function and still use different floating-point reduction orders or attention kernels. A small logit perturbation near a top-two tie can change greedy selection and then the entire continuation. We therefore need two explicit policies: a numerical tolerance for comparing intermediate computations and an output or task-quality rule for deciding whether changed text is acceptable. Neither one can be inferred from the other.
The practical lesson is to describe both identities: the model being implemented and the execution that implements it. Two runtimes remain different systems even when a sample of their outputs agrees.
A correct loop is not yet a correct service
The serving chapters moved responsibility from a single request to requests that overlap, wait, fail or disappear. The runtime now had to own state over time, and every terminal transition had to release what the request owned.
Validation makes an invalid request a defined outcome rather than undefined work. Admission decides whether the service can accept the request under its current resource budget; scheduling chooses when it progresses; streaming defines what the caller observes; cancellation ends obligations when the caller no longer wants an answer. Resource ownership connects all four: a request that is rejected, cancelled, times out or fails must leave its allocations and terminal state coherent. The capstone checks some of these transitions, but bounded scenarios do not establish correctness under arbitrary concurrency or crashes.
Failure injection showed why process survival is too weak a reliability measure. A loop may continue while decoding streams that have already ended or holding resources for requests no longer present. The Chapter 41 memory-leak mutant was particularly instructive: the backend could pass checks based on its own memory report while retaining allocations visible to an independent GPU allocator. A meaningful recovery test observes terminal events, subsequent unaffected requests and independent resource conservation. Logging an exception or returning HTTP 200 proves none of these properties on its own.
Distributed execution and separating prefill from decode added communication, synchronisation and ownership across devices. The local split path sometimes cost more than it saved: moving activations or cache state over a shared device or narrow link can outweigh the compute benefit. That is a result about the tested topology and implementation, not a general verdict on disaggregated inference. The first question for a new deployment is where the time and bytes move; the second is whether the split changes the externally measured objective.
The service boundary explains why an offered-load description belongs next to every latency number. A closed-loop client waits for responses and can lower its own arrival rate as the system slows. An open-loop generator keeps offering work and exposes queue growth. The experiments in Chapters 36, 40 and 44 used declared arrival processes, but they did not establish client-side HTTP latency for the final comparison. In-process token-event timestamps and the arrival of streamed chunks at a real client are distinct measurements and should never be merged under one unqualified TTFT label.
By this point the object of the book was the lifecycle of a request under resource limits, with enough recorded information to explain which work completed and which did not.
Protocols carry meaning, not just text
The protocol chapters return to token identity from another direction. Control structure and user text can look similar when both are rendered as characters. They cannot acquire the same authority merely because a string template put them beside one another.
A renderer must keep trusted control structure separate from untrusted user or tool text. A tool-call loop must validate proposed arguments, permissions and effects, preserve call/result identity, and regard tool output as evidence or data rather than an authoritative new instruction. Structured decoding can restrict the strings emitted, but a valid JSON object can still contain false fields. The protocol chapters therefore test whether the boundaries were respected; they do not establish that the model chose an appropriate tool, requested the right calculation or solved the user’s problem. Escaping structural markers alone was not demonstrated to stop ordinary-language prompt injection in Chapter 34.
The experiments on reasoning budgets and tools made this gap measurable. More inference-time computation did not uniformly improve accuracy under the tested prompts and decoding policy. The call-first calculator loop in Chapter 34 solved fewer GSM8K items than its no-tool baseline: exact arithmetic could not rescue a badly chosen tool request or the reasoning the prompt displaced. Chapter 35 similarly produced schema-valid outputs while many fields remained wrong. These are not warnings against reasoning or tools; they are reasons to evaluate the policy and the resulting answer, not merely the execution path.
Provider documentation occupies a different evidence tier. It can establish a documented parameter, pricing convention or promised interface behaviour at a dated version. It cannot establish unpublished kernel choices, cache placement, internal routing or the identity of a model that cannot be pinned. Local calculations using a provider’s published rates remain models, not invoices; a quoted rate can change. Closed-provider examples therefore explain contracts, but they do not fill the empty cells of a same-model, same-hardware comparison with the capstone.
The resulting obligation is concrete: preserve typed structure until the boundary that needs text, validate each transition, and judge the task with an external criterion. Generated text is never an instruction to the measurement system or the evidence audit.
Measurement changes the question
The economics and evaluation chapters made several substitutions unsafe. High device activity is not proof of high arithmetic efficiency. A busy-hour token rate is not a wall-clock rate at partial utilisation. An apparently deterministic fixed-shape run does not guarantee bitwise agreement under a different batch, library release or device. And 500 requests observed through one shared queue are not 500 independent experimental replications. Stating the denominator, conditioning assumptions and unit of replication is part of the result, not a footnote added after it.
Cost depends on the boundary of the account. GPU-board energy is not whole-machine electricity, placeholder hardware depreciation is not an observed cloud bill, and a modeled dollar-per-million-token rate is not independently metered expenditure. The denominator matters as much: output tokens, valid records, accepted answers and correctly completed tasks can rank the same systems differently. In Chapter 44 the capstone delivered the same incorrect order fields faster; speed improved, but task success did not. An economic comparison that omits correctness can reward fast production of unusable output.
Capacity depends on an objective and a workload. A system may finish every request eventually while missing the response times the caller accepts. Saturated throughput cannot substitute for sustainable offered load at a declared service level. Memory capacity and queue limits belong in the same account, since overload is work accumulating somewhere.
Reproducibility has levels. A seed can make the random choices repeat within one controlled execution, but does not fix all reduction orders, kernel selections or batch shapes. PyTorch’s own reproducibility notes explicitly decline general guarantees across releases, commits and platforms. That external limitation supports preserving model and tokenizer revisions, backend settings, hardware, software and exact request inputs. It does not excuse a local discrepancy without investigation or turn numerical closeness into bitwise identity.
Chapter 40’s A/A design asked whether a benchmark can keep an identical configuration from becoming a spurious winner. Chapter 44 provided a sterner test: on heavy traffic, the two nominally identical capstone runs had trial-median SLO pass shares of about 0.63 and 0.91. Some A/A paired t-intervals on other metrics excluded zero despite the exact sign-flip test’s five-pair resolution being too coarse to cross 0.05. This is not proof that the code paths differed; it is evidence that timing variability, small independent-trial counts and method choice matter when interpreting modest gains.
An interval too wide to guide a choice tells the reader that the experiment needs different conditions, more independent trials or a larger effect. It does not justify choosing whichever central value fits the desired story.
What the capstone now contains
Designing the Inference Runtime converted earlier lessons into contracts. The runtime separates backend computation, sampling, cache ownership, scheduling and emitted events. Its checks ask what each component promises. Deliberately faulty implementations ask whether those checks detect plausible violations.
Implementing Scheduling and Caching added admission, block accounting, interleaving, prefix reuse and preemption. Its burst measurements showed why earlier first tokens do not necessarily mean higher total throughput when each sequence is still decoded separately. Prefix reuse removed prefill work but used additional memory; one float16 burst also changed a request’s generated tokens. Tests of individual cancellation points were valuable, while remaining bounded by the scenarios and mechanisms they actually exercised.
Adding Multiple Model Backends added batched decode and a request-level interface for systems that own generation. An unavailable backend, an undeclared capability and a failed check became distinct outcomes. An absent implementation must not pass by being represented as an empty or favourable measurement.
Chapter 44 placed those components under matched workloads and a separate task scorer. Its contribution to the conclusion is the refusal to combine the columns. First-token improvement, output agreement, memory, completion and extraction success remain inspectable outcomes. vLLM, SGLang and DeepInfer still have no measured head-to-head result in that chapter.
The capstone is an experimental runtime with a comparison harness, not a certified alternative to a serving system. Its Python adapters expose ownership and scheduling decisions; the stack-and-split batched cache makes a speedup measurable while leaving avoidable copying and memory overhead. Mutation tests demonstrate sensitivity to the faults the authors constructed, not completeness against unseen failure modes. Its usefulness is that contracts, measurements and counterexamples can be inspected together. A passing suite is the beginning of a reproducibility argument, not the end of one.
Audit the evidence without manufacturing completion
The original Chapter 45 starter generated 45 manifest entries and marked every test and result flag true by construction. An audit that sums those booleans can report completion even for an empty repository. That failure is a fitting final example: a reassuring report is not evidence unless its claims can fail when the underlying artefacts are removed or corrupted. The replacement inventory is designed to expose those conditions rather than to pronounce the book finished.
The replacement examples/ch45/manifest.py examines each expected chapter from 01 through 45. It reads the chapter’s TOML front matter and checks its number, finds chapter-named test files, parses research/chNN/results.json, checks the result’s chapter identity and presence of a status string, and hashes the files it inspected. This is an artefact-discovery and minimal-structure check. It does not invoke those tests, check that every result has raw data, verify the status against a controlled vocabulary, validate measurements against assertions, or compare a chapter’s prose claims with those measurements. An inventory row cannot silently acquire those stronger meanings.
The saved Chapter 45 run found 45 manuscript files, 45 groups of named test files and 45 minimally valid result files. Their recorded statuses were 44 PARTIAL and one INVENTORY_ONLY. The audit reports inventory_complete: true, but all_complete: false: in the current implementation the latter is deliberately a constant False, not a computed assessment of evidence maturity. It also reports tests_executed_by_audit: false, claims_verified_by_audit: false and independent_review: NOT_RUN. Those fields say what the inventory did not establish. They are not a claim that no experiments anywhere in the book were executed; the earlier chapters have separate local result records.
A parseable result can declare NOT_RUN, PARTIAL or another status without supplying evidence that every proposed experiment passed. A test filename shows only that a test file exists. A passing test invocation, if recorded, would show that those tests passed in that environment; it would not demonstrate that their assertions cover all relevant failures. Likewise the audit checks the existence of the expected chapter files, not the complete dependency graph or publication-readiness of the book. The right reading is therefore inventory available for deeper audit, not review completed.
Run the audit and its focused tests from the book repository:
python examples/ch45/manifest.py --json --out research/ch45/results.json
python -m pytest tests/test_ch45_manifest.py -q
The regression tests include an empty repository, malformed JSON, mismatched chapter identities, a declared NOT_RUN result and a changed test file. Their purpose is to show that the inventory responds to missing or altered inputs, instead of returning a predetermined success count. They are not a rerun of Chapters 1–44 or a check of their scientific conclusions. A useful further mutation would give the inventory a parseable but misleading result status or omit the raw evidence while leaving the summary intact; the present script would not prove that evidence complete.
Regenerating the manifest after an edit changes the hashes of the files it inspects. Its own result JSON cannot straightforwardly contain its final self-hash: writing that hash changes the object being hashed, so the implementation uses SELF_REFERENCE for that slot. The evidence register retains separate references to outputs. For a stronger publication packet, write an external immutable checksum manifest after the result files are final, include the source commit and environment, and verify those checksums independently. A hash proves byte identity relative to a chosen snapshot; it does not prove that the original experiment used that snapshot or that the result is correct.
A claim needs more than an inventory row
A claim in the manuscript should lead to a chain that a sceptical reader can follow: exact words of the claim; local result or attributed external source; raw observation or test; experiment command; code revision; model and tokenizer identity; workload and seed; environment; analysis procedure; and known limitations. A link to results.json is the beginning of that chain, not a substitute for the rest. When a link breaks or an earlier identity was never recorded, the evidence register should state the gap rather than reconstruct a convenient value.
| Claim encountered at the end of the book | Evidence category and the next audit step |
|---|---|
| Autoregressive generation feeds selected tokens back into subsequent decoding | Established background and locally implemented mechanism; inspect the generation loop and its checks, not just its output |
cap-batched-8 produced a much earlier median first token than hf-b4 on Chapter 44’s heavy workload |
Book result; inspect research/ch44/results.json, the frozen 90-run input records, paired trial analysis and in-process timing boundary |
| The same heavy-workload capstone won on the declared combined SLO | Not supported: median SLO share was approximately 0.63 versus 0.96 for hf-b4, and A/A variability needs independent replication |
| Batched execution preserves every output under any workload or precision | Unsupported: local float16 batch-shape comparisons contain differing output sequences |
| The synthetic extraction service completed all requests but often returned wrong fields | Book result: 60 items, 5/60 exact as written and 17/60 after extracting an embedded object for the comparable capstone variants; scoring rule is part of the claim |
| Replacing the copying batched cache with persistent state will improve efficiency without sacrificing correctness | Book hypothesis; implement it, freeze acceptance criteria, and run controlled and held-out workloads |
| The capstone outperforms vLLM, SGLang or DeepInfer | NOT_RUN; no matched, successful local head-to-head record |
| Every experiment in the repository is complete, independently reproduced or production-qualified | Not established by INVENTORY_ONLY or by the presence of chapter files |
The categories are established background, book hypothesis and book result. A source-reported observation stays attributed to its source; it does not become another route to a local measured result. A missing run cannot be repaired with a citation to somebody else’s system.
Chapter 44 offers a particularly clear provenance limit. Its raw measurements do not record the original measurement-time code revision. The later editorial builder can hash the files that currently exist and re-run analysis on the retained measurements, but those current hashes cannot recover a missing historical commit identity. A future experiment should write the source commit, working-tree state and code/configuration digests into the run manifest before execution and retain them with the raw outputs. The present omission remains visible even if every current artefact receives a checksum.
Failures belong in the final account
A negative result is an executed experiment that failed to support an expected benefit under its tested conditions. An inconclusive result leaves a difference unresolved within the study’s precision. NOT_RUN describes a missing qualifying execution, including a backend that could not be launched. A discarded run is an executed attempt whose method or measurements were invalid for the stated question; it should retain a reason and be excluded transparently. These are different evidence states. None should be converted into a pass, or hidden in an average, merely to make the book read like a completed product.
The book contains examples of each. A slower inspectable attention implementation separates mechanism from kernel performance. A slower split execution exposes communication and deployment conditions. An unresolved light-load comparison asks for better precision before selecting a winner. An import failure asks for environment work, not a performance explanation. A changed evaluation rule after seeing a failure must remain disclosed rather than being presented as an advance commitment.
Those observations keep the conclusion narrower than a catalogue of recommended optimisations. They show how to make a system and its measurement answerable to evidence. A contract can be useful after a mutant reveals a weakness in its tests; a benchmark can be useful after an A/A run exposes false precision. The correction is part of the work.
The next experiments
The most direct next implementation experiment replaces the stack-and-split batched KV cache with persistent state. Establish the memory budget, output-identity policy, cleanup and cancellation requirements before measuring speed. First compare against the copying adapter on development workloads, checking state integrity after requests join, leave and fail; then freeze the design and run a held-out workload matrix. Success would require a predeclared improvement in an accepted latency or capacity objective and the absence of quality and resource-contract regressions. If the improvement fails those gates, report the negative result rather than retune on the held-out set.
The next external comparison requires a supported, runnable configuration of vLLM, SGLang or another established engine, pinned to the same model and tokenizer, with its licence and deployment requirements established. Replay the same token inputs, arrivals, stopping policy and output budgets; measure through a common client boundary; retain errors, startup reservations, total memory and task scores as well as token rates. The Chapter 43 import failure must first be diagnosed, not reclassified as a speed result. Until an actual record exists, the Chapter 44 head-to-head column stays NOT_RUN regardless of what an upstream benchmark reports.
Production reliability is a different programme from this capstone. It requires sustained load, realistic arrival distributions, bounded queues, repeated backend faults, concurrent cancellations, state isolation and recovery after failed cleanup, under a declared availability and tail-latency objective. In particular, test whether a failed request leaves allocations or queued work behind and whether later unaffected requests still complete. More normal requests improve a throughput estimate; they do not automatically cover the rare lifecycle transitions on which reliability depends.
Task evaluation supplies an independent axis. Draw representative inputs from a declared distribution, use a fixed scorer and preserve an untouched evaluation set. Measure correct accepted answers per unit of time, compute, memory or money—not just total generated tokens. Keep a distinction between exact structured output and an object recovered after post-processing. If the prompt, decoder, model or scorer changes, treat it as a changed service configuration and rerun the relevant quality checks before attributing any difference to the runtime.
What you should now be able to do
- Trace a response from its observed outcome through scoring, protocol, generated tokens, execution state, input tokens and model identity, with a verifiable artefact at each step.
- Explain a performance change by naming the work, memory movement or scheduling mechanism and constructing a comparable counterfactual.
- State a quality gate, SLO and resource budget before calling a measured throughput gain an engineering success.
- Distinguish a file inventory, a passing regression suite, a local reproduced result and an independently repeated experiment.
- Audit a headline number back to retained evidence, identify any missing identity or measurement boundary, and propose an experiment that could disprove the claim.
Key terms
- Provenance: recorded identities, settings, observations and transformations that permit a result to be traced back to an actual execution.
- Inventory: a check for the presence and minimal structure of artefacts; it does not establish that their contents or claims are correct.
- Book result: a local finding tied to recorded measurements, methods and limitations; not an independently confirmed general law.
- Book hypothesis: a proposed explanation or prediction for which an additional discriminating test is needed.
- Negative result: a valid executed comparison that did not support the proposed benefit under its tested conditions.
- Inconclusive result: a comparison whose evidence did not resolve the specified difference.
- Independent reproduction: a separate attempt to obtain the reported result from disclosed methods and artefacts, rather than checking that files exist.
- Quality gate: a declared acceptance test that must be passed before a performance improvement can be promoted.
Reader exercises
- Pick a performance claim from Chapters 14–44. Write down the exact number, counterfactual, workload, output policy, measurement boundary and unit of replication. Locate the raw record and explain one broader conclusion it does not support.
- Copy the inventory inputs into a temporary repository, remove one result and corrupt another, then run the audit. Next add a parseable result claiming
COMPLETEwithout raw data. Record what the current manifest catches and misses; propose a separate evidence validator rather than redefininginventory_complete. - Re-score the Chapter 44 order outputs under two predeclared service contracts: valid JSON as written and exact fields after cutting surrounding text. Explain why 5/60 and 17/60 can both be correct scores of the same generated answers.
- Select a negative, null or discarded result from the evidence register. Propose a changed condition that could alter its outcome, preserve the original result, and specify a falsification criterion and independent trials.
- Prepare a reproduction packet containing the exact source revision and dirty-tree status, environment, model/tokenizer identities, workload digest, command, raw records, scorer, analysis and limitations. Ask another engineer to follow one claim from the chapter to its originating observation without relying on your oral explanation.
- Design a pre-registered gate for the persistent-cache experiment: include performance, token/task quality, cancellation, memory conservation and the held-out evaluation rule. Specify what counts as failure even if throughput rises.
References and implementation status
Three sources establish the methodological standard, not the correctness of this repository: ACM Artifact Review and Badging distinguishes making artefacts available, evaluating their functionality or reusability, and independently reproduced or replicated results; MLPerf Inference: Datacenter separates workloads, scenario rules, quality targets and system records; and PyTorch’s reproducibility guidance describes the limits of deterministic execution across releases and platforms. The empirical case for reporting code, data, uncertainty and reproduction procedures is also developed by Pineau et al., Improving Reproducibility in Machine Learning Research, JMLR 22(164), 2021. These are attributed external sources, not badges, certifications or local reproductions. The book’s own trace begins in the chapter result files and research/evidence-register.md; for Chapter 45 it continues into the inventory’s hashes and its explicit INVENTORY_ONLY status.
The concluding chapter offers a technical synthesis, an executable artefact inventory and focused tests of whether missing or malformed inputs are noticed. Its saved result status is INVENTORY_ONLY, not COMPLETE. Of the 45 chapter results in that snapshot, 44 declare PARTIAL; this count is a statement about their recorded labels, not a test of all experiments. No independent technical review, reproduction study, production qualification or publication approval has been established by the manifest. Before release, an editor should separately verify substantive claims against results and raw data, test the reproducibility packet, review live references, and record that review’s scope and outcome.
We began with a model continuing a sentence. We end with a stricter question: which exact model, tokens, computations, state transitions, protocol decisions and measurements produced this response—and did the response satisfy the task for which it was requested? The lasting result of building inference from first principles is not a claim that every implementation is now complete. It is a way to expose where a claim is supported, where it fails, and what evidence would be needed to carry it further.