Programmer.ieTechnical library for the AI era
  • Home
  • Books
  • Examples
  • Solutions
  • Learn
  • Prompts
  • Articles
  • Search
  • About
English简体中文
Example library

Inference From First Principles examples

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.

All examples

Loading examples…

Programmer.ie

Technical library for the AI era

Understand what is changing. Learn how it works. Use it.

© 2026 Ernan Hughes
  • Home
  • Books
  • Examples
  • Solutions
  • Learn
  • Prompts
  • Articles
  • Search
  • About