Home Knowledge Base micrograd

micrograd is a tiny autograd engine created by Andrej Karpathy that implements backpropagation and a dynamic computation graph in under 100 lines of Python — demonstrating that the core mechanism behind PyTorch, TensorFlow, and all modern deep learning frameworks (automatic differentiation via reverse-mode accumulation on a directed acyclic graph) can be understood by reading a single file, making it the most influential educational resource for demystifying how neural networks actually learn.

What Is micrograd?

Core Implementation

The entire engine is built around a Value class:

Supported Operations: Addition, multiplication, power, ReLU, negation, subtraction, division — enough to build multi-layer perceptrons and train them with gradient descent.

Why micrograd Matters

micrograd is the 100-line Python program that demystified deep learning for millions of developers — proving that the autograd engine at the heart of every modern ML framework is simply reverse-mode differentiation on a computation graph, making neural network training conceptually accessible to anyone who can read basic Python.

microgradtinyandrej karpathy

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.