microgpt.py (Karpathy) — Part 2: shapes at every step + a tiny forward pass

microgpt.py (Karpathy) — Part 2: shapes at every step + a tiny forward pass

This is a continuation of: Part 1: https://emino.app/posts/microgpt-karpathy-line-by-line/ Part 1 explained the script as a story. This Part 2 makes it …

February 15, 2026 · 4 min · Emin Henri Mahrt
microgpt.py (Karpathy) — the code in plain English, line by line

microgpt.py (Karpathy) — the code in plain English, line by line

This post contains two things: The original microgpt.py code (as-is) A plain-English explanation for every line, in the same order, so a non-programmer can …

February 15, 2026 · 11 min · Emin Henri Mahrt