Comparison
pi autoresearch vs karpathy/autoresearch
Two projects, same word, different jobs. If you are deciding which one to read up on, the question is not which is better — it is whether you want to train a model or optimize a repo you already own.
The short version
karpathy/autoresearch is a small, self-contained training project: one NVIDIA GPU, a simplified single-GPU implementation of nanochat, and an agent that edits train.py while the clock runs. Every experiment gets the same five minutes of wall clock, and the number it reports is val_bpb — validation bits per byte, lower is better. Around 12 experiments an hour, roughly 100 while you sleep. The human edits program.md, the agent edits train.py, prepare.py stays untouched.
pi-autoresearch is the same loop pattern, packaged as an extension for the pi coding agent. It ships no training code. You bring any shell command that prints METRIC name=number, and the loop works the same way: baseline, edit, commit, measure, keep or revert. The metric can be validation loss, but it can just as easily be test runtime, bundle size or a Lighthouse score.
Where they actually differ
| karpathy/autoresearch | pi-autoresearch | |
|---|---|---|
| What you install | A repo with train.py, prepare.py, program.md |
pi install npm:pi-autoresearch into pi |
| What gets optimized | LLM training on one GPU (nanochat), metric val_bpb |
Anything with a command and one number |
| The fixed budget | Exactly 5 minutes of training per try | Whatever your command takes |
| Who runs it | Claude / Codex / any agent you point at program.md |
The pi agent, with tools that own the log |
| Session state | results.tsv and the git history |
.auto/prompt.md, .auto/log.jsonl, .auto/measure.sh |
| A win that breaks tests | You watch for it | Optional .auto/checks.sh blocks the keep |
| Multiple domains | One project, one metric | One install, many sessions on many repos |
Why the pi version exists
The interesting part of the original was never the neural network. It was the framing: a fixed budget makes experiments comparable, a single editable file keeps diffs reviewable, and a Markdown file is enough to tell an agent how to behave. Those three ideas work anywhere.
pi-autoresearch keeps them and drops the domain. Instead of a Python file the agent must not touch, you get a list of files in scope in .auto/prompt.md. Instead of a hardcoded five-minute budget, you get whatever your measure command costs. Instead of a .tsv you maintain by hand, you get a JSONL log written by the extension tools — so it survives context compaction and a fresh session can resume from it.
It also adds the two things that make an unattended loop tolerable in a real repo: a confidence score that compares each win to the session noise floor, and backpressure checks that revert a fast-but-broken change before it lands as a commit.
Which one should you start with
If you want to poke at the original idea and you have an NVIDIA GPU, start with karpathy/autoresearch — it is self-contained and it is the cleanest demonstration of the pattern. If you already have a repo with a number you care about, installing the extension into pi gets you the same loop this afternoon, on the machine you are already typing on.
One honest limitation of the pi version: it will optimize whatever you measure, including a noisy measurement. The original avoids that by making every run exactly five minutes; with arbitrary commands, the noise floor is your responsibility, and the confidence score is there to warn you when you forgot.
The original repo is MIT licensed and has notable forks for macOS, Apple Silicon, Windows and AMD. The upstream is at karpathy/autoresearch; the pi extension is at pi-autoresearch on GitHub, and its variant that isolates each session in a git worktree is covered on the harness page.