APPENDIX C
Source edition and excerpts
The inspected DeepInfer files match upstream commit 774ce244b87cc0eb8d4b94ab9f5de2ab22049f01.
All DeepInfer file entries in source-manifest.json were compared by SHA-256 with that
commit. This identifies the source used here; it does not pin a model checkpoint, submodule
installation or a tested engine environment.
The experiments, saved outputs, excerpts, manifest and checking tool are published in the
companion repository https://github.com/jzstark/inside-deepinfer-code under the
Apache License 2.0. Paths such as labs/, results/ and excerpts/ below are relative to its root,
and commands such as make labs and make check run there. Its tags identify the code for each
published edition; use the tag that matches your copy of the book, since the default branch may
contain later corrections.
Source paths in the chapters are relative to the DeepInfer repository. Printed excerpts are
contiguous source lines saved under excerpts/, with original line numbers and common leading
indentation removed. The manifest records paths, source ranges, removed indentation and hashes;
code and comments are otherwise unchanged. These fragments are for reading, not standalone
programs. DeepInfer’s Apache 2.0 licence is included in excerpts/LICENSE; the references link to
the fixed source edition. The book builds without an engine checkout. To verify the excerpts
against a local snapshot, run make check DEEPINFER_SOURCE=/path/to/DeepInfer. The check
verifies source hashes, line ranges, removed indentation and excerpt hashes without rewriting
them.
The manifest also records a historical comparison with vLLM v0.6.3, commit
fd47e57f4b0d5f7920903490bce13bc9e49d8dba. Its engine and sequence files
support the terminology comparison; its scheduler supports chapter 5’s queue and
preemption comparison. Chapter 7 also compares DeepSeek’s standalone EPLB at
d52c72d5b2f2fb4c41afbf8eb21366820239913d, recording the policy and README hashes.
These comparisons establish differences at fixed versions, not DeepInfer’s fork point or direct
derivation of its EPLB policy. make check covers the DeepInfer snapshot and its book excerpts;
the separate comparison sources were checked manually.
Chapter 7’s placement lab imports labs/vendor/eplb_policy.py, an unmodified copy
of deepinfer/model_executor/eplb/policy.py that make check verifies like any
excerpt. The same chapter quotes the gate’s replica rule from two libraries outside the
DeepInfer repository: DeepGEMM at the commit pinned by DeepInfer’s vendor/DeepGEMM
submodule, and the tile-kernels 2.1.0 package named in its requirements.txt. The
manifest records those files’ hashes under dependencies; make check does not fetch or
verify them. Chapter 10 additionally records the FlashMLA submodule commit from
DeepInfer’s git tree and its repository URL from .gitmodules. That pin identifies
the dependency; the inspected code is DeepInfer’s caller, not the FlashMLA kernel
implementation.
English renderings of Chinese comments are labelled author’s translation in the surrounding prose, with a reference to the original line. A translation is editorial text, not an alteration of the quoted code. Source artifacts retain the original comments.
The book’s English prose follows the project’s writing guide [3], which draws on The Economist’s principles of clear, concrete and economical explanation.
The twenty-eight teaching labs have a separate record in results/provenance.json: script
hashes, output hashes, Python version, platform and execution time. For chapter 2, it also records
the input trace hash and the generated curve-data hash. The trace timestamps are assigned
teaching data; the saved analysis is actual script output. Re-running make labs refreshes records
for the labs it executes. If PyTorch is absent, lab 16’s output and original run record are retained.
Each run’s execution field records its generating environment and time; the top-level skipped
list describes skips in the current invocation. Chapter 8 adds exact rational enumeration
and a translation of the verification budget search. Its provenance also records the
sourced DSpark input table and the generated synthetic cost curves. The recorded output
distinguishes DeepSeek’s reported throughput estimates from calculations on assigned
costs. Chapter 9 checks a rational window model and translated query-range and SWA
pair-count formulas against direct enumeration. It does not execute the native FLOPs
estimator or the model equivalence checks. Chapter 10 checks floating-point reduction
order, a scalar metric counterexample, request-keyed teaching draws and exact PIT
interval masses. Its inventory of released model tests is based on source inspection,
not execution of those tests. Chapter 11 adds assigned service queues and capacity
rates, a translation of the Q&A hit policy, and a frontier from synthetic records. The
runner hashes its two generated curve CSVs. A separate published_figures manifest
entry records the upstream PNG hash used for the approximate visual reading; it
was checked against the fixed commit manually and is not covered by make check.
The plotted CSVs contain no recovered benchmark measurements. Appendix A adds
rational compression across chunk boundaries, a ring-lifetime counterexample, integer
index scores and address conversion. Appendix B translates rank grouping for two
four-worker layouts. These labs do not execute compression/indexing kernels or start
distributed processes. These records attest to the teaching runs, not to execution of
DeepInfer.