Back to directory

TrenTorch

A from-scratch machine learning framework built in NumPy, paired with hundreds of browser-graded coding questions, for learning how ML and inference internals actually work instead of only calling an existing library.

TrenTorch

TrenTorch teaches machine learning by having the learner rebuild it: a NumPy-only framework whose operations trace back to raw NumPy rather than importing PyTorch, matching the architecture of production frameworks so a concept like loss.backward() is understood because the learner implemented it. Its CLI curriculum extends a Harvard CS249r (TinyTorch) curriculum, rebuilt in TrenTorch's own style, while its browser version is built independently.

Two parallel tracks cover the same ground: a browser track with more than 350 coding questions across 12 topic areas, graded instantly through Python running in-browser via Pyodide, with progress saved to an account; and a terminal/Jupyter CLI track with 20 modules that build a framework from tensors up to a capstone project, with progress saved locally. The web app is a SvelteKit project using Supabase for sign-in.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.