arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.19107cs.LG
收藏

TinyTorch: 从基础原理构建机器学习系统

TinyTorch: Building Machine Learning Systems from First Principles

Harvard University(哈佛大学)

Vijay Janapa Reddi

AI总结:

TinyTorch通过基于实现的系统教学,帮助学生构建机器学习系统,实现深度理解无需专用硬件。

摘要:

机器学习教育面临一个根本性的缺口:学生学习算法而不理解执行它们的系统。他们研究梯度下降而不测量内存,研究注意力机制而不分析O(N²)的扩展,研究优化器理论而不知道为什么Adam需要三倍于SGD的内存。这种

英文摘要:

Machine learning education faces a fundamental gap: students learn algorithms without understanding the systems that execute them. They study gradient descent without measuring memory, attention mechanisms without analyzing O(N^2) scaling, optimizer theory without knowing why Adam requires 3x the memory of SGD. This "algorithm-systems divide" produces practitioners who can train models but cannot debug memory failures, optimize inference latency, or reason about deployment trade-offs--the very skills industry demands as "ML systems engineering." We present TinyTorch, a 20-module curriculum that closes this gap through "implementation-based systems pedagogy": students construct PyTorch's core components (tensors, autograd, optimizers, CNNs, transformers) in pure Python, building a complete framework where every operation they invoke is code they wrote. The design employs three patterns: "progressive disclosure" of complexity, "systems-first integration" of profiling from the first module, and "build-to-validate milestones" recreating 67 years of ML breakthroughs--from Perceptron (1958) through Transformers (2017) to MLPerf-style benchmarking. Requiring only 4GB RAM and no GPU, TinyTorch demonstrates that deep ML systems understanding is achievable without specialized hardware. The curriculum is available open-source at mlsysbook.ai/tinytorch.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