Commit Graph

10620 Commits

Author SHA1 Message Date
Zeljko Hrcek
ae2ef83dd3 Merge branch 'feature/book-volumes' into fix/training 2026-02-21 09:54:24 +01:00
Zeljko Hrcek
403994ea2e Update training chapter and add missing color definition 2026-02-21 09:28:04 +01:00
Vijay Janapa Reddi
09602445de chore: update book content, config, appendices, and tooling
- Vol1: chapter updates across backmatter, benchmarking, data, frameworks, etc.
- Vol2: content updates, new appendices (assumptions, communication, fleet, reliability)
- Quarto: config, styles, formulas, constants
- Add SEMINAL_PAPERS_V2.md, learning_objectives_bolding_parallel.sh
- VSCode extension: package.json, chapterNavigatorProvider
- Landing page and docs updates
2026-02-20 18:55:24 -05:00
Vijay Janapa Reddi
b5a9e590db Standardizes P.I.C.O. code blocks and consolidates specifications across Volume 2
Audits and refactors Volume 2 chapters to ensure all Python calculation cells adhere to the P.I.C.O. (Parameters, Invariants, Calculation, Outputs) standard.

- Consolidates storage specifications and economics into StorageSetup and StorageEconomics classes in data_storage.qmd.
- Refactors collective communication math into the AllReduceCost class in collective_communication.qmd.
- Standardizes infrastructure and performance engineering setups in compute_infrastructure.qmd and performance_engineering.qmd.
- Corrects NameErrors and missing imports in benchmarking and platform ROI calculations.
- Ensures all prose variables are correctly exported and scoped within Safe Class Namespaces to prevent global pollution and ensure mathematical consistency across the fleet-scale narrative.
2026-02-20 16:53:20 -05:00
Vijay Janapa Reddi
abc7ef01d8 Fixes broken P.I.C.O. code blocks and missing imports across Volume 1
Audits all Volume 1 chapters to identify and repair structural errors in Python calculation cells introduced during the P.I.C.O. refactor.

- Consolidates redundant memory calculations and fixes missing imports in nn_computation.qmd.
- Refactors AttentionMemory in nn_architectures.qmd to resolve NameErrors and duplicated blocks.
- Cleans up QuantizationSpeedup and restores MobileNetCompressionAnchor in model_compression.qmd.
- Resolves missing Models and Hardware imports in benchmarking.qmd.
- Updates LighthouseModels in ml_systems.qmd with missing variables for MobileNet and KWS.
- Corrects indentation and structural integrity across all Volume 1 calculation scenarios to ensure valid rendering and mathematical consistency.
2026-02-20 15:43:42 -05:00
Vijay Janapa Reddi
69f46d4f7e Clarifies memoization computation savings
Refines the explanation of K,V computation savings in the memoization module,
quantifying redundant computations and highlighting the efficiency gain.

The paper and module now specify that generating 100 tokens requires 5,050
total K,V computations, but only 100 are necessary, resulting in 4,950
redundant calculations.
2026-02-19 17:59:10 -05:00
github-actions[bot]
68167c3d1b docs: add @Pratham-ja as tinytorch contributor for doc 2026-02-19 22:43:52 +00:00
Vijay Janapa Reddi
0eec623b70 Merge pull request #1183 from Pratham-ja/bugfix/fix-ascii-graphs
Improve activation graph visualization in Module 02
2026-02-19 17:40:09 -05:00
unknown
5f7a696077 Improve activation graph visualization in Module 02
- Clarify node labeling
- Improve spacing for readability
- No API changes
2026-02-20 03:48:10 +05:30
Vijay Janapa Reddi
b6b2c94988 Refactors Volume II content and structure
Restructures Volume II to improve narrative flow and address scale impediments, including reordering of sections and addition of introductory material.

Introduces "Master Map" to guide readers through the volume's layered progression.

Adds callout notes to bridge concepts between sections.

