# MiniTorch: A DIY teaching library for machine learning engineers

> Source: <https://minitorch.github.io/>
> Published: 2026-11-29 05:57:44+00:00

**Key takeaway:** MiniTorch lets engineers learn deep learning internals by filling in TODO stubs such as ReLU forward and backward passes and passing the included unit test suite until the pure Python library runs Torch code.

# MiniTorch

[MiniTorch](https://github.com/minitorch/) is a *diy teaching library*
for machine learning engineers who wish to learn about the internal
concepts underlying deep learning systems.  It is a pure Python
re-implementation of the [Torch](http://www.pytorch.org) API designed
to be simple, easy-to-read, tested, and incremental. The final library
can run Torch code.

The main repo for the course is available on [GitHub](https://github.com/minitorch/minitorch).
To complete the assignments you fill in TODO statements and pass the included unit test
suite. There are also additional visualization tools to follow your progress.

``` python
class ReLU(ScalarFunction):

    @staticmethod
    def forward(ctx, a):
        # TODO: Implement for Task 1.2.
        raise NotImplementedError('Need to implement for Task 1.2')

    @staticmethod
    def backward(ctx, d_output):
        # TODO: Implement for Task 1.4.
        raise NotImplementedError('Need to implement for Task 1.4')
```

Individual assignments cover:

The project was developed for the course *Machine Learning
Engineering* at [Cornell Tech](https://www.tech.cornell.edu/) and
based on my experiences working at
[Hugging Face](https://huggingface.co/). Reach out if you are
interested in the teacher's version of the repository.

Enjoy!

Sasha Rush ([@srush_nlp](https://twitter.com/srush_nlp)) with Ge Gao, Anton Abilov, and Aaron Gokaslan.
