Don't import it. Build it.

Build your own ML framework: from tensors to systems.

Preview · Classroom release Spring 2027

An educational framework for building and optimizing ML: understand how PyTorch, TensorFlow, and JAX really work.

TinyTorch is usable today for self-paced learning and active course pilots. APIs, instructor packaging, and classroom workflows will continue to stabilize through the Spring 2027 classroom release. Self-study works today; courses adopting TinyTorch before then should expect to pilot it.

Start Building →
28,106 stars on GitHub: add yours and support free ML education
Build each piece: Tensors, autograd, attention. No magic imports.
Recreate history: Perceptron → CNN → TinyGPT → MLPerf & ChatGPT Serving.
Understand systems: Memory, compute, optimization trade-offs.
Debug anything: OOM, NaN, slow training, because you built it.

Recreate ML History

Walk through ML history by rebuilding its greatest breakthroughs with YOUR TinyTorch implementations. Click each milestone to see what you’ll build and how it shaped modern AI.

1958
The Perceptron
The first neural network, run forward with your layers
Input → Linear → Sigmoid → Output
1969
XOR Crisis
Minsky & Papert expose limits of single-layer networks
Input → Linear → Sigmoid → FAIL!
1986
MLP Revival
Backpropagation enables deep learning on TinyDigits
Images → Flatten → Linear → ... → Classes
1998
CNN Revolution
A LeNet-style convolutional network on handwritten digits
Images → Conv → Pool → ... → Classes
2017
Transformer Era
Train TinyGPT on Shakespeare, TinyCopilot code generation, and concept Q&A
Tokens → Embeddings → Causal Attention + MLP → Sampling
2018
MLPerf to Generative Serving
Production optimization & KV-cache generation speedup on TinyGPT
Profile → Quantize → Cache → Accelerate
2024 PRESENT
Custom Kernels
Verify your tiled, fused, and im2col kernels, then time them against C++ SIMD, Apple Metal MPS, and OpenAI Triton
Tiling → im2col → Fusion → Native reference kernels

Why Build Instead of Use?

"Building systems creates irreversible understanding."

Traditional ML Education

import torch
model = torch.nn.Linear(784, 10)
output = model(input)
# When this breaks, you're stuck

Problem: You can’t debug what you don’t understand.

TinyTorch: Build → Use → Reflect

# BUILD it yourself
class Linear:
    def forward(self, x):
        return x @ self.weight + self.bias

# USE it on real data
loss.backward()  # YOUR autograd

Advantage: You can debug it because you built it.

Learning Path

Five progressive stages take you from foundations to production systems, capstone benchmarking, and custom hardware kernels:

About the Course | Getting Started

Is This For You?

Students

Taking ML courses, want to understand what’s behind import torch

Instructors

Teaching ML systems with ready-made hands-on labs

Self-learners

Career changers or hobbyists going deeper than tutorials

Prerequisites: Python + basic linear algebra. No ML experience required.

Join the Community

See learners building ML systems worldwide

Add yourself to the map · Share your progress · Connect with builders

Part of the MLSysBook project. Every star helps support free ML education

Join the Community Star on GitHub 28,106 Discuss on GitHub Get Updates

Next Steps: Quick Start (5 min setup) | About the Course | Community

Back to top