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
Try Google Cloud Risk-Free With $300 in Credit Icon
Try Google Cloud Risk-Free With $300 in Credit

No hidden charges. No surprise bills. Cancel anytime.

Use your credit across every product. Compute, storage, AI, analytics. When it runs out, 20+ products stay free. You only pay when you choose to.
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