These examples accompany Inference From First Principles. Each page isolates
one mechanism from its chapter, gives a command that can be run from the
canonical ernanhughes/inference checkout at a pinned commit, and separates what
the source documents, what the command printed, and what the demonstration does
not establish.
Most pages use a CPU-only, dependency-light path: the standard library, NumPy or
PyTorch. A few use a cached GPT-2 checkpoint or tokeniser; those pages say so in
Run it. The advanced backend and provider pages do not require a paid API or
a hosted service. Where an external engine, GPU kernel, provider call or
independent reproduction was not run, the page says NOT_RUN instead of turning
absence into a result. These are teaching demonstrations, not replacements for
the book’s recorded experiments or for the repository’s evidence register.
Loading examples…