Overview
Nanochat is Andrej Karpathy’s tiny end-to-end chat assistant project. It shows how to build a small Transformer chatbot from scratch with simple training, inference, and a minimal UI, meant for learning and quick experimentation.
Description
Nanochat is a pedagogical repo that walks through the essentials of a chat LLM without heavy frameworks. It includes a compact training loop, a straightforward inference script, and a lightweight interface so you can prompt, iterate, and observe behavior in real time. The goal is clarity over bells and whistles: small models that run on a single GPU or even CPU, simple data formatting for instruction tuning, and easy hooks to tweak sampling, prompts, or checkpoints. It is ideal for students and practitioners who want to understand how a chatbot pipeline fits together end to end, then adapt the code for custom demos, classroom labs, or prototype copilots.
About Andrej Karpathy
I started Eureka Labs, a new AI+Education company.
Meanwhile, I also make educational videos on AI on my YouTube channel. There are two tracks.
View Company Profile