TinyTorch v0.1.13
Patch release focused on framework correctness. It lands autograd, convolution, attention, and quantization fixes that close real gradient and numerical stability bugs, plus a substantial hardening of the release and grading pipeline (nbgrader tiers, tito preflight, PDF builds) and a round of community dashboard repairs. Version bumped from 0.1.12 to 0.1.13.
✨ New Features
- AvgPool2d autograd backward (M09
convolutions):AvgPool2dnow participates in the autograd graph, distributing the upstream gradient uniformly across each pooling window so convolutional milestones can be trained from input to loss. (PR by @vedant-a-joshi)
🐛 Framework Correctness (autograd and ops)
The core of this release. Each fix addresses a case where the framework silently produced wrong gradients or values:
- MatmulBackward for 1D vector inputs (M06
autograd): corrected gradient computation when one or both operands are 1D. The vector and matrix broadcasting in the backward pass was previously mishandled. tracked_mulscalar handling (M06autograd, #1871): now wraps a raw scalar in aTensorbefore passing it toMulBackwardinstead of leaking a Python float into the graph.- Conv2dBackward return tuple (M09
convolutions, #1866): the backward function's return arity now matches the length ofsaved_tensors, fixing gradient unpacking errors. - Stray
super().__init__()removed fromConv2d,MaxPool2d, andAvgPool2d(M09, #1868): these misleading calls implied an inheritance contract that does not exist in the TinyTorch layer model. - Numerically stable sigmoid (M02
activations): reformulated to avoidexpoverflow warnings on large magnitude inputs. - Quantization of large constants (M15
quantization): constant tensors with|value| > 127are now recovered correctly instead of being clipped or lost during the quantize round trip. - MultiHeadAttention mask reshape (M12
attention): preservesseq_qandseq_kdimensions so the attention mask keeps the correct shape across multi-head reshaping. - GPT causal mask convention (M13
transformers): aligned the causal mask orientation so decoder self-attention masks future positions correctly. reshape(-1)divisibility check (M01tensor, #1872): validates that the known dimensions evenly divide the element count before inferring the missing dimension, replacing a silent miscompute with a clear error.- Dropout RNG (M03
layers, #1869):Dropoutnow draws from the module level seeded RNG instead of globalnp.random, restoring reproducibility under a fixed seed.
🔬 Tests
- Transpose test hardened (M01
tensor, #1873): switched to a non symmetric tensor so the test actually catches incorrect axis swaps (a symmetric tensor masked the bug). - CLI progress sync tests (community): added coverage for the path that syncs
titoprogress to the community dashboard. (by @jettythek) tito module completenow catches notebook syntax errors and runs integration tests as part of completion, so broken submissions fail loudly.
🔧 Tito CLI and Release / Grading Pipeline
A broad hardening pass so lab artifacts build, grade, and publish consistently:
- nbgrader release tiers: defined and documented hidden nbgrader release tiers, added them to
tito, hardened release staging, and restored and aligned the nbgrader release workflows. tito dev preflightcommand registered for validation before a release.- Reliable progress sync (#1849):
titoCLI progress now syncs dependably to the community dashboard. - nbdev config (#1876): added
[tool.nbdev]topyproject.tomlso nbdev reads its configuration directly instead of falling back to defaults. Also pinnednbdev < 3.0.16for stability. - PDF builds: locate the TinyTeX
tlmgrbinary so the lab guide and research paper PDFs build cleanly in CI. - Dependency floors: aligned the
jupyterlabminimum version. - Repaired release regressions and refreshed the release narrative.
🌐 Community Dashboard and Site
- Globe performance (community): redrew the contributor globe on a canvas for smoother performance and fixed profile setup logic. (by @jettythek)
- Map legend and data fetching improved on the community map. (by @jettythek)
- Profile setup and email login dashboard access repaired (#1887) so logins by email can complete setup and reach the dashboard. (by @farhan523)
- Sidebar textbook link now navigates to
mlsysbook.ai. - 404 dark mode: added
body.quarto-darkselectors alongside the@mediadark rules so the 404 page respects the manual theme toggle.
📚 Documentation
- Expanded preface with dedicated Prerequisites, Instructor, and Contribute sections, clarifying who the course is for and how to get involved.
- nbgrader release tier documentation and a refreshed release narrative (see above).
📦 Dependencies
- Bumped
@types/vscodeand@types/nodein the VS Code extension. - Updated the
jupytextrequirement (#1758). - Applied bib-tidy automatic formatting.
👥 Contributors
TinyTorch is built by its community, and this release is a great example of that. Heartfelt thanks to everyone who showed up, fixing gradients, hardening the pipeline, and making the dashboard work better for the next learner who walks in the door:
- @profvjreddi: release pipeline hardening (nbgrader tiers,
titopreflight, PDF builds), preface expansion, and editorial direction - @Shashank-Tripathi-07: the framework correctness pass (autograd, convolutions, attention, quantization, dropout, reshape, and transpose)
- @jettythek: community dashboard globe and map performance, plus CLI progress sync tests
- @vedant-a-joshi:
AvgPool2dautograd backward - @farhan523: community profile setup and email login dashboard fixes
Every fix here makes TinyTorch a little clearer and more correct for students learning ML systems from the ground up. If you spotted something while working through the modules, we would love your contribution too. Issues and PRs are always welcome. 💚
Full Changelog: tinytorch-v0.1.12...tinytorch-v0.1.13
Website: https://mlsysbook.ai/tinytorch/