platform. GPUs with less than 80GB may run out of VRAM; reduce --device-batch-size until it fits.
Who it is forAn ML engineer who wants to see the full LLM pipeline on one GPU node.
The problemFull LLM training stacks are large and hard to follow from tokenizer to chat.
The outcomeYour own trained model you can chat with over the CLI after about 1.5 to 2 hours on 8XH100.
What you need first
- uv
- An 8XH100 or 8XA100 node for the speedrun (a single GPU works, 8 times slower)
- CPU or Apple Silicon only for the tiny runcpu example
Steps
- Run
uv sync --extra gpufor CUDA - Run
source .venv/bin/activate - Run
bash runs/speedrun.sh, ideally in a screen session - Run
python -m scripts.chat_clito talk to the model
Prompt for your agent
On this 8-GPU node, set up karpathy/nanochat with `uv sync --extra gpu`, run `bash runs/speedrun.sh` in a screen session, and when it finishes start `python -m scripts.chat_cli`.
Caveat. Cloud GPU time costs money; the README puts the GPT-2 run at about $48, closer to $15 on a spot instance.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for karpathy/nanochat and "Train a GPT-2 class chat model end to end and talk to it"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer