# micrograd

> Tiny scalar autograd engine and neural network library with a PyTorch-like API

Source: https://talira.ai/catalog/micrograd-hvgdt6pz
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [ai / ml / deep learning frameworks](https://talira.ai/categories/ai/ml/deep-learning-frameworks), [languages / python](https://talira.ai/categories/languages/python)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Backed by: [Andrej Karpathy](https://talira.ai/orgs/andrej-karpathy.md)

micrograd is Andrej Karpathy's tiny autograd engine: it implements backpropagation (reverse-mode autodiff) over a dynamically built graph of scalar values, with a small neural network library on top that has a PyTorch-like API, in about 100 and 50 lines of code. It's enough to train small neural nets, such as a binary classifier in its demo notebook, and its maker describes it as potentially useful for education.

## Links

- GitHub: https://github.com/karpathy/micrograd

## Problems it solves

- understand how backpropagation works by reading a tiny implementation
- minimal autograd engine to learn from
- build a small neural net from scratch in Python

## Features

- reverse-mode autodiff over scalar values
- small neural network library
- PyTorch-like API
- about 150 lines of code

## Limitations

- Its maker describes it as potentially useful for educational purposes.[^1]
- Operates only on scalar values, not tensors.[^1]

## Trust

Overall: 0.46 out of 1.
Signals: maintenance 0.45, adoption 0.86, momentum 0.72, community 0.19, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- 19.2k GitHub stars
- 2 contributors
- backed by Andrej Karpathy

Warnings:

- one or two maintainers (bus factor)

## Alternatives

- [tinygrad](https://talira.ai/catalog/tinygrad-h76dkpfg.md): Small, hackable deep learning framework and compiler, between PyTorch and micrograd

## Sources

[^1]: https://github.com/karpathy/micrograd/blob/master/README.md (checked 30 Nov 2026)
[^2]: https://github.com/karpathy/micrograd/blob/master/LICENSE (checked 30 Nov 2026)
