Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 560 Bytes

File metadata and controls

23 lines (16 loc) · 560 Bytes

micrograd-python

Python implementation of the autograd engine and neural network library. Follows Karpathy's micrograd.

Structure

  • engine.pyValue class, forward ops, backward pass
  • nn.pyNeuron, Layer, MLP
  • test_against_torch.py — correctness tests verified against PyTorch

Commands

# setup (using uv)
uv venv
uv pip install -r python/requirements.txt

# run tests (from repo root)
python3 -m pytest -q

# run benchmarks (from repo root)
python3 -m python.benchmark