nanochat

nanochat

★ 4.6 🔖 12000 saves 💰 Free GitHub

nanochat is Andrej Karpathy’s open-source project — nearly 59,000 stars on GitHub — that builds a complete ChatGPT-style system on a single GPU node for roughly $100 of compute, billed as “the best ChatGPT that $100 can buy.”

Overview

Where nanoGPT taught the model, nanochat teaches the whole product: a single, hackable codebase that covers tokenization, pretraining, mid-training, supervised fine-tuning, reinforcement learning, evaluation and finally inference behind a chat web UI. Everything runs on one 8-GPU node, and the default speedrun recipe targets about $100 of cloud compute (roughly a few hours), scaling to stronger models if you spend more. The code is deliberately dependency-light and readable end to end, so a student can trace exactly how a raw text corpus becomes a conversational assistant. Released under the MIT license, the project has trended 13 times in the archive and was actively developed through September 2026.

nanochat is intentionally the opposite of a framework: there is almost nothing between you and the machinery, so every design decision — from the Rust-based tokenizer to the RL reward — is inspectable. Karpathy maintains it as a living reference that improves as better recipes are discovered, and its leaderboard-style baselines give learners objective targets at each budget level.

Key Features

  • Full LLM stack – tokenizer to chat UI, every stage of building an assistant in one repo.
  • $100 speedrun – a complete, measurable recipe sized for a single GPU node.
  • Training and alignment – pretraining, SFT and RL stages implemented readably.
  • Built-in evaluation – benchmarks wired in so progress is quantified, not vibes.
  • Chat web UI – serve your trained model like ChatGPT for demos.
  • Hackable by design – minimal dependencies; change one variable and rerun.

💳 Pricing

nanochat is free and open source under the MIT license. The cost is your compute — the flagship recipe is designed to cost about $100 on rented GPUs.

Who Is It For

Advanced students, ML engineers and the curious who want to build a working ChatGPT clone end to end and understand every stage, not just fine-tune a checkpoint.

🚀 Visit nanochat Official Site

🚩 Report an issue