gitwtfhub

wtf is nn-from-scratch?

0xhassaan/nn-from-scratch — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 4/5Setup · moderate

TL;DR

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

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study how backpropagation works by reading the micrograd code

REASON 2

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

REASON 3

Use as a reference when building a tiny autograd engine

What's in the stack?

PythonNumPyPyTorch

How it stacks up

0xhassaan/nn-from-scratch3ks/embedoc8perezm/esuyo-qwen3-tts-rocm
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultymoderatehardhard
Complexity4/51/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

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.

Wtf does this do

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.

Yoink these 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

Frequently asked questions

wtf is nn-from-scratch?

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

What language is nn-from-scratch written in?

Mainly Python. The stack also includes Python, NumPy, PyTorch.

How hard is nn-from-scratch to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is nn-from-scratch for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.