micrograd is a tiny, educational automatic differentiation engine focused on scalar values, built to show how backpropagation works end to end with minimal code. It constructs a dynamic computation graph as you perform math operations and then computes gradients by walking that graph backward, making it an approachable “from scratch” autograd reference. On top of the core autograd “Value” concept, the project includes a small neural network library that lets you define and train simple models with a PyTorch-like feel, including multilayer perceptrons. The repository is intentionally compact and readable, prioritizing clarity over performance so learners can follow every step of gradient flow and parameter updates. It is commonly used as a learning bridge between basic calculus intuition and full-scale deep learning frameworks, helping developers understand why autodiff libraries behave the way they do.

Features

  • Scalar-valued automatic differentiation engine
  • Dynamic computation graph construction
  • Backpropagation with gradient accumulation
  • Minimal neural network utilities on top
  • PyTorch-like training patterns for small models
  • Reference-style tests and demos for learning

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow micrograd

micrograd Web Site

Other Useful Business Software
Earn up to 16% annual interest with Nexo. Icon
Earn up to 16% annual interest with Nexo.

More flexibility. More control.

Generate interest, access liquidity without selling, and execute trades seamlessly. All in one platform. Geographic restrictions, eligibility, and terms apply.
Get started with Nexo.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of micrograd!

Additional Project Details

Programming Language

Python

Related Categories

Python Artificial Intelligence Software

Registered

2026-03-02