The Automated LLM Speedrunning Benchmark: Reproducing NanoGPT Improvements

Bingchen Zhao, Despoina Magka, Minqi Jiang, Xian Li, Roberta Raileanu, Tatiana Shavrina, Jean-Christophe Gagnon-Audet, Kelvin Niu, Shagun Sodhani, Michael Shvartsman, Andrei Lupu, Alisia Lupidi, Edan Toledo, Karen Hambardzumyan, Martin Josifoski, Thomas Foster, Lucia Cipolina-Kun, Abhishek Charnalia, Derek Dunfield, Alexander H. Miller, Oisin Mac Aodha, Jakob Foerster, Yoram Bachrach

TL;DR

The paper introduces the Automated LLM Speedrunning Benchmark, a framework that tests the ability of AI agents to reproduce real-world machine learning optimization breakthroughs from the popular NanoGPT speedrun competition. The authors evaluate top-tier reasoning models (like OpenAI's o3-mini, Anthropic's Claude 3.7 Sonnet, and DeepSeek-R1) and find that even with detailed hints and advanced search scaffolds, current AI agents struggle significantly to replicate these known training efficiency gains.

What Problem Does This Paper Address?

The AI community is highly focused on building autonomous research agents capable of independent scientific discovery. However, a critical prerequisite for any "AI Scientist" is automated reproducibility: the ability to take a description of an existing experiment or optimization and successfully implement it in code to achieve the same results.

While existing benchmarks evaluate general coding or simple bug-fixing capabilities, they lack the complexity of real-world machine learning research, which requires a mix of high-level algorithmic understanding and hardware-level optimization. To bridge this gap, the authors introduce a benchmark based on the community-driven NanoGPT speedrun, creating a rigorous, non-saturated testbed for evaluating how well LLMs can replicate compounding, state-of-the-art innovations in deep learning training efficiency.

Methods

The benchmark frames reproducibility as a sequential challenge. Given a baseline training script from a previous speedrun record ($R_{i-1}$), the AI agent is tasked with modifying the code to match the performance of the next human record ($R_i$).

To evaluate how different types of information affect performance, the authors designed three levels of human-verified hints:

  • Level 1 (Pseudocode): A high-level algorithmic description of the code changes.
  • Level 2 (Text Description): A natural-language explanation of the improvements and their benefits.
  • Level 3 (Mini-paper): A formal, academic-style summary detailing the methodology and implementation details.

The authors evaluated these tasks using four frontier reasoning models—o3-mini, Claude 3.7 Sonnet, Gemini-2.5-Pro, and DeepSeek-R1—integrated into five different search scaffolds (Flat, Tree, Forest, AIDE, and Multi-AIDE). These scaffolds manage an iterative loop where the agent generates code modifications (using the tool Aider for diff-based edits), executes the script on an 8xH100 GPU node, and analyzes the resulting logs to fix bugs or iterate on performance.

Overview of the flexible search scaffold used to evaluate AI agents.

The primary evaluation metric is the Fraction of Speedup Recovered (FSR), which quantifies how much of the human record's training time reduction the agent successfully achieved.

Datasets

The benchmark is built entirely on data from the NanoGPT Speedrun, an open community competition dedicated to minimizing the wall-clock time required to train a 124M-parameter GPT-2 model to a target cross-entropy validation loss of 3.28 on the FineWeb dataset. The benchmark compiles 19 sequential tasks derived from 21 successive world records, capturing diverse optimizations ranging from algorithmic innovations (like the Muon optimizer) to hardware-aware changes (mixed-precision training and FP8 activations).

