23 Commits
Author SHA1 Message Date
Vijay Janapa Reddi b21b416b24 style(book): remove manual pagebreaks and eliminate margin layout defects
Remove 36 manual page breaks across all chapters to restore continuous text flow, reposition margin cards and figures to eliminate bottom overflows and collisions, and add contact sheet generation tool for multi-page visual verification.
2026-09-30 20:40:41 -04:00
Vijay Janapa Reddi abff1562fa TinyTorch 0.2.0: From Tensors to Transformers
Release-hardening and transformer-era release of TinyTorch, audited as one
tree. This commit brings tinytorch/ and the TinyTorch CI workflows to the
state of the audit/tinytorch-release branch, where the individual changes
are recorded commit by commit.

- Milestones: transformer-era parts (TinyGPT, sequence routing, TinyCopilot,
  conversational Q&A), Milestone 06 "MLPerf to Generative Serving (2018)",
  Milestone 07 kernels; per-part recording; NumPy-referenced losses and
  causality, attention-content and position probes; try-it prompts after a
  pass.
- Framework: dropout eval mode, target gradients, float32 stays float32,
  layer validation, LoRA adapters.
- tito: loopback login callback with a state nonce, consented progress sync,
  TLS-verified update check, Ctrl-C after a pass keeps the pass.
- Grading: graded tests compare values against NumPy references; tests that
  could not fail now check something.
- CI: the publish preflight runs its tests and ships the commit it tested;
  workflow inputs pass through env; third-party actions pinned.
- Guide and book: read line by line against the code; every demo is a real
  recording.

See tinytorch/CHANGELOG.md, section 0.2.0.
2026-09-29 21:53:23 -06:00
Vijay Janapa Reddi 152a79e7e0 Add fractal sub-branches to the extension ports 2026-09-22 21:16:10 +02:00
Vijay Janapa Reddi 194151e6d6 Adjust expansion port arrow spacing to clear Capstone subtitle text 2026-09-22 21:13:54 +02:00
Vijay Janapa Reddi 32d27c1851 Simplify cover by removing cluttered PyTorch ecosystem and Community Labs text 2026-09-22 21:10:22 +02:00
Vijay Janapa Reddi b46e402394 Route cover expansion ports into a final PyTorch ecosystem node 2026-09-22 21:03:34 +02:00
Vijay Janapa Reddi 83baf60ec6 Fix cover label overlap with circuit bus 2026-09-22 21:02:41 +02:00
Vijay Janapa Reddi f5122110b0 Revert cover to 20 modules and add expansion ports to Capstone 2026-09-22 20:29:50 +02:00
Vijay Janapa Reddi 7b2a452171 Update cover and subtitle to include Systems Extensions (Module 21) 2026-09-22 20:23:57 +02:00
Vijay Janapa Reddi 21d7cb94c4 fix(tinytorch): enforce explicit UTF-8 across test suites, SIMD ops, and book tools
- Add encoding='utf-8' to module file reads in test_module_integration, test_training_edge_cases, and test_backward_boundaries
- Add encoding='utf-8' to CLI test fixtures (test_completion_certification, test_progressive_integration_selection, test_community_flow, test_live_submission, test_user_journey)
- Add encoding='utf-8' and errors='replace' to SIMD compiler subprocess and book tools
- Add encoding='utf-8' to Jupyter PID file read/write in workflow.py
2026-09-22 12:35:54 +02:00
Vijay Janapa Reddi a2c6239773 Consolidate Milestone 05 and Milestone 07 into 6-milestone curriculum
- Merge Milestone 07 (TinyGPT on Shakespeare) into Milestone 05 (The Transformer Era), establishing TinyGPT as the primary demonstration and attention sequence routing as Part 2.
- Restore strictly monotonic numerical unlocking: Module 03 (01, 02), Module 08 (03), Module 09 (04), Module 13 (05), and Module 19 (06).
- Update Tito CLI milestone runners, achievement highlights, alias routing, and checkpoint definitions.
- Update book narrative, listings, Quarto guide pages, alternating interactive timeline, and test suites.
2026-09-21 15:41:04 +02:00
Vijay Janapa Reddi a2390a0294 Align milestone architecture with MLPerf benchmark and basic transformer 2026-09-21 09:41:21 +02:00
Vijay Janapa Reddi ace82ec6c0 Refine cover tagline vertical baseline and spacing 2026-09-21 08:59:10 +02:00
Vijay Janapa Reddi 59ccc61724 Update chapter openings with 4-beat PyTorch deconstruction and redesign cover
- Standardize opening sections of all 24 book chapters to the 4-beat
  PyTorch deconstruction pattern (Standard PyTorch, The Illusion,
  The Engineering Reality, The Contract).
- Redesign book cover in Swiss Modernist ETH Light palette with centered
  Tiny🔥Torch wordmark, monospace inline code tagline, and 20-module
  snaking runtime bus terminating in TinyGPT.
