# Autoresearch lets an AI agent run overnight LLM training experiments on one GPU

> A small single-GPU LLM training setup in which an AI agent edits the training code, runs five-minute experiments and keeps only the changes that improve the validation score.

- Project: autoresearch by karpathy
- List: Built for AI
- Kind: tool
- Works with: Claude, Codex
- Noticed: 100,618 GitHub stars (when we found it)
- Added: 2026-11-25T21:11:00+00:00
- Web page: https://ai-news.ikangai.com/built/autoresearch/

autoresearch is a small project from Andrej Karpathy in which an AI agent repeatedly modifies a language model training script, trains it for five minutes, and keeps or discards the change. The README says it is a simplified single-GPU version of his nanochat repository. The agent edits only train.py, which holds the GPT model, a Muon and AdamW optimizer, and the training loop. The human edits program.md, the Markdown instructions the agent reads. The metric is val_bpb, validation bits per byte, where lower is better.

Setup requires a single NVIDIA GPU, which the author tested on an H100, plus Python 3.10 or newer and uv. After uv sync, running prepare.py downloads data and trains a tokenizer. This one-time step takes about two minutes. The author writes that the loop yields roughly 12 experiments an hour, or about 100 while you sleep. To start, you point Claude, Codex or another agent at program.md with permissions disabled.

The README says it needs an NVIDIA GPU. It also says that support for CPU, MPS and other platforms would bloat the code, so the author is not sure he will add them. Community forks cover MacOS, Windows and AMD. Because every run gets the same time budget, results cannot be compared with runs on other hardware. The project is released under the MIT licence.

## In the author's words

> give an AI agent a small but real LLM training setup and let it experiment autonomously overnight

## When to reach for it

Reach for it when you want an agent to try many small training changes unattended. The fixed five-minute budget makes experiments comparable whatever the agent changes, and limiting edits to one file keeps the diffs reviewable.

## See it

- [autoresearch](https://github.com/karpathy/autoresearch)

---

AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it.
