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

GitHub
AI Train2025

An asynchronous, high-throughput framework for large-scale reinforcement learning and agentic training that scales to 1T+ MoE models and 1000+ GPUs, with native verifiers integration, end-to-end SFT/RL/evals, and Slurm/Kubernetes deployment; requires NVIDIA GPUs.

GitHub

Runs a self-hosted meeting bot and transcription API that joins Google Meet, Teams and Zoom and streams speaker-attributed transcripts in real time. Compiles meetings into a git-backed Markdown workspace and runs sandboxed agents on your infrastructure; Apache-2.0 and air-gap capable.

GitHub
AI Agent2026

Trains reusable natural-language 'skills' for frozen LLM agents by optimizing the skill document in text-space — using trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts. Multi-backend, zero inference-time cost at deployment, designed for iterative, validation-led skill improvement.