Let's build GPT: from scratch, in code, spelled out.
Overview
Andrej Karpathy builds a GPT from scratch in code, following Attention Is All You Need and GPT-2/3, in about two hours using PyTorch. He connects it to ChatGPT and assumes familiarity with his earlier makemore videos.
On Hacker News
It is the go-to recommendation for learning how transformers and LLMs actually work, praised for its clarity and Karpathy's teaching.
Topics
Sources
Video by Andrej Karpathy, played through YouTube.
Data and selection notes
HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.
HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.
Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.
Selection checks
- SaaS & AI candidates: Matches the configured criteria
- Editor-approved picks: Editorial review is required
What people said