Moves references.qmd to backmatter and adjusts chapter organization for clarity.

Updates hardware parameterization and network performance modeling within code blocks.
2026-02-19 14:39:54 -05:00
Vijay Janapa Reddi
45f46ad70d Reinforces key concepts with concrete examples
Deepens understanding of abstract principles by adding concrete examples and numerical anchors.

These additions provide tangible context and illustrate the practical implications of the discussed concepts, which aids in comprehension and application. It also adds context to constraints, economics and performance.
2026-02-19 14:35:48 -05:00
Vijay Janapa Reddi
13b29eb0ea Refactors concept maps for volume 1 chapters
Updates concept map YAML files for various chapters in volume 1, including introduction, benchmarking, data engineering, data selection, frameworks, hardware acceleration, ML systems, MLOps, ML workflow, model serving, NN architectures, NN computation, optimizations, responsible engineering, and training.

Replaces the old YAML structure with a new structure that focuses on primary, secondary concepts, technical terms, methodologies, and formulas. The change emphasizes the core concepts and their relationships within each chapter. The generated dates are updated to reflect a future date.
2026-02-19 13:49:04 -05:00
Vijay Janapa Reddi
e11ad3d44c Strengthen Vol1 intellectual spine with nine micro-insertions across 12 chapters
Insert thesis declarations, spine reconnections, and evidence elevations
that make the book's central claim explicit: ML systems engineering is a
distinct discipline governed by permanent physical laws. No restructuring
or deletions; insertions only, matching the surrounding rhetorical register.
2026-02-19 13:03:05 -05:00
Vijay Janapa Reddi
9942b21fb3 fix: remove ngbolin from book contributors (was incorrectly added by re-triggered bot)
ngbolin was correctly added to tinytorch (PR #1180) but the edited-comment
re-trigger on PR #1181 ran the old LLM code which hallucinated ngbolin as
the username instead of pipme.
2026-02-19 12:58:40 -05:00
Vijay Janapa Reddi
b6bd4adfcc fix: correct @pipme username (was misspelled as pipmea by LLM bot) 2026-02-19 12:51:52 -05:00
github-actions[bot]
6d9095d021 Update contributors list [skip ci] 2026-02-19 17:08:12 +00:00
Vijay Janapa Reddi
2bdebdae22 merge: bring workflow fix from main (regex username extraction) 2026-02-19 12:05:33 -05:00
Vijay Janapa Reddi
7a5da798dd fix(ci): extract contributor username via regex instead of LLM
The LLM (llama3.1:8b) was hallucinating usernames — e.g. returning
"pipmea" instead of "pipme". Since the username is always present as
an @mention in the trigger line, extract it deterministically via regex
in Step 1 and only use the LLM to classify contribution types.
2026-02-19 12:05:23 -05:00
github-actions[bot]
7c2a6d6a0a docs: add @ngbolin as book contributor for doc 2026-02-19 17:03:30 +00:00
RinZ27
7d2cd5a47d Improve robustness of dataset extraction by validating paths 2026-02-19 22:57:20 +07:00
Vijay Janapa Reddi
717dcebc31 Consolidate bib files and rename responsible_engineering to responsible_ai
- Remove 17 empty per-chapter .bib files (all contained only newlines)
- Consolidate HTML and EPUB configs to use central backmatter/references.bib
  (matching the pattern already used by PDF configs and Vol1)
- Rename responsible_engineering/ to responsible_ai/ for consistency with
  robust_ai/ and sustainable_ai/ in Part IV: The Responsible Fleet
- Update all 4 Quarto config files with new path
2026-02-19 09:39:07 -05:00
Vijay Janapa Reddi
3c40d1288b Restructures Vol2 from 5-part/19-chapter to 4-part/16-chapter Fleet Stack architecture
Major structural reorganization of Volume II:
- New 4-part structure: The Fleet, Distributed ML, Deployment at Scale, The Responsible Fleet
- Fleet Stack framework (Infrastructure/Distribution/Serving/Governance) replaces Systems Sandwich
- Renamed and reorganized 8 chapter directories to match new structure
- Absorbed ai_good/ into responsible_engineering and emerging_challenges/ into introduction
- Wrote/expanded 6 new chapters (collective_communication, compute_infrastructure,
  fleet_orchestration, network_fabrics, data_systems, performance_engineering)
- Fixed 116+ broken @sec- cross-references across all 16 chapters and glossary
- Updated all 4 Quarto config files, part-openers, and summaries.yml
- Added \mlfleetstack LaTeX command for PDF rendering
- Removed old 5-part HTML artifacts and macOS resource fork files
- Converted grid tables to pipe tables in fleet_orchestration
- Fixed inline Python in display math blocks in collective_communication
- Resolved duplicate tbl-tco-comparison label and stale part key reference
2026-02-19 09:35:37 -05:00
github-actions[bot]
a8b3e3a29c docs: add @pipmea as book contributor for doc 2026-02-19 14:10:55 +00:00
Vijay Janapa Reddi
d061df5a75 Merge pull request #1181 from pipme/patch-1
Fix PDF download link in README.md
2026-02-19 09:07:42 -05:00
pipme
24fb275abd Fix PDF download link in README.md 2026-02-19 15:15:10 +02:00
Vijay Janapa Reddi
739b48622f Add war story callout with proper icon formats and supporting files
- Add war story callout definition in custom-numbered-blocks.yml
- Create war story icon in all three formats (SVG, PNG, PDF) matching
  the 64x64 stroke-only style used by all other callout icons
- Add war story bibliography and PDF config entry
- Add first war story ("The Quadratic Wall") in nn_architectures
- Include icon conversion utility script
2026-02-19 07:38:16 -05:00
Salman Muin Kayser Chishti
07d2751b6a Upgrade GitHub Actions to latest versions
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-19 09:20:11 +00:00
Salman Muin Kayser Chishti
4cf7a3aca8 Upgrade GitHub Actions for Node 24 compatibility
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-19 09:19:52 +00:00
Vijay Janapa Reddi
15f7e139a7 Clean up Vol1 manuscript: fix code conventions, cross-refs, and formatting
- Fix quiz filenames in 4 chapters (footnote_context -> chapter-specific)
- Replace raw _value variables in prose with formatted _str versions
- Add missing engine: jupyter in ml_ops and responsible_engr YAML
- Remove debug comments in nn_computation, translate Serbian TikZ comments
- Fix fairness figure label mismatch (96% -> 91%) in responsible_engr
- Replace hardcoded placeholder strings with computed values in ml_systems
- Fix cross-ref issues: "DL Primer" -> @sec- ref, "Part II" -> "Part I"
- Fix duplicate latency-budget-calc label, "dotted" -> "dashed" arrow
- Normalize magnitude references (seven orders), fix table spacing
- Clean up truncated comment blocks in data_selection
- Remove internal authoring HTML comment in hw_acceleration
2026-02-18 17:28:31 -05:00
Vijay Janapa Reddi
5c45391557 Refactors Distributed Training chapter for Systems Sandwich alignment
Aligns the Distributed Training chapter with the Volume 2 'Systems Sandwich'
framework, establishing it as the 'Operational Layer' of the Machine Learning Fleet.

Key changes:
- Refactors 'Purpose' and 'Learning Objectives' to use rhetorical pivots and
  focus on the 'Physics of the Fleet'.
- Updates Python setup cell to use the 'Safe Class Namespace' pattern (P.I.C.O.)
  and adds Archetype A (GPT-4) constants.
- Rewrites 'Multi-Machine Scaling Fundamentals' to center on the
  'Communication-Computation Ratio' and the 'Law of Distributed Efficiency'.
- Cross-references the Volume 2 Introduction definitions to create a cohesive narrative.
2026-02-18 15:25:00 -05:00
Vijay Janapa Reddi
ede45403c3 Refactors Volume 2 Introduction for alignment with Volume 1 Gold Standard
Aligns the rhetorical style and quantitative rigor of the Volume 2
Introduction with the established Volume 1 standards.

Introduces the "Machine Learning Fleet" narrative as the central
engineering challenge of Volume 2, shifting from single-node
optimization to cluster-scale orchestration.

Key changes:
- Establishes the "Law of Distributed Efficiency" and "CI Ratio"
  (Communication Intensity) as new quantitative frameworks.
- Defines the "Reliability Gap" to address statistical failure
  certainty in massive clusters.
- Refactors all TikZ diagrams (Systems Sandwich, Roadmap, AI Triad)
  to use project-standard colors and Helvetica font.
- Updates the "Lighthouse Archetypes" to focus on throughput,
  latency, and resource-bound fleet challenges.
- Implements P.I.C.O. math patterns for fleet-scale calculations.
2026-02-18 15:20:33 -05:00
github-actions[bot]
6a28376b0a 🔥 TinyTorch tinytorch-v0.1.9: Content updates and improvements tinytorch-v0.1.9 2026-02-18 00:03:13 +00:00
github-actions[bot]
f655cdfbba chore(tinytorch): bump version to tinytorch-v0.1.9 2026-02-18 00:02:21 +00:00
Vijay Janapa Reddi
85c60b5935 Refactors framework evolution section
Renames and restructures the framework evolution section to
"The Ladder of Abstraction," emphasizing the problem-solving
nature of each abstraction layer.

Clarifies the role of each layer (BLAS/LAPACK, NumPy,
Deep Learning Frameworks) in solving specific problems related
to performance, usability, and differentiation, respectively.

Highlights the trade-offs between productivity and transparency
as we move up the abstraction ladder.
2026-02-17 18:49:49 -05:00
github-actions[bot]
d69a8d6f1d docs: add @sotoblanco as tinytorch contributor for doc 2026-02-17 23:43:01 +00:00
Vijay Janapa Reddi
1ecc918c73 Merge dev: fix notebook filename convention in docs and Binder (fixes #1176) 2026-02-17 18:36:50 -05:00
Vijay Janapa Reddi
f729e28d81 Merge feature/tinytorch-core: fix notebook filename convention in docs and Binder 2026-02-17 18:36:41 -05:00
Vijay Janapa Reddi
850a91adc6 fix(docs): align notebook filenames with tito convention across all docs
Notebooks use short names (tensor.ipynb, not 01_tensor.ipynb) but docs
and Binder postBuild scripts used the prefixed form. This caused broken
Binder links and incorrect paths in troubleshooting guides.

Fixes: harvard-edge/cs249r_book#1176
2026-02-17 18:31:44 -05:00
Vijay Janapa Reddi
336f03e1c0 fix(site): update notebook filename in getting-started guide 2026-02-17 18:19:58 -05:00
Vijay Janapa Reddi
e7f9223680 feat(site): convert all 20 ABOUT.md files to MyST notebooks with computed values
Replace hardcoded numerical values across all module ABOUT.md files with
Python-computed values using myst_nb glue() references. Each file is now a
MyST Markdown Notebook that executes inline code cells to compute memory
sizes, FLOPs, compression ratios, and other quantitative values.

Key changes:
- Add file_format: mystnb frontmatter and code-cell blocks to all 20 files
- All arithmetic (memory calculations, speedups, ratios) now computed inline
- Fix multiple arithmetic errors discovered during conversion
- Enable execute_notebooks: "cache" in PDF config for glue resolution
- Fix jupyter-book version constraint in Makefile
2026-02-17 18:11:31 -05:00
Vijay Janapa Reddi
672eee9618 fix(pdf): cap Mermaid figure sizes and fix nested code fences
Mermaid diagrams were oversized in PDF output. Reduced viewport width
from 800→600 and added LaTeX preamble to cap mermaid figures at
0.75\linewidth. Also fixed 7 admonition blocks across 5 ABOUT.md files
where nested triple-backtick code fences broke the MyST parser, causing
raw markdown to render in PDF output.
2026-02-17 15:15:56 -05:00
Vijay Janapa Reddi
3a633df41e Merge feature/tinytorch-core: site improvements, PDF build fixes, minor cleanups 2026-02-17 13:53:41 -05:00
Vijay Janapa Reddi
c13c4c6b9c fix: align MLPerf box-drawing in benchmarking module, set tree indent
- Fix misaligned ASCII art in Module 19 benchmark architecture diagram
- Set default workbench.tree.indent to 16px in VS Code extension
2026-02-17 13:53:32 -05:00
Vijay Janapa Reddi
e0f910ae5b style(site): improve navbar responsiveness and version badge layout
- Responsive progressive disclosure: hide date at 1024px, icons-only at 768px
- Add 44px touch targets for mobile nav links
- Restyle version badge with separate number/date spans
- Add link-secondary class for visual hierarchy in navbar
2026-02-17 13:53:26 -05:00
Vijay Janapa Reddi
2b27429892 fix(site): PDF build improvements and community section
- Add npx pre-flight check for Mermaid CLI in PDF build
- Configure mermaid_cmd to use npx (no global install needed)
- Add Unicode box-drawing fallbacks for LaTeX
- Add Community section to PDF table of contents
2026-02-17 13:53:18 -05:00
Vijay Janapa Reddi
088eaa3e18 Merge dev: VS Code thin client over Tito CLI + notebook editor 2026-02-17 12:36:22 -05:00
Vijay Janapa Reddi
9d45832910 Merge feature/tinytorch-core: VS Code thin client + notebook editor fix 2026-02-17 12:36:06 -05:00
Vijay Janapa Reddi
9cee0e9b83 fix(vscode-ext): open notebooks in interactive editor instead of raw JSON
Use vscode.openWith(uri, 'jupyter-notebook') for .ipynb files so they
render in VS Code's notebook editor with cell support, rather than
opening as raw JSON text via openTextDocument.
2026-02-17 12:35:42 -05:00
Vijay Janapa Reddi
672a35335f feat(vscode-ext, tito): make extension a thin client over Tito CLI
The VS Code extension no longer implements any business logic — every
capability (module discovery, path resolution, system info, builds,
tests, clean) lives in Tito CLI commands. The extension is a pure UI
shell that delegates via `python3 -m tito.main`.

Tito CLI additions:
- `module list --json` for machine-readable module discovery
- `module path <num> --notebook|--source|--about` for file resolution
- `system info --json` for environment info
- `dev build html|serve|pdf|paper` wrapping make targets
- `dev clean [all|site]` wrapping make clean
- Banner suppression for --json and module path output

Extension hardening:
- Centralized CLI integration in utils/tito.ts (single TITO_CMD constant,
  callTito, callTitoJson, titoTerminalCommand, isTitoAvailable, log/logError)
- Replaced all silent catch{} blocks with logged errors and user feedback
- Module tree shows error/empty states with actionable Setup/Health buttons
- Info tree shows "Tito CLI unavailable" when CLI is unreachable
- Removed all setTimeout refresh hacks — file watcher on .tito/progress.json
  is the sole refresh mechanism
- Exit code tracking via onDidEndTerminalShellExecution
- Tito availability pre-flight check on activation
- BUILD_OUTPUTS constants for build artifact paths
- Zero execSync calls outside tito.ts, zero hardcoded command strings
2026-02-17 10:08:00 -05:00
Vijay Janapa Reddi
21debc2adf Merge dev: TITO doc fixes and version badge 2026-02-16 14:31:02 -05:00