ForkFree

Learning

nanochat

by karpathy

nanochat is a small, easy-to-read code base for training your own chat language model from scratch, covering everything from tokenising text to chatting with the finished model. It is mainly meant for learning and research, and a GPT-2-level model can be trained for roughly $48 of rented GPU time.

Worth a lookEstablished, with a few things to check (listed below).

View on GitHub

Stars
60k
Licence
MIT
Runs on
A gpu machine, with a GPU
Setup
Technical
Language
Python
Age
385 days

What you can do with it

  • Train a GPT-2-level chat model from scratch on a rented multi-GPU server using one script
  • Chat with your trained model in a command-line interface
  • Run small, cheap experiments on model size and training settings by changing a single depth setting

Ways a business could use it

  • Learn how language model training works in-house before deciding whether to commission or fine-tune custom models
  • Prototype a small, cheap custom model for research or experiments without paying for a managed training service

Can you use it commercially?

Free to use, change and sell, including in paid products. Keep the copyright notice.

Not legal advice. Read the project's licence file before building a product on it.

Getting it running

Install dependencies with uv (`uv sync --extra gpu`), then run `bash runs/speedrun.sh` on a rented 8xH100 GPU server and chat with `python -m scripts.chat_cli`.

Follow the official instructions in the project README.

Things to check

  • The resulting model is weak, roughly like talking to a kindergartener, and often gives wrong answers
  • Needs rented GPU time, around $15 to $48 per full run, and a lot more if you scale up
  • Described as an experimental harness, with some hardware paths not fully tested
  • Needs technical knowledge to tune settings if your GPUs have less than 80GB of memory

Who's talking about it

Checked 03 Nov 2026. Summary drafted by AI from the project's README.

More in Learning

DeepTutor HKUDS
Worth a look

DeepTutor is an AI tutoring app that turns your documents, books and videos into a personalised learning workspace with chat, quizzes, reading help and practice. It is for people who want a study assistant that remembers their progress over time.

54.4k stars +1348 a day Apache-2.0
word-atlas designfuchen
New and promising

Word Atlas is a web app for learning IELTS vocabulary, with 7,298 words, each having an illustration, UK and US audio, example sentences and spaced-repetition review. The repository also provides the word list, images and recordings as an open dataset.

4k stars +275 a day MIT
vibe-wise nykooi1
New and promising

VibeWise is a plugin for Claude Code and Codex that helps users learn to code by guiding them through the development process while an AI writes the code.

4.1k stars +19 a day MIT