TopGit
GitHub Repo Review

autoresearch: Autonomous AI Research for LLMs

karpathy/autoresearch
ATopGit review image for karpathy/autoresearch
Review by Topgit.dev for karpathy/autoresearch, with GitHub repository stats and README context.
Quick verdict

autoresearch is Andrej Karpathy's setup for letting a coding agent tune a small LLM training run by itself overnight, editing train.py and keeping whatever change lowers val_bpb. It's worth running if you enjoy watching an agent work inside a tight, honest feedback loop on real GPU hardware. Skip it if you want a finished framework: the README treats program.md as a bare-bones starting point, not a tuned process.

Stars
★ 96.4k
Forks
⑂ 13.5k
Language
Python
License
See repository
Topic
AI Tools
Updated
Mar 2026
Homepage
GitHub

How AI Agents Drive Research

autoresearch pairs a coding agent such as Claude or Codex with a simplified, single-GPU version of Karpathy's nanochat training code, so the agent can experiment without a person touching any Python file directly. You point it at program.md, a lightweight instructions file, and it edits train.py, runs a fixed 5-minute pass, checks val_bpb (validation bits per byte), and decides whether to keep or drop the change before starting the next one.

The Challenge of Manual LLM Tuning

Iterating on a training setup usually means a person babysitting one run at a time, deciding what to try next, and staying at the keyboard for hours to get through a handful of experiments. autoresearch hands that decision loop to a coding agent instead: give it a small, real single-GPU nanochat setup, a hard 5-minute time budget per run, and a single metric, val_bpb, to judge itself against, so it can work through roughly a dozen experiments an hour without anyone watching.

Key Design Principles

  • Three files with fixed roles: prepare.py handles data prep, tokenizer training, and evaluation utilities and is never touched; train.py holds the GPT model, the optimizer (Muon plus AdamW), and the training loop, and is the only file the agent edits.
  • A fixed 5-minute wall-clock budget per training run, excluding startup and compilation, which the README says works out to roughly a dozen experiments an hour and close to 100 overnight.
  • val_bpb (validation bits per byte) as the single scoring metric, picked because it stays comparable across architecture changes regardless of vocabulary size.
  • program.md is the file a human edits to steer the agent; the README calls it a lightweight skill rather than a config file.
  • Self-contained by design: dependencies are limited to PyTorch and a handful of small packages, with no distributed training or extra config system.
  • Training code is a simplified, single-GPU cut of Karpathy's own nanochat project, not a separate reimplementation.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history

Quick Start: Setting Up Autoresearch

The README's requirements: one NVIDIA GPU (the maintainer's own testing was on an H100), Python 3.10+, and the uv project manager. Four commands, start to finish. Install uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`), install dependencies (`uv sync`), run the one-time data and tokenizer prep (`uv run prepare.py`, about 2 minutes), then run one training pass by hand to confirm it works (`uv run train.py`, about 5 minutes). Once that succeeds, open the repo in Claude, Codex, or a similar coding agent, turn off its permission prompts, and ask it to read program.md and start an experiment.

Strengths

  • The scope is narrow on purpose: one file to edit (train.py), one metric to judge it (val_bpb), one fixed time budget (5 minutes), which is what makes an unattended loop plausible at all.
  • Built on Karpathy's own nanochat training code, so the model and the Muon plus AdamW optimizer are a real training loop, not a toy stand-in.
  • MIT license, so there's nothing stopping you from adapting or forking it.
  • Setup is short: four commands, and you either have a working environment or you find out fast.
  • People have already forked it for MacOS, Windows, and AMD, so H100 isn't the only hardware path if you're willing to use someone else's fork.

Hardware and Platform Considerations

  • Needs one NVIDIA GPU today, and the maintainer's own runs were on an H100; the README says CPU and MPS support are possible in principle but nothing he's committed to building himself.
  • No native Windows or AMD path in this repo; the README sends you to community forks for those instead.
  • The default program.md is called an intentionally bare-bones baseline in the README, so the agent isn't running a tuned process out of the box.
  • Per the README's own design notes, results from the fixed 5-minute budget aren't comparable across different GPUs or compute setups.
  • Running the agent means disabling its permission prompts, per the README's own instructions, which is a real trust trade-off since it's autonomously editing your training code.

Community-Maintained Forks

miolini/autoresearch-macos — a MacOS-focused fork listed in the README's notable-forks section.trevin-creator/autoresearch-mlx — another MacOS fork, built for Apple's MLX framework.jsegov/autoresearch-win-rtx — a Windows and RTX-focused fork.andyluo7/autoresearch — an AMD GPU fork.karpathy/nanochat — the parent project autoresearch's training code is simplified from, with wider platform support built in.

Frequently Asked Questions

What is the license for autoresearch?

autoresearch is released under the MIT license, per the repository's own License section.

What hardware is required to run autoresearch?

autoresearch needs a single NVIDIA GPU, tested by the maintainer on an H100, plus Python 3.10+ and the uv package manager.

Can autoresearch be run on MacOS or Windows?

Not directly; the base repo needs an NVIDIA GPU. The README points to community forks instead, including autoresearch-macos and autoresearch-mlx for MacOS and autoresearch-win-rtx for Windows.

How does autoresearch measure experiment success?

autoresearch scores each run on val_bpb (validation bits per byte), a metric the README picks because it stays comparable across architecture changes regardless of vocabulary size; lower is better.

How long does an autoresearch experiment take?

Each training run is capped at a fixed 5 minutes of wall-clock time, excluding startup and compilation, which the README estimates as roughly a dozen experiments per hour.

What files do the AI agents modify in autoresearch?

The agent only edits train.py, which holds the model, optimizer, and training loop. prepare.py stays fixed, and program.md, the agent's instructions file, is meant to be edited by the human instead.

Best use cases

  • Running an unattended tuning session overnight on a spare GPU to see what a coding agent converges on when it's scored only by val_bpb.
  • Studying how an agent behaves inside a narrow, well-defined loop (edit train.py, run 5 minutes, check one number, repeat) instead of an open-ended coding task.
  • Starting from this repo to build a platform-specific fork, the way the MacOS, Windows, and AMD forks already listed in the README have done.
  • Looking at a stripped-down, single-GPU version of the nanochat training loop without the broader platform-support code the parent project carries.

Who should try it — and who should skip

Try autoresearch if you have a spare NVIDIA GPU and want to watch, or steer, a coding agent run its own overnight tuning loop against a real, small nanochat-based setup. It's also a fair weekend project to fork for your own hardware, since people already have for MacOS, Windows, and AMD. Skip it if you need a general-purpose training framework, don't have GPU access, or want something more finished than a bare-bones baseline you're expected to extend yourself.

Related repositories

Source & attribution

Facts and quotes sourced from the karpathy/autoresearch GitHub repository and its README.

GitHub data · last synced Aug 14, 2026Reviewed by Henry
Back to TopGit

Is autoresearch worth your time?

ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of autoresearch.

GitHub