Build your own Deep Learning Framework
A small PyTorch: tensors, automatic differentiation over a computation graph, layers, optimisers and a training loop.
- Advanced
- About 20–40 h
- 4 checkpoints
- 3 tutorials · Python
Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.
Choose a tutorialWhy build it
Autograd is the engine of modern machine learning. Building it shows how computation graphs, gradient accumulation and optimisers work, which makes framework errors and performance much easier to reason about.
You will be able to
- Implement reverse-mode automatic differentiation over a computation graph.
- Write tensor operations with broadcasting and their gradients.
- Build modules, parameters and optimisers such as SGD and Adam.
- Train a real model with your framework and compare it with PyTorch.
Skills it exercises
- Efficient PyTorch Training
- Deep Learning Fundamentals
- Linear Algebra & Calculus for ML
- DAGs & Topological Sort
Recommended on Machine Learning Engineer.
How you know you are there
Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.
- Checkpoint 1Self-check
Scalar autograd
Done when: A Value class records a graph, and backward() gives gradients that match finite differences.
- Checkpoint 2Self-check
Tensors
Done when: Add, matmul, sum and ReLU support broadcasting and backward passes, checked against PyTorch.
- Checkpoint 3Self-check
Modules and optimisers
Done when: Linear layers, a loss and SGD or Adam train an MLP whose loss falls like PyTorch's on the same data and seed.
- Checkpoint 4Self-check
Real model
Done when: Your framework trains a classifier on a real dataset to a stated accuracy.
Stretch goals
- GPU kernels through CuPy or a similar library.
- Save and load model checkpoints.
Step-by-step guides
Pick one in a language you know (tutorial languages: Python). They open on the author’s site.
- Python
Build Deep Learning From Scratch (reimplement PyTorch internals across 34 stages)(external site)
Python: reimplements PyTorch internals across 34 stages.
- Python
SlowTorch: Implementation of PyTorch from the ground up in 100% pure Python(external site)
Python: PyTorch's API in pure Python, to read alongside your own.
- Python
Neural Networks: Zero to Hero(external site)
Video: the first lecture builds micrograd, the scalar version of this build.
Where to go next
- Build your own Large Language Model
Advanced · 30–60 h
Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.
Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.