Commit Graph

10330 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
4d62bfe9ae Fix bibtex formatting (pre-commit auto-fix) 2026-02-03 23:53:25 -05:00
Vijay Janapa Reddi
cb6f93aee9 Update chapters with physx refactoring and cleanup
- Remove deprecated utility scripts (audit_references.py, scan_styling.py)
- Remove PRODUCTION_FIGURE_ERRATA.md
- Add STATUS.md for tracking chapter completion
- Update all vol1 chapters with physx constants/formulas integration
- Update references.bib with new citations
- Update physx/README.md documentation
- Update header-includes.tex
- Minor updates to frontmatter and vol2 content
2026-02-03 23:51:46 -05:00
Vijay Janapa Reddi
f40eb88879 Fix CLI config fallback and ml_systems chapter issues
CLI changes:
- Fix default PDF/EPUB config paths to use vol1 configs instead of
  non-existent combined configs (_quarto-pdf.yml -> _quarto-pdf-vol1.yml)

ml_systems.qmd fixes:
- Fix bottleneck_str formatting (value is already a string, not a number)
- Fix malformed imports where 'from physx.formatting import fmt' was
  incorrectly placed inside parentheses of another import block
- Fix Quarto cell directives placement (must come before any code)
- Fix precision=0 rounding 0.1 to 0 for energy values
- Update notation to use proper LaTeX subscripts ($D_{vol}$, $E_{tx}$, etc.)
2026-02-03 23:50:55 -05:00
github-actions[bot]
1a80e57fa0 docs: add @AndreaMattiaGaravagno as book contributor for code 2026-02-04 03:25:37 +00:00
Vijay Janapa Reddi
819ed75bc1 Merge pull request #1151 from AndreaMattiaGaravagno/feature/step-by-step-milestone-visualization
feat: add step-by-step visualization to milestones
2026-02-03 22:21:46 -05:00
github-actions[bot]
a33d600fbd docs: add @AndreaMattiaGaravagno as tinytorch contributor for code 2026-02-04 03:20:48 +00:00
Vijay Janapa Reddi
3e3a635a70 Merge pull request #1152 from AndreaMattiaGaravagno/fix/milestone-frame-alignment
fix(tito-milestone): align bold cyan frame
2026-02-03 22:17:26 -05:00
Vijay Janapa Reddi
d596c3bb0f Merge pull request #1153 from harvard-edge/fix/auto-label-permissions
fix(ci): auto-label permissions for fork PRs
2026-02-03 22:08:38 -05:00
Vijay Janapa Reddi
83a3ce3712 fix(ci): use pull_request_target for auto-label write permissions
Fork PRs downgrade GITHUB_TOKEN to read-only, causing 403 when
applying labels. pull_request_target runs in the base repo context
and grants the declared write permissions.
2026-02-03 22:08:20 -05:00
Vijay Janapa Reddi
05a184459d Refactors code to use constants and formulas
Replaces hardcoded numerical values with symbolic Python variables derived from defined constants and formulas.

This improves code maintainability and consistency, ensuring calculations are based on accurate and up-to-date physical values.
2026-02-03 19:48:11 -05:00
Vijay Janapa Reddi
fc1321ff85 Removes old viz.py and replaces with import shim
The visualization helpers have been moved to the physx library. This commit removes the old viz.py file and replaces it with a backward-compatibility shim that imports the visualization helpers from physx.viz. This ensures that the Quarto build tooling can continue to use the visualization helpers without modification.
2026-02-03 19:46:04 -05:00
Vijay Janapa Reddi
3a78d66a21 Refactors calculations into physx library
Organizes quantitative calculations into a dedicated `physx` library, for improved code organization and maintainability.

