Commit Graph

9547 Commits

Author SHA1 Message Date
AndreaMattiaGaravagno
ad94870ed2 docs(slides): specify genai usage (#1149) 2026-02-01 10:01:47 -05:00
kai
9d8e54776a restoring init file that was accidently changed 2026-01-30 15:28:19 -05:00
kai
3409e91322 updated the bundle remove auto o 2026-01-30 15:23:23 -05:00
kai
6cbdbe56ea bundle for socratiq button on 2026-01-30 15:09:00 -05:00
kai
b6201fda8b :::Merge branch 'dev' of github.com:harvard-edge/cs249r_book into dev 2026-01-30 14:14:31 -05:00
kai
f0ae9ebb7f updated bundle for stability for socratiQ 2026-01-30 14:12:16 -05:00
Vijay Janapa Reddi
987204051f Add badge for last commit update in README 2026-01-30 13:53:59 -05:00
github-actions[bot]
01fc7df6a0 🔥 TinyTorch tinytorch-v0.1.7: Content updates and improvements tinytorch-v0.1.7 2026-01-29 21:50:48 +00:00
github-actions[bot]
8154612fca chore(tinytorch): bump version to tinytorch-v0.1.7 2026-01-29 21:50:01 +00:00
Vijay Janapa Reddi
535969e3ae Merge remote-tracking branch 'origin/dev' 2026-01-29 15:11:27 -05:00
Vijay Janapa Reddi
637eea332b refactor(workflows): rename Publish (Dev) to Preview (Dev)
Clearer naming convention:
- Preview (Dev) = deploy to dev preview site (temporary/staging)
- Publish (Live) = deploy to production (permanent/public)

Renamed files:
- tinytorch-publish-dev.yml → tinytorch-preview-dev.yml
- kits-publish-dev.yml → kits-preview-dev.yml
- labs-publish-dev.yml → labs-preview-dev.yml
- book-deploy-preview.yml → book-preview-dev.yml

Updated workflow names to use 👁️ Preview (Dev) icon/naming.
2026-01-29 15:11:01 -05:00
Vijay Janapa Reddi
17d64580d7 fix(site): use external link icon for arXiv Paper link
Changed Paper link from local PDF download to arXiv external link:
- URL: _static/downloads/TinyTorch-Paper.pdf → arxiv.org/abs/2601.19107
- Icon: ↓ (download) → ↗ (external link)
- Added target=_blank to open in new tab
2026-01-29 15:03:43 -05:00
Vijay Janapa Reddi
bb5dd7a9f6 fix(export): use nbdev Python API instead of CLI for reliable export
The nbdev_export CLI was not reading settings.ini correctly in CI,
causing exports to silently fail. Using nbdev.export.nb_export()
Python API directly with explicit lib_path ensures exports work
reliably regardless of environment.
2026-01-29 14:28:40 -05:00
Vijay Janapa Reddi
2ec60a6f5c fix(export): use python -m nbdev.export instead of nbdev_export command
The nbdev_export command wasn't in PATH in CI. Using sys.executable
with -m nbdev.export ensures we use the same Python environment that's
running tito, which is more reliable across different environments.

Fixed in:
- tito/commands/dev/export.py (both _export_all_modules and _run_nbdev_export)
- tito/commands/module/workflow.py (_export_notebook)
2026-01-29 14:19:26 -05:00
Vijay Janapa Reddi
2546b54bba fix(export): handle running from tinytorch directory
The directory check was looking for tinytorch/tinytorch/__init__.py
when running from the tinytorch directory (as CI does). Fixed to check
for either repo root or tinytorch project directory structure.
2026-01-29 13:53:22 -05:00
Vijay Janapa Reddi
46d633d3cd fix(ci): show full export error output for debugging
Increased error output from 100 to 500 chars and show both stdout
and stderr to help diagnose CI export failures.
2026-01-29 13:51:58 -05:00
Vijay Janapa Reddi
9e56fc2e2e fix(ci): default to all tests on all platforms + align with CLI naming
- Default test_type: quick → all (run full validation by default)
- Default os: linux → all (test both platforms by default)
- Rename 'release' → 'user-journey' to match CLI --user-journey flag
- Fix 'standard' to correctly stop at stage 5 (was running user-journey)
- Reorder options to show defaults first in dropdown
2026-01-29 12:43:32 -05:00
Vijay Janapa Reddi
ab73535530 Merge dev: workflow icon updates ( Validate, 📑 Update PDFs) 2026-01-29 07:33:36 -05:00
Vijay Janapa Reddi
08278a8a6b chore(workflows): differentiate Validate and Publish icons
- Change Validate (Dev) icon from 💯 to  for Book and TinyTorch
- Change Update PDFs icon from 📄 to 📑 (bookmark tabs)
- Fix workflow_run references to match exact workflow names

This makes it easier to visually distinguish between Validate and
Publish operations in the GitHub Actions UI.
2026-01-29 07:33:06 -05:00
Vijay Janapa Reddi
2007029aa2 fix(milestone): pass Tensor class to step functions that need it
Fixed NameError in step_1_profile and step_5_accelerate by adding
Tensor as a parameter. These functions create sample tensors for
profiling/testing but the Tensor class is imported in main(), so
they need it passed as an argument.
2026-01-28 19:14:28 -05:00
Vijay Janapa Reddi
0b119bf666 refactor(milestone): extract MLPerf steps into separate functions
Break the 600-line main() into clean, documented step functions:
- CONFIG dict for shared settings
- step_1_profile() - Measure baseline with Profiler
- step_2_quantize() - FP32→INT8 with Quantizer
- step_3_prune() - Magnitude pruning with Compressor
- step_4_kv_cache() - Transformer generation speedup
- step_5_accelerate() - Vectorized operations demo
- step_6_benchmark() - Scientific benchmarking
- print_final_results() - Summary table

Each function has detailed docstrings with ASCII diagrams
explaining what the optimization technique does.
2026-01-28 18:57:31 -05:00
Vijay Janapa Reddi
a3b3c77f1a docs(milestone): add ASCII attention pattern diagrams to docstrings
Each challenge function now has visual documentation showing:
- The task input/output example
- The ideal attention weight matrix pattern
- Why the pattern is required for the task

Challenge 3 also explains why a fresh model is needed
(sequential training causes "catastrophic forgetting").
2026-01-28 18:41:33 -05:00
Vijay Janapa Reddi
b8f68510fd refactor(milestone): extract challenges into separate functions
Break the monolithic main() into clean, documented functions:
- CONFIG dict for shared hyperparameters
- build_model() for creating fresh model/optimizer/loss
- challenge_1_reversal() - anti-diagonal attention patterns
- challenge_2_copying() - diagonal attention patterns
- challenge_3_mixed() - prefix-conditioned behavior (fresh model)
- print_final_results() - summary table and messages

This makes the code much easier for students to understand
and clearly shows why challenge 3 needs a fresh model.
2026-01-28 18:38:35 -05:00
Vijay Janapa Reddi
bcbcbf7f3d fix(milestone): reset model before mixed task challenge
The transformer was being trained sequentially on reversal then copying,
which caused it to "forget" reversal before the mixed task. Now we
reinitialize the model before challenge 3 so it learns both tasks
together with proper prefix conditioning.
2026-01-28 18:36:16 -05:00
Vijay Janapa Reddi
8f9481b508 fix(test): update assertion to match actual error message
The test checked for "invalid" or "error" but the actual message
says "Command Not Found" and "not a valid command".
2026-01-28 17:36:20 -05:00
Vijay Janapa Reddi
eb84df491e docs(paper): clarify Adam memory overhead + fix LaTeX labels
- Clarify "3× memory" → "3× optimizer-related memory (gradients plus
  two state buffers)" for accuracy
