karpathy/micrograd
View on GitHub ↗ ★ 18,600 Jupyter Notebook
A tiny scalar-valued autograd engine and a neural net library on top of it with PyTorch-like API
26 mentions on Hacker News by 26 people: 5 stories, 21 comments · first 2020-04-14 · latest 2026-05-09
20082026
-
…model, and I suppose this is common enough that LLM saw it being done hundreds of times, haha. [0] https://github.com/karpathy/micrograd
comment by gobdovan · 2026-05-09 · in Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc -
…Ml by hand : https://github.com/workofart/ml-by-hand Micrograd: https://github.com/karpathy/micrograd
comment by butanyways · 2026-02-17 · in Visual introduction to PyTorch -
…Oh I also wrote a blog post [5] on the journey. [1] https://github.com/workofart/ml-by-hand [2] https://github.com/karpathy/micrograd [3] https://github.com/workofart/ml-by-hand/blob/main/examples/c... [4]…
comment by megadragon9 · 2025-03-30 · in Ask HN: What are you working on? (March 2025) -
Wanted to share a side project I recently wrapped up after stumbling across [Karpathy's micrograd]( https://github.com/karpathy/micrograd ). ML is mostly Python territory these days, and for good reason—it’s simple, flexible, and gets the…
comment by apexkid · 2025-01-04 -
…and autodiff frameworks like PyTorch, and ends with an implementation of a very basic framework ( https://github.com/karpathy/micrograd ) you can train small neural networks in
comment by strangecasts · 2025-01-02 · in Ray Tracing in One Weekend -
I built a compiler ( https://bernsteinbear.com/blog/compiling-ml-models/ ) for micrograd ( https://github.com/karpathy/micrograd/ ) to better understand how it worked
comment by tekknolagi · 2024-08-12 · in Ask HN: What are some "toy" projects you used to learn neural networks hands-on? -
…to turbo-teach myself basic cuda with a proper project. I really enjoyed Karpathy’s micrograd ( https://github.com/karpathy/micrograd ), so I extended it with cuda kernels and 2D tensor logic. It’s a bit longer than the original project,…
comment by cataPhil · 2024-03-20 · in Micrograd-CUDA: adapting Karpathy's tiny autodiff engine for GPU acceleration -
Karpathy’s micrograd [1] is literally 154 lines. Guess programming ended 4 years ago. [1] https://github.com/karpathy/micrograd
comment by KhoomeiK · 2024-03-10 · in Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning -
…Another example (although I honestly don't remember if he made this one between jobs) is: https://github.com/karpathy/micrograd
comment by Imnimo · 2024-02-14 · in Hi everyone yes, I left OpenAI yesterday -
…cluster, but a lot better than naive, loopy Python. [1] https://github.com/karpathy/llama2.c [2] https://github.com/karpathy/micrograd
comment by miki123211 · 2024-01-02 · in Stuff we figured out about AI in 2023 -
Perhaps they were thinking of https://github.com/karpathy/micrograd
comment by tavianator · 2023-09-04 · in Writing a C compiler in 500 lines of Python -
…column is a weight corresponding to an input. [1] https://www.youtube.com/watch?v=VMj-3S1tku0 [2] https://github.com/karpathy/micrograd
comment by paulsmith · 2023-09-01 · in Linear algebra for programmers -
…an autograd engine, quite insightful: https://youtu.be/VMj-3S1tku0?si=wuKhELwOwoYbzpt7 Repo: https://github.com/karpathy/micrograd
comment by Cef111 · 2023-08-25 · in Understanding Automatic Differentiation in 30 lines of Python -
Also micrograd from Andrej Karpathy: https://github.com/karpathy/micrograd
comment by craigching · 2023-08-25 · in Understanding Automatic Differentiation in 30 lines of Python -
…counting model [3] to makemore [4] and nanoGPT [5] [1]: https://www.foundersandcoders.com/ml [2]: https://github.com/karpathy/micrograd [3]: https://github.com/karpathy/randomfun/blob/master/lectures/m... [4]:…
comment by sirodoht · 2023-04-05 · in Neural Networks: Zero to Hero -
…if are a software dev and you haven't already, get super familiar with ML concepts, Pytorch, etc. https://github.com/karpathy/micrograd is a very good primer to start with once you understand the basic concepts.
comment by ActorNightly · 2022-12-05 · in Ask HN: Does ChatGPT scare you? It scares me -
You might like micrograd: https://github.com/karpathy/micrograd . There's also this video where the author explains how he built it: https://www.youtube.com/watch?v=VMj-3S1tku0
comment by hansworst · 2022-11-22 · in TinyGL 0.4.1 -
For autograd from scratch, see https://github.com/karpathy/micrograd and/or https://windowsontheory.org/2020/11/03/yet-another-backpropa...
comment by sgdjgkeirj · 2022-01-05 · in Neural network from scratch -
You do not need any matrix calculus for deep learning and micrograd ( https://github.com/karpathy/micrograd ), which implements backpropagation for neural nets in 100 lines of code, is a proof. Everything else is just vectorization.
comment by karpathy · 2021-04-03 · in The matrix calculus you need for deep learning (2018) -
…introductory resource. On the same topic, see also: - Andrej Karpathy's elegant micrograd library: https://github.com/karpathy/micrograd - This tiny neural networks API inspired by it: https://github.com/bpesquet/pyfit
comment by bpesquet · 2020-06-15 · in From scratch: reverse-mode automatic differentiation (in Python)