LogoAIRosetta

Andrej Karpathy's autoresearch: AI agent autonomous single-GPU pipeline experiments

GitHub

SummaryIn March 2026 Andrej Karpathy published the minimal autoresearch repo on GitHub. The three-file project lets an AI agent edit train.py, run 5-minute experiments on a single GPU and evaluate val_bpb to autonomously and continuously optimize a model, demonstrating a low-cost autonomous research loop.

In March 2026, Andrej Karpathy published a new personal project autoresearch on GitHub (https://github.com/karpathy/autoresearch). The project quickly drew broad attention in the AI community and has accumulated 69.4k stars; it is seen as a minimalist yet instructive demonstration of "AI agents autonomously conducting scientific research." The core aim is to enable an AI agent to iterate automatically on a minimal nanochat training pipeline on a single GPU: the agent autonomously edits train.py, runs fixed‑duration experiments, evaluates validation performance by val_bpb, and decides whether to keep changes, thereby progressively optimizing the model without human supervision.

In the README Karpathy defines autoresearch as a "minimal autonomous research loop." The repository contains only three core files and is highly streamlined while implementing a complete loop from code modification to experiment evaluation. The project continues Karpathy's minimalist style: using minimal code and compute to illustrate a core paradigm shift in AI research⁠—⁠from human manual tuning to agent‑driven exploration.

Core architecture: three files that form a complete research loop

autoresearch is extremely simple in implementation yet logically rigorous. The repo contains the following three key files, and the agent is allowed to modify only one:

  • prepare.py: an immutable data‑preparation script. It downloads datasets, trains a BPE tokenizer, builds the DataLoader and evaluation tools. This file is not modified to ensure experiment repeatability and fairness.
  • train.py: the only file the AI agent may edit. It contains a full GPT‑style Transformer model definition, the Muon + AdamW optimizer combination, and the training loop. This file is the project's experimental playground; the agent explores optimization by editing hyperparameters and architectural details (such as number of layers, attention mechanisms, batch size, etc.).
  • program.md: a lightweight instruction file written or iterated by humans to guide the agent's experimental strategy⁠—⁠for example, instructing the agent to "try increasing model depth and adjust learning rate" or "try a new windowed attention pattern." This file is the human⁠–⁠machine collaboration bridge: humans set research directions, agents execute them.

The project uses a fixed 5‑minute wall‑clock budget: each experiment is strictly limited to five minutes (excluding startup and compile time). After training, the validation bits‑per‑byte (val_bpb) metric is computed automatically. This design ensures comparability across experiments regardless of whether the agent modified depth, batch size, or optimizer: results are compared fairly under the same time budget.

The full process is highly automated: the agent reads program.md instructions, proposes edits to train.py, runs uv run train.py, parses val_bpb from logs, judges improvement, and decides whether to keep or discard the change before proceeding to the next iteration. Karpathy notes that an overnight run (about 8⁠–⁠10 hours) typically completes around 100 experiments; researchers can inspect the results.tsv log the next morning to find the full experiment record and the best configuration.

Technical details and design philosophy

autoresearch pursues extreme simplicity and auditability:

  • Single‑file edit rule: the agent may only modify train.py; changes are presented as diffs to facilitate human review and understanding.
  • Fixed time budget: avoids the bias of "longer runs are better" in traditional research and forces the agent to optimize for efficiency under limited compute.
  • val_bpb as the core metric: this metric is independent of vocabulary size and allows fair comparison between different architectures.
  • Self‑contained environment: managed by uv with minimal dependencies (only basic libraries like PyTorch), it can run on a single NVIDIA GPU (tested on H100). Community contributions have added macOS (MLX), Windows and AMD adaptations.
  • Logging and analysis: all experiment results are recorded in results.tsv and an accompanying analysis.ipynb is provided for visualization and statistical analysis.

Karpathy stresses the design philosophy in the README: "let AI agents work like human researchers but give machines the most tedious, repetitive experiment iterations." The project is essentially a minimal feasibility validation of "AI doing research," laying groundwork for larger‑scale autonomous research pipelines.

Significance: a paradigm shift from human‑led to AI‑driven research

Although small in scale, autoresearch has important demonstrative value. It shows that under highly constrained compute (single GPU, fixed 5 minutes), an AI agent can still achieve continuous iteration through autonomous code modification. This model could scale to larger models, more tasks, and potentially full automation of research workflows.

Against the background of rising AI research costs and long iteration cycles, autoresearch offers a low‑cost path to validate ideas. Karpathy himself stated the project is a small‑scale experiment exploring "AI agent autonomous research," which could evolve into more complex multi‑agent systems or fully automated paper‑generation pipelines.

Since release the project has rapidly attracted community attention, gained stars and produced forks adapting it to multiple platforms, demonstrating strong extensibility. Many developers consider it a best‑practice case for learning AI agent engineering.

Conclusion: broad vision in a minimalist form

With minimal code and low compute requirements, autoresearch demonstrates the potential of AI agents in scientific research. It is not a complete research system but a "seed"⁠—⁠a technical proof that autonomous research loops are feasible. Through this project Karpathy once again shows his tendency to explore core questions with minimal resources.

As AI evolves from an "assistive tool" to an "independent researcher," autoresearch provides a clear starting point. It reminds us that future research may no longer be done solely by humans but by close human⁠–⁠machine collaboration in which AI handles much repetitive work. As more developers extend and improve the project, the era of AI‑driven autonomous research may already be quietly beginning.

▶️ Enjoyed this article? Creating content is hard!

Follow our YouTube channel:
AI Rosetta

Your likes, subscriptions, and shares are our greatest support! 🙏

More AI news at: https://www.airosetta.com

CopyrightStatement

Comment

Please login before commenting

NoComments

RelatedNews

LoadingMore

Andrej Karpathy's autoresearch: AI agent autonomous single-GPU pipeline experiments - Airosetta News