AI/TLDR

Andrej Karpathy · 2026-03-06 · major

AutoResearch — autonomous ML experiment runner

Karpathy's 630 lines of Python that let an AI agent autonomously design, run, and iterate on ML training experiments — about 12 per hour, 100 overnight. 70.6k stars in under three weeks.

AutoResearch GitHub repository social card

Give an AI agent a small LLM training setup, go to sleep, and wake up to 100 completed experiments — Karpathy's viral 630-line repo.

Key specs

LicenseMIT
GitHub stars70.6k
Experiments/hour~12

What is it?

AutoResearch is a minimal framework from Andrej Karpathy, published March 6, 2026, that lets an AI agent autonomously run ML research experiments. You provide a single train.py file containing a full GPT model, optimizer, and training loop, plus a program.md file with research instructions. The agent modifies the training code, runs 5-minute experiments, checks validation loss, keeps improvements, discards failures, and repeats.

How does it work?

Each experiment runs on a single GPU with a fixed 5-minute time budget. The validation metric is bits-per-byte (val_bpb), which is vocabulary-size-independent so architectural changes can be fairly compared. The agent writes its research instructions via markdown rather than editing Python directly. At roughly 12 experiments per hour, you can expect about 100 completed runs overnight.

Why does it matter?

This is a concrete, working demonstration that AI agents can do useful ML research autonomously — not in theory, but on a real training loop with measurable results. The 70.6k stars in under three weeks show the community agrees this is the right abstraction. It also sets a template: give agents a constrained sandbox, a clear metric, and let them iterate.

Who is it for?

ML researchers, anyone curious about automated ML experimentation.

Try it

git clone https://github.com/karpathy/autoresearch && python prepare.py

Sources · 2 outlets

Tags

  • ml-research
  • automation
  • training
  • experiments
  • karpathy

← All releases · Learn AI