one year on
Karpathy releases nanochat, a $100 end-to-end ChatGPT clone
Andrej Karpathy's new open-source project trains a small chat model in about four hours on a single 8xH100 node, lowering the barrier for full-stack LLM experimentation.
Originally published Published on this site
Andrej Karpathy today released nanochat, an open-source project that he describes as “the best ChatGPT that $100 can buy.” The repository is a full-stack implementation of an LLM like ChatGPT in a single, minimal codebase of around 8,000 lines, mostly Python with PyTorch and a small Rust component for tokenizer training. It includes tokenizer training, pretraining, midtraining, supervised finetuning, evaluation, and a ChatGPT-style web interface. According to Karpathy’s detailed discussion post, the entire pipeline can be run on a single 8xH100 node rented from a cloud provider for about $24 per hour, completing a training run in roughly four hours for a total cost near $100. The resulting model has ~561 million parameters and is trained on ~24GB of the FineWeb-EDU dataset, then midtrained on a mixture of SmolTalk, MMLU auxiliary train, and GSM8K, followed by SFT.
Karpathy walks through each stage in the post, including the use of a custom Rust tokenizer, the choice of Muon and AdamW optimizers, and the CORE evaluation metric. The pretraining run uses 20 layers, a model dimension of 1280, and approximately 11.2 billion tokens to meet Chinchilla scaling recommendations. After pretraining, the model can complete prompts like “The capital of France is” with “Paris” and knows that the chemical symbol of gold is Au. Midtraining adds the conversational setup and benchmark task mix; SFT gives the model a small bump in metrics. A 4-hour run yields a model that can chat almost coherently; 12 hours reportedly slightly outperforms GPT-2. Simon Willison notes that the model should easily fit on even an inexpensive Raspberry Pi, and a Hugging Face build by Sam Dobson is already available.
On Hacker News, the post has 1,523 points and 308 comments. Much of the discussion centered on Karpathy’s remark that he wrote the code almost entirely by hand, with AI coding agents proving unhelpful for this particular repo. Some commenters related to the sentiment that their own work is “too far off the data distribution” for current AI tools, while others debated the broader hype around AI coding. The release prompted immediate experimentation, with Willison publishing a CPU inference script for macOS.
The record
said the code was basically entirely hand-written with tab autocomplete, and that Claude/Codex agents were net unhelpful because the repo is too far off the data distribution
wrote that the project provides a full ChatGPT-style LLM, from training to inference to web UI, and that 561M parameters should run on almost anything
joked that Karpathy's comment about the repo being too far off the data distribution explains why these models have been useless to them
One year later — open only if you can handle spoilers
nanochat grew into a community speedrun: by March 2026 its 'time-to-GPT-2' leaderboard had cut the time to beat GPT-2's benchmark score on a single 8xH100 node to 1.65 hours, well under $100 of rented compute against roughly $43,000 to train GPT-2 in 2019.
Filed
Compiled and edited by Adam Allcock.
The Weekly Replay · free by email
This week, one year ago — every Sunday.
One email each Sunday: the week's replayed AI news, with the one-year-later annotations included. Written like it's breaking — dated like it isn't.
Free · double opt-in · unsubscribe anytime · privacy