- Moves calculation logic, constants, and formatting helpers.
- Updates chapters to import from the `physx` library.
- Adds pre-commit hooks for inline reference and unit validation.
- Deletes obsolete inline Python calculation validation files.
2026-02-03 19:45:50 -05:00
Vijay Janapa Reddi
7665a3662c Merge feature/tinytorch-core: team page, slide viewers, site-only deploy 2026-02-03 15:41:19 -05:00
Vijay Janapa Reddi
05500f6bc2 refactor(workflow): add site_only option to TinyTorch publish workflow
Instead of a separate workflow, adds a 'site_only' boolean checkbox
to the existing Publish (Live) workflow. When checked:
- Skips version bump (pyproject.toml, badges, installer, announcement)
- Skips PDF generation
- Skips tag creation and GitHub Release

The build & deploy steps still run identically. One workflow, two modes.
Removes the previously added tinytorch-deploy-site-only.yml.
2026-02-03 14:26:14 -05:00
Vijay Janapa Reddi
a143385f86 feat(workflow): add website-only deploy for TinyTorch (no version bump)
Adds a new workflow 'TinyTorch · 🌐 Deploy Site Only' for deploying
website content updates without triggering version bumps, tags, or
releases. Ideal for:
- Typo fixes
- Team page updates
- CSS/styling changes
- Documentation updates

Use 'Publish (Live)' for versioned releases, 'Deploy Site Only' for
quick website-only updates.
2026-02-03 14:22:40 -05:00
AndreaMattiaGaravagno
668a50af87 feat: add step-by-step visualization to milestones 2026-02-03 19:42:21 +01:00
Vijay Janapa Reddi
30a267a793 feat(site): add Team page and reorganize Community section
- Add new Team page featuring core staff and contributors
- Vijay Janapa Reddi (Nerdy Professor), Andrea Garavagno (Tech Lead),
  Kari Janapareddi (Chief of Staff), Kai Kleinbard (Web Wizard)
- Display community staff side-by-side with fun role titles
- Move Acknowledgments to separate page for MiniTorch/micrograd credits
- Add contributor generator script for future automation
- Update navigation: Team → Ecosystem → Acknowledgments
2026-02-03 13:41:10 -05:00
Vijay Janapa Reddi
0c7509ff35 feat(site): add embedded PDF slide viewer to all module pages
Replace the slide download card with an inline PDF viewer using PDF.js:
- Change grid layout from 4 cards (2x2) to 3 cards in a row
- Add embedded slide viewer with navigation, zoom, and fullscreen
- Load slides from local _static/slides/ for reliable CORS handling
- Add "· AI-generated" subtitle to match audio card pattern
- Use 🔥 icon consistently across all viewers

Affected: 20 module ABOUT.md files + big-picture.md
2026-02-03 12:06:52 -05:00
Vijay Janapa Reddi
e8ffd090e3 fix(paper): normalize BibTeX escaping in references.bib
Standardize LaTeX accent escaping and ampersand formatting for
consistency across bibliography entries.
2026-02-03 10:23:51 -05:00
Vijay Janapa Reddi
5a57eb7208 Apply MIT Press prose polish to all Vol1 chapters
Run the full MIT Press editorial pipeline (section-processor, stylist,
editor, narrative-flow-analyzer) on all 16 teaching chapters:

- introduction, ml_systems, dl_primer, dnn_architectures
- data_engineering, data_selection, frameworks, training
- model_compression, hw_acceleration, benchmarking, workflow
- serving, ops, responsible_engr, conclusion

Changes include:
- Fix contractions (do not, cannot)
- Replace em dashes with appropriate punctuation
- Remove AI writing patterns
- Tighten wordy constructions
- Remove redundant sentence openers
- Vary repetitive paragraph structures
- Fix spacing and punctuation consistency

All chapters passed narrative flow verification with no critical issues.
2026-02-03 08:35:43 -05:00
Vijay Janapa Reddi
8bdaf339ae Standardizes copyedit PDF font size
Ensures copyedit PDFs use the same font size as regular PDFs.

Increases float capacity for copy-edit mode to accommodate double-spacing and prevent potential layout issues.