Key Insights and Ideas

  • Hints are Mandatory: Without any hints (Level 0), all tested models failed completely, recovering less than 20% of the human speedups on average.
  • Pseudocode is King: When looking at individual hint types, structured pseudocode (Level 1) was significantly more effective than natural language descriptions or formal mini-papers.
  • Rapid Degradation in Cumulative Tasks: In a cumulative experiment where o3-mini had to continuously build upon its own previously generated code across multiple records, its performance collapsed rapidly. While it recovered ~60% of the speedup on the first transition, it dropped to ~20% on the second, and hit 0% by the third record, proving that errors compound quickly for AI agents.
  • The "Buggy Code" Bottleneck for Frontier Models: Surprisingly, Claude 3.7 Sonnet and Gemini-2.5-Pro dramatically underperformed compared to o3-mini. Search tree analysis revealed that Claude 3.7 Sonnet generated a massive proportion of buggy nodes (code that crashed due to runtime errors), which severely dragged down its aggregate reliability.
  • External Knowledge is Hard to Leverage: When the authors provided agents with documentation for FlexAttention (a recent PyTorch feature likely outside the models' training cutoffs), the performance of both DeepSeek-R1 and o3-mini actually decreased. This indicates that current agents struggle to correctly apply unfamiliar external documentation to complex codebases.

Key Results

  • OpenAI’s o3-mini paired with the Multi-AIDE search scaffold achieved the highest overall performance, recovering 46% of the human speedup when provided with all hint levels combined (Level 1+2+3).
  • As shown in the main benchmark results, the gap between human performance and AI capability remains vast; without hints, the average speedup recovered across the board was minimal.
Recent LLM agents struggle to reproduce NanoGPT Speedrun records.
  • In terms of Interquartile Mean (IQM) evaluation, Gemini-2.5-Pro and Claude 3.7 Sonnet hovered close to 0% FSR across multiple configurations, lagging behind both o3-mini and the open-weights DeepSeek-R1 model.

Limitations and Future Work

  • Curated Contexts: The benchmark currently provides succinct, pre-filtered hints that easily fit into an LLM's context window. A more realistic setup would require agents to autonomously search and retrieve information from massive external databases or full-length papers via function calling.
  • Data Contamination: Because the NanoGPT speedrun history is public, parts of the solutions may have been included in the pre-training corpora of newer models, making it difficult to perfectly isolate true generalization from memorization.
  • Repository Scale: The benchmark focuses primarily on optimizing a single-file training script (train_gpt2.py). The authors note that future benchmarks must expand to multi-file repositories and complex distributed training environments across multiple nodes.

Summary updated

Abstract

Rapid advancements in large language models (LLMs) have the potential to assist in scientific progress. A critical capability toward this endeavor is the ability to reproduce existing work. To evaluate the ability of AI agents to reproduce results in an active research area, we introduce the Automated LLM Speedrunning Benchmark, leveraging the research community contributions on the NanoGPT speedrun, a competition to train a GPT-2 model in the shortest time. Each of the 19 speedrun tasks provides the agent with the previous records training script, optionally paired with one of three hint formats, ranging from pseudocode to paper-like descriptions of the new records improvements. Records execute quickly by design and speedrun improvements encompass diverse code-level changes, ranging from high-level algorithmic advancements to hardware-aware optimizations. These features make the benchmark both accessible and realistic for the frontier problem of improving LLM training. We find that recent reasoning LLMs combined with SoTA scaffolds struggle to reimplement already-known innovations in our benchmark, even when given detailed hints. Our benchmark thus provides a simple, non-saturated measure of an LLMs ability to automate scientific reproduction, a necessary (but not sufficient) skill for an autonomous research agent.
BibTeX
@inproceedings{zhao2025automated,
  author = {Bingchen Zhao and Despoina Magka and Minqi Jiang and Xian Li and Roberta Raileanu and Tatiana Shavrina and Jean-Christophe Gagnon-Audet and Kelvin Niu and Shagun Sodhani and Michael Shvartsman and Andrei Lupu and Alisia Lupidi and Edan Toledo and Karen Hambardzumyan and Martin Josifoski and Thomas Foster and Lucia Cipolina-Kun and Abhishek Charnalia and Derek Dunfield and Alexander H. Miller and Oisin Mac Aodha and Jakob Foerster and Yoram Bachrach},
  title = {{The Automated LLM Speedrunning Benchmark: Reproducing NanoGPT Improvements}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=w98hMEjzu8},
}
Figure