explaingit

0xhassaan/nn-from-scratch

0PythonAudience · developerComplexity · 4/5ActiveSetup · moderate

TLDR

Personal study log following Andrej Karpathy's neural network video series, implementing micrograd, makemore, and nanoGPT from scratch in Python.

Mindmap

mindmap
  root((nn-from-scratch))
    Inputs
      Karpathy video lessons
      Math from first principles
    Outputs
      Micrograd backprop engine
      Bigram and MLP text models
      Planned nanoGPT
    Use Cases
      Learn backpropagation
      Build text generators
      Study transformers
    Tech Stack
      Python
      NumPy
      PyTorch

Things people build with this

USE CASE 1

Study how backpropagation works by reading the micrograd code

USE CASE 2

Track your own progress through the Karpathy zero-to-hero series

USE CASE 3

Use as a reference when building a tiny autograd engine

Tech stack

PythonNumPyPyTorch

Getting it running

Difficulty · moderate Time to first run · 1h+

No install or usage instructions in the README, so you need to watch the matching Karpathy videos to follow along.

In plain English

This repository is a personal learning log. The author is working through a well known online video series by Andrej Karpathy, a former research lead at OpenAI and Tesla, in which Karpathy builds the core machinery of modern neural networks step by step in Python. The point of the project, as the author puts it, is that every line of code has been written by hand and understood, not just copied or run. The README is essentially a checklist of the lessons in that series. One item is marked done: micrograd, a tiny library that implements the backpropagation algorithm, the math trick that lets neural networks learn from examples. The remaining items, all unfinished, cover a series called makemore that builds increasingly capable text generators, starting with a simple bigram model, then a small multilayer network, then techniques like batch normalization and the WaveNet architecture. The final planned item is nanoGPT, a minimal reimplementation of the kind of model that powers ChatGPT. There is no description of features, no install instructions, and no usage notes in the README. The repository is best read as a study journal rather than a finished tool.

Copy-paste prompts

Prompt 1
Walk me through the micrograd code in nn-from-scratch and explain how the backward pass works
Prompt 2
Compare the bigram and MLP implementations from makemore in this repo
Prompt 3
Help me port the next unfinished checklist item from nn-from-scratch into working code
Prompt 4
Explain what nanoGPT needs that the makemore steps in this repo do not cover
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.