- Fix lstlisting label syntax: label=lst:... → label={lst:...}
- Remove stale figure reference, use prose instead
- Fix convolutions comment: 6 → 7 nested loops (matches actual code)
- Remove unused benchmark_table3.py
2026-01-28 17:19:55 -05:00
Vijay Janapa Reddi
5d4476d81c Merge dev: sync workflow updates 2026-01-28 16:02:21 -05:00
Vijay Janapa Reddi
9c85adc970 Merge dev: arXiv paper link + workflow updates 2026-01-28 15:55:41 -05:00
Vijay Janapa Reddi
3817121a4b feat(site): link Paper to arXiv instead of local PDF
The paper is now published at arXiv:2601.19107, so link directly
to the abstract page for better discoverability and citation info.
2026-01-28 15:55:28 -05:00
Vijay Janapa Reddi
dc7ff1dfc9 feat(site): link Paper to arXiv instead of local PDF
The paper is now published at arXiv:2601.19107, so link directly
to the abstract page for better discoverability and citation info.
2026-01-28 15:51:36 -05:00
Vijay Janapa Reddi
316bdae031 Merge dev: user journey test + export bug fix 2026-01-28 12:42:30 -05:00
Vijay Janapa Reddi
c46beda3e5 feat(cli): better error message for invalid commands 2026-01-28 12:41:58 -05:00
Vijay Janapa Reddi
98c5415a5a fix: skip sync prompt in CI + increase milestone timeout
- Skip "sync to profile" prompt when not in interactive terminal
  (was hanging in CI waiting for input that never comes)