- Update book metadata and regenerate publication assets.
2026-09-21 08:53:48 +02:00
Vijay Janapa Reddi 663a4211d7 book: add pedagogical SVG diagrams and harmonize code listings 2026-09-20 09:50:08 +02:00
Vijay Janapa Reddi 021a918e2e Document col2im and the im2col backward pass on the page and in chapter 17
The module page drops 'not building col2im', shows the trainable call, and
lists the two failure messages a student will hit. Chapter 17 derives the
three gradients, quotes col2im and Im2colConv2dFunction.backward, reports
the measured training-step speedup, and replaces the write-col2im exercise
with one on recomputing the patch matrix instead of saving it.
2026-09-18 13:47:45 +02:00
Vijay Janapa Reddi 1aad46c29c Document Module 17's im2col on its page and in book chapters 9 and 17
The module page lists the new objective, the pattern, the prerequisite on
Conv2d, and the two failure messages a student will actually hit. Chapter
17 quotes im2col and im2col_conv2d, contrasts the offset loop with chapter
9's per-position model, traces the 3x3 example, reports the measured
speedups, and adds a col2im exercise. Chapter 9 points forward to it.
2026-09-18 12:50:48 +02:00
Vijay Janapa Reddi f8543e8a3e Rewrite book chapter 21 around the extensions TinyTorch ships
The chapter promised graph capture, systolic arrays, and Ring-AllReduce,
none of which TinyTorch implements. It now walks tinytorch.extensions:
the C++ kernels called through ctypes, the Triton fused bias + GELU, and
the Apple GPU matmul through MPS, quoting the real code and measuring
each against NumPy on one machine (M5 Max): compiled and vectorized C++
is 170x Python and still 75x slower than np.matmul; fusion only pays once
the tangent is vectorized; MPS breaks even near n=1024.

- listings.py quotes C/C++ functions by name and defs nested under an if.
- simd_ops builds with -fveclib=Accelerate on macOS so std::tanh
  vectorizes (fused GELU 22.1 ms -> 3.1 ms on 4096x768).
- New extension-paths figure; margin cards no longer name a nonexistent
  src/21_extensions/ or systolic TPUs.
- Preface, roadmap, part title, cross-chapter pointers, the Optimization
  tier page, and INSTRUCTOR.md describe the chapter as it now is.
2026-09-18 12:07:36 +02:00
Vijay Janapa Reddi 9ccf4a2491 tinytorch book: Milestone II covers the CNN and attention milestones
Milestone II was written around training TinyGPT on prose, which no
course script does; the attention milestone the course runs appeared
only as a side section, and the CNN milestone not at all. The chapter
now runs in three parts:

1. Convolution on TinyDigits: SimpleCNN.forward quoted from the
   script, parameter and multiply-accumulate counts, a matched-budget
   comparison with Milestone I's MLP (the MLP matches or beats it at
   20, 50, and 100 epochs), the 32x32 arithmetic where convolution's
   parameter advantage binds, and the measured 87x per-epoch cost of
   Module 09's Python loops.
2. Attention on structured sequences: the reversal/copy/mixed tasks,
   measured results over six runs (2, 2, and 4 epochs to threshold),
   and why fixed permutations are easy while prefix-conditioned
   routing is the real test.
3. Generation with TinyGPT, unchanged, because Part III's profiling,
   KV-cache, and capstone chapters build on it.

Summary, exercises, and the welcome roadmap row follow suit.
2026-09-18 10:06:25 +02:00
Vijay Janapa Reddi a7c0e89a84 feat(tinytorch): give the book its own cover
The book and the lab guide shipped byte-identical cover art
(c4d795ca...), and that art is really the guide's: its tagline, "Don't
just import torch. Build it.", is the guide's subtitle.

Worse, the art's two subtitle lines, "The xv6 of Machine Learning
Systems" and "From Tensors to Systems Acceleration", match neither
artifact's current title. They predate the retitle in 1770d8ea2d, so
the book has been shipping a cover that contradicts its own title page.

The new cover carries the book's own title and subtitle in the brand
palette from guide/pdf/_quarto.yml: navy field against the guide's
white, the flame mark, and the twenty modules laid out as the four
tiers with the capstone accented. It is generated from
book/tools/build_cover.py rather than exported from a design tool, so
the next retitle is an edit to a source file instead of a re-export
nobody can reproduce.

The guide's cover is untouched.
2026-09-17 13:18:24 +02:00
Vijay Janapa Reddi 53b8f58224 refactor(tinytorch): rename quarto directory to guide and update all ecosystem references 2026-09-16 22:13:23 +02:00
Vijay Janapa Reddi 1770d8ea2d feat(book): retitle subtitle to From Tensors to Transformers 2026-09-16 15:48:47 +02:00
Vijay Janapa Reddi 65c716cece refactor(tinytorch): rename narrative_book to book 2026-09-16 15:01:46 +02:00