Back to tools

nanochat

A minimal from-scratch LLM training project that helps learners reproduce a ChatGPT-class model in a weekend for about $100.

Tool categories
CodingDeveloper toolsEducationModel
Tool links

Tool overview

Adoption verdict: nanochat has generated massive buzz on social platforms (over 8 million X views, popular Zhihu threads) but remains primarily an educational and hands-on tool with no evidence of production deployment. Practical value: It packs BPE tokenization, Transformer blocks, training loops, evaluation, and a FastAPI-based OpenAI-compatible chat API plus web UI into roughly 3,000 lines of code, offering a complete walkthrough of the LLM lifecycle. Barrier and cost: Karpathy’s own measurements show training a GPT-2–grade model on an 8×H100 spot instance takes ~2.9 hours and costs ~$73 (spot pricing, not a fixed guarantee); inference can run fully locally in the browser via community-added WebGPU support, removing server costs. Ideal for: Students, educators, and AI beginners who want to grasp the nuts and bolts of LLM training; it serves as the capstone project for Karpathy’s Eureka Labs LLM101n course. Not for: Teams needing production-grade performance or reliability; it is not a replacement for tools like Ollama or HuggingFace Transformers.

Related social content