- Increase milestone timeout from 180s to 300s for heavy milestones
  (CNN and Transformer training can take 2-3 minutes on CI)
2026-01-28 11:54:23 -05:00
Vijay Janapa Reddi
9e5ffac705 ci: enable User Journey for 'all' test type (dev/main pushes) 2026-01-28 10:09:10 -05:00
Vijay Janapa Reddi
ede0c5d28e ci: run User Journey on standard test type (dev/main pushes) 2026-01-28 09:48:37 -05:00
Vijay Janapa Reddi
e3ff3f1587 chore: swap Stage 6/7 order - Fresh Install before User Journey 2026-01-28 09:31:49 -05:00
Vijay Janapa Reddi
43010f202d chore: rename Stage 6 from Release to User Journey 2026-01-28 09:30:00 -05:00
Vijay Janapa Reddi
a70c724a02 fix: export failure now blocks progress + add user journey test
Bug Fix:
- Export failures now return early in module complete, preventing
  progress from being updated when export fails. This fixes the issue
  where students could start Module 02 even though tensor.py was
  never exported.

New --user-journey test:
- Simulates exact student flow: module start --no-jupyter → module complete
- Runs milestones at natural unlock checkpoints (not all at end)
- Milestone checkpoints: after modules 03, 08, 09, 13, 19
- Explicit step-by-step output for easy CI debugging

New --no-jupyter flag:
- Added to 'tito module start' for CI/testing
- Creates notebook but skips opening Jupyter

Ref: https://github.com/harvard-edge/cs249r_book/discussions/1147
2026-01-28 09:28:15 -05:00
Vijay Janapa Reddi
e668c5b700 docs(paper): revise abstract for citation impact
- Name the problem: "algorithm-systems divide"
- Name the approach: "implementation-based systems pedagogy"
- Add concrete systems examples (O(N^2), Adam 3x memory)
- Include MLPerf-style benchmarking in milestones
- Strengthen citable terminology throughout
2026-01-28 08:27:11 -05:00
Vijay Janapa Reddi
2b57102cc6 fix: sync version files to v0.1.6 2026-01-27 21:26:37 -05:00
Vijay Janapa Reddi
c2ecffa772 style(ci): simplify workflow name 2026-01-27 21:18:02 -05:00
Vijay Janapa Reddi
b49615100c feat(ci): add PDF-only update workflow
Allows updating paper and guide PDFs without version bumps or site changes.
2026-01-27 21:16:40 -05:00
Vijay Janapa Reddi
16219746e7 feat(ci): add PDF-only update workflow
Allows updating paper and guide PDFs without version bumps or site changes.
2026-01-27 21:16:32 -05:00
github-actions[bot]
a04fe4c6f6 docs: add @lalalostcode as tinytorch contributor for bug 2026-01-27 18:43:10 +00:00
Vijay Janapa Reddi
cf76694167 Merge branch 'dev' 2026-01-27 13:20:57 -05:00
Vijay Janapa Reddi
9b62b88f5b Merge remote-tracking branch 'origin/feature/tinytorch-core' into dev 2026-01-27 13:20:50 -05:00
Vijay Janapa Reddi
aefbedbe30 fix(tinytorch): add PYTHONIOENCODING=utf-8 for Windows emoji support
Fixes encoding issues on Windows where emoji/unicode output would fail.
Thanks @lalalostcode for reporting!

See: https://github.com/harvard-edge/cs249r_book/discussions/1145
2026-01-27 13:20:37 -05:00
Vijay Janapa Reddi
9c10863ad9 Merge dev into main 2026-01-27 13:08:56 -05:00
Vijay Janapa Reddi
df88f40056 Merge remote-tracking branch 'origin/dev' into dev 2026-01-27 13:08:40 -05:00
Vijay Janapa Reddi
bfed0dc76f chore(tinytorch): remove CHANGELOG.md in favor of GitHub releases 2026-01-27 13:08:11 -05:00