4 phút đọc
TrenTorch/TrenTorch: Don't memorize ML. Understand it from first principles including Inference, Cuda, Deep Lea – Repository TrenTorch/TrenTorch. Mô tả: Don't memorize ML. Understand it from first principles including Inference, Cuda, Deep Learning, Data Science and Reinforcement Learning. 841 stars, 88 forks, ngôn ngữ chính Python, cập nhật 2026-11-12.
1. Repository làm gì?
Learn ML by building it: a from-scratch machine learning framework in NumPy, and hundreds of coding questions that run in your browser.
Try it in the browser · Quickstart · Curriculum · Contributing · FAQ
The CLI curriculum is our implementation of TinyTorch (Harvard CS249r), rebuilt and extended in our own style. The browser version is our own, built independently.
In the browser: open trentorch.com, sign in with GitHub, Google, or email, and start a question. Nothing to install. Python runs in your browser (Pyodide) and your code is graded instantly.
tren setup adds tren to your PATH, so later terminals just need tren, no activating first. The command reference covers the rest (tren tui, tren serve, tren milestone, tren benchmark).
Sign-in uses Supabase. Copy .env.example to .env and fill in your own project keys to use it locally.
2. Dữ liệu và cấu trúc đáng chú ý
Most people learn ML frameworks by importing them. We wanted to know how they work, so we built one. Every operation traces back to raw NumPy, the architecture matches what production frameworks use, and there is no import torch anywhere in the curriculum. You know what loss.backward() does because you wrote it.
A Problem of the Day features one new web question every day.
Every question has a problem statement, a theory section, a starter file, tests, and a reference solution.
As you progress, you unlock recreations of landmark ML results, run on your own framework:
The CLI workflow: TrenTorch_CLI/data/src/*.py becomes TrenTorch_CLI/data/modules/*.ipynb (you solve it), and your solutions end up in TrenTorch_CLI/data/trentorch/*.py.
Issues and pull requests are welcome. Start with the contributing guide: open an issue first, and ask to be assigned before you start on it. CI has to be green and one review from someone other than the author is required to merge. The first-contribution bot greets you on your first PR. Code quality is tracked on CodeFactor, where the repository is graded A+.
Found a security problem? Do not open a public issue. Read SECURITY.md.
3. Khả năng ứng dụng và giới hạn
The maintainers, code owners first and then most active first (PRs plus issues). Counts are recomputed whenever a PR merges, from real issue/PR activity via .github/workflows/update-contributors.yml.
Everyone else who has had a PR merged, most active first (PRs plus issues), or is credited as a Co-authored-by: on one. Want to show up here? Get a PR merged, or get credited as a co-author on someone else's: the first-contribution bot will say hello on your first PR, and this grid updates automatically after it merges. A closed-without-merging PR doesn't count, and neither does an issue on its own.
TrenTorch's CLI is our implementation, built on the curriculum and foundation of TinyTorch, created by Prof. Vijay Janapa Reddi and the ML Systems Book community at Harvard University.
PolyForm Noncommercial License 1.0.0: free for personal, educational, and noncommercial use. Not licensed for commercial use.
This project follows the Contributor Covenant. It applies in issues, pull requests, discussions, and on trentorch.com.
Yes, for personal, educational, and noncommercial use, under the PolyForm Noncommercial License 1.0.0. Commercial use is not covered. If you want to use it in a paid course or inside a company, get in touch at rocky@trentorch.com or through trentorch.com/contact.
Start with the web app if you want to try questions right now with nothing to install. Use the CLI if you want to build the framework yourself, module by module, in notebooks on your own machine. They cover the same ground, and progress is not shared between them.
No. Everything runs on the CPU with NumPy, and the curriculum never imports PyTorch or TensorFlow. The CLI needs Python 3.10 or newer. The web app runs Python 3.12 inside your browser.
In your browser, using Pyodide (Python compiled to WebAssembly). Running and grading a question does not need a server. Your progress (which questions you have solved) is saved to your account, which you create by signing in with GitHub, Google, or an email link.
Số liệu repository có thể thay đổi; nên mở liên kết nguồn để kiểm tra README, giấy phép và trạng thái phát hành.
Nguồn tham khảo: Xem bài gốc