Copies the base configuration file by first removing any existing symbolic link to prevent errors.
2026-02-03 07:14:37 -05:00
AndreaMattiaGaravagno
5f6a8468f3 fix(tito-milestone): align bold cyan frame and correct "Press Enter" color 2026-02-03 12:24:18 +01:00
Vijay Janapa Reddi
25d1dca02b Verify and correct calculations in Volume 1 chapters
- Corrected 'Cost of Real-Time' calculation in data_engineering.qmd (batch core hours).
- Corrected Python dispatch overhead, TensorRT speedup, and PCIe transfer times in frameworks.qmd.
- Corrected energy of training and efficiency ratio in dl_primer.qmd.
- Corrected matrix multiplication result vector in dnn_architectures.qmd.
- Corrected GPT-2 FLOPs estimates and formulas in training.qmd.
- Corrected Attention FLOPs formula in appendix_algorithm.qmd.
- Updated ridge point calculation comment in appendix_machine.qmd.
- Updated disparity string formatting in responsible_engr.qmd.
- Reverted variable replacements for historical dates/constants in dl_primer, dnn_architectures, ml_systems, and introduction chapters as per user request.
2026-02-02 22:18:51 -05:00
Vijay Janapa Reddi
8d2415e457 Updates chapter connection callout icon
Replaces the chapter connection callout icon with a revised SVG version.

The new icon features bolder strokes and larger chain link circles for improved visual clarity.
2026-02-02 16:10:08 -05:00
Vijay Janapa Reddi
d74a7a791f Update notation chapter, improve LaTeX infrastructure, and refine vol1 content
- Rewrite notation chapter with collision-resolution rationale and quick-reference table
- Fix foldbox.tex page-break spacing (remove forced font size, improve continuation margins)
- Make dropcap.lua robust to RawInline/index entries and non-standard PDF formats
- Add DAM Coordination (sum→max overlap) and Bottleneck Diagnostic table to appendix
- Add Bottleneck Diagnostic table to Part III Optimize principles intro
- Promote Iron Law analogy footnote to callout-perspective box in introduction
- Rename 'Napkin Math' callout labels to cleaner titles in serving/conclusion
- Inline SciPy footnote into figure caption in frameworks chapter
- Add Iron Law production monitoring callout in ops chapter
- Add Sorscher et al. 2022 to references.bib
- Fix TikZ coordinate ordering in training chapter memory chart
- Comment out non-intro chapters in PDF config for focused compilation
- Change vol2 scaling laws callout from callout-note to callout-theorem
2026-02-02 15:52:34 -05:00
Vijay Janapa Reddi
848dfff219 Reinforce 'AI Engineering' concept in Intro
- Connect 'ML Systems Engineering' practice back to 'AI Engineering' discipline in the Five-Pillar Framework section.
- Update Summary to explicitly frame the chapter's principles as the mandate of AI Engineering.
2026-02-02 15:35:49 -05:00
Vijay Janapa Reddi
097574b712 Refine Intro: Establish 'Physics of ML Systems' & reorder 'AI Engineering' definition
- Expand 'Purpose' to frame the book around the 'Physics of Machine Learning Systems' (system to silicon).
- Move 'Defining AI Engineering' section to follow 'The Efficiency Framework' for better narrative flow.
- Update 'Defining AI Engineering' to explicitly reference the four pillars (Bitter Lesson, Degradation Equation, Iron Law, Efficiency Framework).
- Convert 'Note on the Iron Law' callout to a footnote for cleaner reading.
- Streamline dimensional analysis explanation.
2026-02-02 15:33:40 -05:00
Vijay Janapa Reddi
6ef28c5cf3 fix: standardize Iron Law notation across vol1 chapters
Ensure consistent use of notation per notation.qmd conventions:
- $Ops$ → $O$ (Operations)
- $D$ → $D_{vol}$ when referring to data volume/memory movement
- $L_{\text{fixed}}$ → $L_{lat}$ (Latency overhead)

Files updated: frameworks.qmd, training.qmd, dnn_architectures.qmd,
dl_primer.qmd, optimize_principles.qmd, appendix_dam.qmd

