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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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