karpathy /autoresearch
AI agents running research on single-GPU nanochat training automatically
★ 99,722⑂ 13,739👁 733⑃ 411● 116▤ 0◈ 112
99,722
stars
+78
13,739
forks
733
watchers
411
prs
116
issues
0
releases
112
discussions
README
autoresearch !teaser One day, frontier AI research used to be done by meat computers in between eating, sleeping, having other fun, and synchronizing once in a while using sound wave interconnect in the ritual of "group meeting". That era is long gone. Research is now entirely the domain of autonomous swarms of AI agents running across compute cluster megastructures in the skies. The agents claim that we are now in the 10,205th generation of the code base, in any case no one could tell if that's right or wrong as the "code" is now a self-modifying binary that has grown beyond human comprehension. This repo is the story of how it all began. -@karpathy, March 2026. The idea: give an AI agent a small but real LLM training setup and let it experiment autonomously overnight. It modifies the code, trains for 5 minutes, checks if the result improved, keeps or discards, and repeats. You wake up in the morning to a log of experiments and (hopefully) a better model. The training code here is a simplified single-GPU implementation of nanochat. The core idea is that you're not touching any of the Python files like you normally would as a researcher. Instead, you are programming the program.md Markdown files that provide context to the AI agents and set up your autonomous research org. The default program.md in this repo is intentionally kept as a bare bones baseline, though it's obvious how one would iterate on it over time to find the "research org code" that achieves the fastest research progress, how you'd add more agents to the mix, etc. A bit more context on this project is here in this tweet and this tweet. How it works The repo is deliberately kept small and only really has three files that matter: - prepare.py — fixed constants, one-time data prep (downloads training data, trains a BPE tokenizer), and runtime utilities (dataloader, evaluation). Not modified. - train.py — the single file the agent edits. Contains the full GPT model, optimizer (Muon + AdamW), and training loop. Everything is fair game: architecture, hyperparameters, optimizer, batch size, etc. This file is edited and iterated on by the agent. - program.md — baseline instructions for one agent. Point your agent here and let it go. This file is edited and iterated on by the human. By design, training runs for a fixed 5-minute time budget (wall clock, excluding startup/compilation), regardless of the details of your compute. The metric is val_bpb (validation bits per byte) — lower is better, and vocab-size-independent so architectural changes are fairly compared. If you are new to neural networks, this "Dummy's Guide" looks pretty good for a lot more context. Quick start Requirements: A single NVIDIA GPU (tested on H100), Python 3.10+, uv. bash 1. Install uv project manager (if you don't already have it) curl -LsSf https://astral.sh/uv/install.sh | sh 2. Install dependencies uv sync 3. Download data and train tokenizer (one-time, ~2 min) uv run prepare.py 4. Manually
Top issues
#57Codex doesn't seem to work?41 comments · 2026-03-08#47improvements to novelty8 comments · 2026-03-08#599Agent can lower val_bpb without improving the model — add an optional experiment integrity log?5 comments · 2026-05-31#6Rotary embeddings pre-allocate 10x more memory than needed4 comments · 2026-03-07#215Harden downloaded dataset shard cache in prepare.py3 comments · 2026-03-12#200Is there a plan to reduce hallucinations?3 comments · 2026-03-12#42Proposal: explicit "Ralph Wiggum loop" for autonomous experimentation3 comments · 2026-03-08#596RTX 3060 fork — 27 experiments, 25% improvement (1.604 → 1.201 val_bpb)2 comments · 2026-05-23
Discussions
#649Autonomous research on physical instruments: what should the experiment be allowed to change?0 comments · 2026-10-16#645Autoresearch Sentinel: a controller-driven experiment loop beyond LLM training0 comments · 2026-10-03#641autoresearch-xv — one vendor-agnostic source (NVIDIA+AMD) for measuring the cross-vendor efficiency gap0 comments · 2026-09-09#635Application of the autoresearch loop to verifiable CoT generation (programmatic solvers + twin-blind checks)0 comments · 2026-08-02#632Causal Architectures of Consciousness0 comments · 2026-07-26#630check and involve me too1 comments · 2026-07-20#612What Happens When the Research Loop Gets Stuck?1 comments · 2026-06-16#603Is Anthropic's Recursive Self-Improvement just autoresearch at scale, or a different paradigm?1 comments · 2026-06-10
相关报道 (6)
Yahoo奇摩新聞AutoResearch一夕爆紅!GitHub破4萬顆星,這630行程式碼如何讓AI自己做研究?2026-03-2051CTO详解 Andrej Karpathy 全新工具 Autoresearch 入门全攻略2026-04-29新浪财经_金融信息服务商Karpathy开源“AI研究员”,630行代码让智能体通宵炼模型,一晚可跑100次实验|OpenAI|训练|文件|人类|迭代_手机新浪网2026-04-08麻省理工科技评论从选题到论文一键生成:最新“论文虾”把Karpathy的autoresearch往前推了十步2026-03-18InfoQ.cn两天推翻 Karpathy 20 年工作习惯!百行代码开源项目“封神”,AI 替你通宵肝研究、战绩可查2026-03-17智源社区卡帕西630行代码炸出81个智能体,4天协作跑2333次实验,公布预训练十大发现2026-03-17
News & coverage (18)
Hacker NewsAutoresearch: Agents researching on single-GPU nanochat training automatically▲ 208 · 58 comments · 2026-03-07Hacker NewsShow HN: My AI agents bully each other to prevent context drift▲ 9 · 0 comments · 2026-05-09Hacker NewsKarpathy: Autoresearch▲ 4 · 1 comments · 2026-03-10Hacker NewsShow HN: Karpathy's autoresearch applied to debugging – two open-source skills▲ 3 · 1 comments · 2026-03-16Hacker NewsShow HN: AI agents who prevent context drift through gossip▲ 1 · 0 comments · 2026-05-11irblog.prnewswire.comEvoMap Open-Sources AutoResearch, Giving AI Agents a Way to Test Their Own Research Ideas2026-09-01marktechpostGuide to Loop Engineering: How ‘autoresearch’ and ‘Bilevel Autoresearch’ Turn AI Agents Into Autonomous Machine Learning ML Research Loops2026-07-12techtimesKarpathy’s Autoresearch Loop Is Spreading Fast: Shopify’s 53% Speed Claim Still Unmerged, Flagged as Overfit2026-05-19HackerI Let Karpathy's AutoResearch Agent Run Overnight!2026-04-11Geeky GadgetsCut Manual AI Training Time With the Karpathy AutoResearch Framework2026-03-30