Preserved correct usage of $D$ for dataset size (Kaplan scaling)
and statistical divergence contexts.
2026-02-02 14:19:50 -05:00
Vijay Janapa Reddi
a6e0c81380 Update vol1 chapters and add compilation continuum visualizations 2026-02-02 13:28:35 -05:00
Vijay Janapa Reddi
ecaad86587 Fix fenced-div warnings in frameworks chapter
- Remove orphan closing div at lst-forward_structure (both code blocks
  now properly contained in single listing)
- Add blank line before callout-example div to separate from \index{}
  commands (required for Quarto to recognize block-level fenced divs)
2026-02-02 11:58:52 -05:00
Vijay Janapa Reddi
7c0d3e401e Fix index placement issues and add auto-fix script
- Fix \index{} commands breaking rendering when placed before footnote
  definitions, div openers (:::), or on same line as headings
- Add check_index_placement.py script with --fix flag to automatically
  detect and fix these patterns
- Update training.qmd and data_engineering.qmd with corrected index placement
- Include other pending content and visualization updates
2026-02-02 10:39:04 -05:00
Vijay Janapa Reddi
0bf047e86a Add comprehensive index entries for MIT Press publication
Add 1,316 hierarchical index entries across all 16 chapters of Volume 1,
following professional indexing principles:

- Index concepts where explained, not just mentioned
- Use hierarchical structure: \index{Main!Sub!SubSub}
- Include cross-references: |see{} and |seealso{}
- Cover synonyms and alternate terminology for discoverability

Key coverage areas:
- Neural network fundamentals (neurons, activations, loss, backprop)
- Architectures (MLP, CNN, RNN, LSTM, Transformer, Attention, DLRM)
- Training (distributed, optimizers, mixed precision, checkpointing)
- Hardware (GPU/TPU, systolic arrays, memory hierarchy, roofline)
- Frameworks (PyTorch, TensorFlow, JAX, autodiff, computational graphs)
- Serving (latency, batching, KV cache, LLM metrics TTFT/TPOT)
- Operations (MLOps, drift detection, technical debt, monitoring)
- Compression (quantization, pruning, distillation, NAS)
- Responsible AI (fairness, privacy, explainability, carbon footprint)
2026-02-02 09:57:03 -05:00
Vijay Janapa Reddi
cf33bd591d style: apply pre-commit auto-formatting
- Format Python code blocks in frameworks.qmd
- Prettify pipe tables in hw_acceleration.qmd and serving.qmd
2026-02-02 08:19:17 -05:00
Vijay Janapa Reddi
727315a508 Removes content map and figure list
Removes the content map and figure list files, as they are no longer needed in the current build process.
2026-02-02 08:18:30 -05:00
Vijay Janapa Reddi
6d8d6812b0 Improve cross-references and add figure documentation
- Enhance cross-reference wording across all vol1 chapters for better
  readability (e.g., "see @sec-..." instead of bare references)
- Add index generation support via imakeidx in LaTeX headers
- Add FIGURE_LIST_VOL1.md with complete figure catalog (206 figures)
- Add content_map.json for figure/table tracking
2026-02-02 08:17:51 -05:00
Vijay Janapa Reddi
947b4d1aae Configures Volume 1 Quarto book structure
Configures the table of contents and appendix structure for Volume 1 of the book in the Quarto configuration file.

Specifically, uncomments the main content chapters to include them in the book build and moves the appendices configuration to a dedicated "appendices" section, ensuring proper appendix numbering.

Adds a citation for compiling machine learning programs.

