AIAny
AI Train2025
Icon for item

nanochat

Trains a full ChatGPT-style LLM from scratch on a single 8xH100 node for about $48 in ~2 hours, covering tokenization, pretraining, finetuning, RL, inference, and a web UI in one minimal, hackable codebase you can fork.

Introduction

Most "train your own LLM" repos stop at a training loop and leave you to glue together tokenizers, eval harnesses, and serving yourself. nanochat collapses the entire pipeline — tokenization, pretraining, finetuning, RL, inference, and a ChatGPT-like web UI — into one readable codebase, then makes the whole thing controllable with a single --depth knob that derives every other hyperparameter for you. The point is not raw quality; it's that a complete LLM lifecycle now fits in a code budget a single person can read in an afternoon.

What Sets It Apart
  • One dial, not fifty: --depth sets transformer layer count and auto-computes the rest, so scaling up or down is a single number rather than a config-tuning project.
  • Honest cost math: a GPT-2-grade model trains for ~$48 on 8xH100 (~2 hours), or ~$15 on spot — concrete enough to budget a real experiment instead of guessing.
  • Transparency over magic: a global COMPUTE_DTYPE replaces autocast, so precision behavior is explicit rather than hidden — valuable when you're learning why training behaves the way it does.
  • A "Time-to-GPT-2" leaderboard reframes the goal as wall-clock speedrunning, turning training efficiency into something measurable and competitive.
Who It's For

Great fit if you want to understand an LLM end-to-end by reading and modifying every stage, or need a clean baseline to fork for research and teaching. Look elsewhere if you want a production-grade model or state-of-the-art quality — the ceiling here is roughly GPT-2 capability, and the design optimizes for legibility and speed, not benchmark wins. Treat it as the spiritual successor to nanoGPT extended across the full chat pipeline, not as a drop-in chatbot.

Information

  • Websitegithub.com
  • AuthorsAndrej Karpathy
  • Published date2025/10/13

More Items

Converts real repositories into verifiable, sandboxed training environments with black-box tests to train coding agents on long-horizon program reproduction. Provides Program-Env for automated environment construction and Program-Agent for a role-isolated development workflow, yielding 1,648 C/C++/Go/Rust tasks and improving benchmark performance.

GitHub
AI Agent2026

Primes Claude with drop-in SKILL.md files that encode concise offensive-security methodology across 78 skills in 23 categories, enabling Claude to act as a context-aware red team operator. Intended for authorized red team engagements, bug-bounty triage, security research and CTF practice.

GitHub
Chatbot2026

Self-hosted, multi-user, multi-agent AI assistant with a web dashboard, CLI, IM channel integrations, cron automation, RAG knowledge bases, and ACP IDE delegation. Runs as a single-process local-first service with pluggable workspace backends and plugin extensibility.