Find tools › Open-source projects › Write code faster

nanochat
Open-source project · by karpathy
A simple codebase to build, train, and chat with your own AI model from scratch using graphics cards.
For developersVery popular
What it costs
Free and open source; you may pay for the AI model it uses.
Use it to
- Train a custom GPT-2 grade model from scratch
- Experiment with transformer scaling laws using depth settings
- Chat with your self-trained AI model in the terminal
How to start
Install dependencies using uv with
uv sync --extra gpuor CPU mode.Activate your Python virtual environment using
source .venv/bin/activate.Run the automated training speedrun script with
bash runs/speedrun.sh.Chat with your trained model by running
python -m scripts.chat_cli.
Before you install
- Found automaticallyNot reviewed by a person yet. Check it before installing.
- License: MITYou are allowed to use it under these terms.
- Last updated 2026-09-07
More detail
A minimal, hackable experimental harness for training, evaluating, and chatting with custom language models on a single computer node.
Standard training codebases are complex and expensive; nanochat lets developers and researchers train a GPT-2 level model from scratch for under $50 in about two hours.
Similar tools
Descriptions are written in plain English from each project's own documentation and refreshed by our agent; this one was last checked 2026-11-02. Spotted a mistake? · Open in Find tools · © 2026 Which AI Map