Corrects minor errors and improves clarity in framework descriptions and hardware acceleration explanations.
2026-02-02 07:13:25 -05:00
Vijay Janapa Reddi
198dbc7c70 fix: add missing lst-detach-vs-data and lst-state_dict listings 2026-02-02 06:56:08 -05:00
Vijay Janapa Reddi
6685e76878 Reintroduces tables in the document
Reintroduces the accelerator economics and fusion benefits tables after accidental deletion. This ensures the completeness of the hardware acceleration chapter.
2026-02-02 06:54:03 -05:00
Vijay Janapa Reddi
8f8af7b368 chore: add testing logs to gitignore 2026-02-02 06:52:53 -05:00
Vijay Janapa Reddi
17ebb4f734 chore: remove testing logs from tracking 2026-02-02 06:51:35 -05:00
Vijay Janapa Reddi
baf420b0ce fix: resolve pre-commit hook issues and add figure accessibility
- Fix footnotes incorrectly breaking into definition text (appendix_machine, appendix_algorithm)
- Move forbidden footnotes out of callout divs (hw_acceleration, serving, training)
- Convert inline footnote info to inline text where appropriate
- Add fig-alt text to code-cell figures (dl_primer, hw_acceleration, serving, workflow)
- Add fig-cap and fig-alt to TikZ figures (distributed_training, introduction, edge_intelligence, networking, sustainable_ai)
- Fix hook ordering: Black formatter now runs before blank line collapse
- Move footnote definition outside TikZ div in frameworks.qmd
2026-02-02 06:49:30 -05:00
Vijay Janapa Reddi
42bc152f7d Fixes pgfplots dimension overflow in data_selection chapter
- Fixes fig-amortization-comparison: scales Y-axis values from 12000 to 12
  to avoid LaTeX dimension limit (~16383pt)
- Fixes fig-compute-optimal-frontier: replaces problematic \fill...plot
  with proper \addplot[fill=...] \closedcycle for log-scale coordinates
- Updates figure reference text to use @fig-selection-inequality
- Adds ch_data_selection.py calculation module
- Updates viz.py with new plot functions
- Various chapter updates across vol1 and vol2
2026-02-02 06:20:23 -05:00
Vijay Janapa Reddi
568bccd70e Refactors data viz to use Python
Migrates the data visualization code from R to Python for better maintainability and integration with other Python-based components.

This change streamlines the code, improves readability, and ensures consistency across the project.
2026-02-02 05:50:40 -05:00
Vijay Janapa Reddi
ebbff6cc22 Refactors TCO calculation for clarity
Updates the Total Cost of Ownership (TCO) calculation for enhanced readability and accuracy.

This includes clarifying variable names, improving the structure of calculations, and updating the display of financial and carbon impact metrics.
2026-02-02 05:50:10 -05:00
Vijay Janapa Reddi
ac3192010b Adds note clarifying TikZ color definitions location
TikZ colors are defined in YAML config files, not header-includes.tex.
This comment prevents future duplication.
2026-02-02 05:19:03 -05:00
Vijay Janapa Reddi
4a17faa9f6 Uncomments volume 1 table of contents
Makes all chapters and appendices visible in the
table of contents for Volume 1 of the book.
2026-02-02 05:16:20 -05:00
Vijay Janapa Reddi
83ab6c0350 Adds Jupyter engine metadata to Quarto files
Adds the `engine: jupyter` metadata to multiple Quarto files.

This ensures that these files are processed using the Jupyter engine when rendered by Quarto, enabling the execution of embedded code cells.
2026-02-02 05:12:09 -05:00
Vijay Janapa Reddi
6031d927e6 Updates callout icons to new color scheme
Updates the callout icons to use the new primary color scheme
for improved visual consistency across the book.
Specifically, updates the "chapter connection" icon to use the
new color. Also updates some pdf resources and fixes an issue
where some icons were duplicated.
2026-02-02 05:09:56 -05:00
Vijay Janapa Reddi
acfd3cbf77 Refactors benchmarking chapter for clarity
Enhances the benchmarking chapter by reformatting equations for improved readability and converting R plots to Python for consistency.

This change aims to present information in a clearer and more accessible manner, avoiding LaTeX rendering issues and promoting a unified code style. It focuses on improving the overall user experience and maintainability of the chapter.
2026-02-02 05:09:07 -05:00
Vijay Janapa Reddi
646464fbf7 Updates styling and content in volume configs
Updates the color scheme for chapter connections and forward sections to improve visual consistency across the different volume formats.

Corrects units for memory capacity and updates glossary terms to reflect 'Model' instead of 'Archetype' for clarity.
2026-02-02 04:51:19 -05:00