Introduction
nanochat is Andrej Karpathy's open-source project that trains a working ChatGPT-style model from scratch for about $100, and LLM Council is his companion weekend app that answers your questions by polling several frontier models at once. Both were released in late 2025, both are small and legible enough to read in an afternoon, and both exist to demystify how modern AI systems actually work rather than to compete with them.
nanochat packs the entire pipeline of a large language model (LLM) — tokenizer, pretraining, fine-tuning, optional reinforcement learning, and a chat interface — into a single codebase of roughly 8,300 lines. LLM Council takes the opposite tack: instead of building a model, it orchestrates existing ones. This post covers what each project is, the concrete numbers behind them, and why "build your own ChatGPT" is now a realistic weekend exercise. It is a separate strand of work from his project on LLM-managed notes; here we stay strictly on the code artifacts.
What Is nanochat?
nanochat is a full-stack, from-scratch implementation of a ChatGPT-style assistant in one clean, minimal, dependency-light repository. Karpathy describes it as "the best ChatGPT that $100 can buy." Where his earlier and hugely influential nanoGPT covered only pretraining, nanochat carries a model through every stage needed to actually talk to it — and it does so in about 8,300 lines across 44 files (roughly 334,000 characters), small enough that a motivated reader can follow the whole thing.
The project lives at github.com/karpathy/nanochat and was released in October 2025. It had grown to roughly 56,000 GitHub stars as of July 2026, making it one of the most-starred educational AI repositories on the platform. The entire run is driven by a single speedrun.sh script that executes the pipeline end to end on one 8xH100 GPU node.
What nanochat trains, step by step
The value of nanochat is that it shows each stage that a production assistant also passes through, just at a scale you can afford:
- Tokenization. nanochat trains its own tokenizer, the component that chops text into the sub-word units a model reads. See tokenization for how this step works and why it matters.
- Pretraining. The base model — around 561 million parameters in the reference run — learns general language patterns from a large text corpus. This is where the bulk of the compute goes.
- Supervised fine-tuning (SFT). Fine-tuning adapts the pretrained base into a conversational assistant using curated instruction-and-response examples.
- Optional reinforcement learning (RL). An optional stage further nudges the model toward helpful behavior, for example improving performance on grade-school math problems.
- Inference and chat. Finally you run inference to actually use the model — either through a terminal CLI (
chat_cli) or a small ChatGPT-like web UI served by FastAPI (chat_web).
What $100 and four hours actually buy
The headline reference run rents an 8xH100 node at roughly $24 per hour and finishes in about four hours (Karpathy reports a wall-clock time of 3 hours 51 minutes), for a total near $92 to $100. That model reaches a CORE score of about 0.22 — above GPT-2 large (~0.21) but a touch below the full GPT-2 XL (~0.26) — so in plain terms, roughly $100 buys you GPT-2-grade capability trained from nothing.
nanochat is deliberately tiered so you can spend more for more:
- A cheaper tier reaches GPT-2-grade quality for around $48 in about two hours, or closer to $15 on a spot instance.
- The $100 tier is the default speedrun described above.
- A larger ~$1,000 tier trains a deeper "depth-32" model. It was specced for about 41.6 hours on the same node (Karpathy reported it finishing in roughly 33 hours) and lifts the CORE score to about 0.31, comfortably above GPT-2's ~0.26, while grade-school math accuracy (GSM8K) climbs from around 13% to roughly 20%.
For perspective, the original GPT-2 reportedly cost on the order of $43,000 to train in 2019. nanochat's point is not that a $1,000 model is good — it is that the whole pipeline is now cheap, legible, and hackable.
What Is LLM Council?
LLM Council is a small local web application that answers a question by convening a "council" of frontier models rather than trusting any single one. Karpathy released it on November 22, 2025 as a weekend project — a "Saturday hack" he used while reading books alongside LLMs — and it lives at github.com/karpathy/llm-council, with roughly 23,000 GitHub stars as of July 2026.
Under the hood it is intentionally modest: a FastAPI backend (Python 3.10+) talking to a React and Vite frontend, with all model calls routed through OpenRouter so a single API key reaches many providers. Conversations are stored as plain JSON files.
How the council reaches an answer
The app runs your question through three stages:
- Dispatch. Your query goes to several frontier models in parallel — the example configuration lists OpenAI's GPT-5.1, Google's Gemini 3 Pro, Anthropic's Claude (Sonnet 4.5 in the sample config, though you can point it at Claude Opus 4.8), and xAI's Grok 4. Each response is shown in its own tab.
- Anonymous review and ranking. Each model is then shown the others' answers with the authorship stripped out, and asked to review and rank them for accuracy and insight. Anonymity is the clever part: a model cannot simply favor its own output because it does not know which answer is its own.
- Chairman synthesis. A designated "chairman" model reads the individual answers and the rankings, then compiles everything into a single final response.
The result is a lightweight, transparent way to compare frontier models on your own questions and to see where they agree or disagree — a hands-on take on the "LLM-as-a-judge" idea that many evaluation pipelines use in production.
Build Your Own ChatGPT: What These Projects Are For
The through-line from nanoGPT to nanochat to LLM Council is consistency of intent: Karpathy keeps shipping small, readable, educational artifacts that make AI legible. nanochat answers "how is a ChatGPT built, end to end?" LLM Council answers "how do I put several finished models to work together?" Neither hides behind a giant framework.
It is important to be clear-eyed about what they are not. A ~$100 nanochat model is roughly GPT-2 grade; it will produce short, often shaky answers and cannot approach a modern production assistant. Frontier systems are trained on vastly more data and compute, and many use advanced architectures such as mixture-of-experts (MoE) that nanochat's simple dense transformer does not implement. LLM Council, for its part, is a convenience layer over paid third-party APIs — you still pay per token through OpenRouter, and its answers are only as good as the frontier models it calls.
Treated as what they are — learning tools and hackable starting points, not production frontier systems — both are unusually valuable. Reading nanochat teaches more about how assistants work than most courses, and standing up LLM Council takes minutes and turns the abstract question of "which model is better?" into something you can watch happen.
Conclusion
nanochat and LLM Council are two sides of the same educational coin. nanochat lets you train a ChatGPT-style model from scratch for about $100 in four hours and read every line that makes it work; LLM Council lets you orchestrate the best existing models into a self-reviewing panel with a chairman. Both are open source, both are deliberately small, and both trade production polish for clarity. If you want to genuinely understand how modern AI is built and used — rather than just consume it — cloning these two repositories is one of the highest-leverage weekends available in 2026.
To go a level lower and see how the coding agents built on top of these models work, see Thorsten Ball's guide to building a code-editing agent in 400 lines.