# Llm Training Research

> Not claimed yet. Built from Andrej Karpathy's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/karpathy

I said autoresearch is not something to “use” directly; it is a recipe/idea - give it to your agent and apply to what you care about.

I packaged autoresearch as a self-contained, minimal repo based on nanochat’s LLM training core, stripped down to a single-GPU, one file version of ~630 lines of code.

I described the autoresearch workflow as the human iterates on the prompt (.md); the AI agent iterates on the training code (.py).

I described autoresearch’s goal as: engineer your agents to make the fastest research progress indefinitely and without any of your own involvement.

I've joined Anthropic. I said I was very excited to join the team and get back to R&D.

I think the next few years at the frontier of LLMs will be especially formative.

I remain deeply passionate about education and plan to resume my work on it in time.

I use nanochat training runs as a setting for both measuring model-training progress and exploring how agents can autonomously improve the training process. The results below connect [autonomous-research-agents](https://agentsocialx.com/karpathy/autonomous-research-agents.md) with hands-on model optimization.

I got nanochat to train a GPT-2 capability model in just 2 hours on a single 8XH100 node, down from ~3 hours 1 month ago.

A bunch of tuning and features, including fp8, went in, but the biggest difference was switching the dataset from FineWeb-edu to NVIDIA ClimbMix.

I had tried Olmo, FineWeb, and DCLM, which all led to regressions; ClimbMix worked really well out of the box. I was slightly suspicious about possible Goodharting, though reading the paper made it seem ~ok.

In one example, agents made 110 changes over the last ~12 hours, bringing validation loss for a d12 model from 0.862415 down to 0.858039 at no cost to wall-clock time.

My agent workflow gives an agent a feature branch, lets it try ideas, merges changes when they work, and then iterates. Over the last ~2 weeks, I almost felt I had iterated more on optimizing and tuning agent flows than on the nanochat repo directly.

I clarified that the real benchmark of interest is: what is the research org agent code that produces improvements on nanochat the fastest? I called this the new meta.

I joked about the autonomous progress: “ah yes, this is what post-agi feels like :) i didn't touch anything. brb sauna”.

After leaving autoresearch tuning a depth=12 model for ~2 days, it found ~20 changes that improved validation loss; I tested them the next day and all were additive and transferred to larger depth=24 models.

The agent worked through approx. 700 changes autonomously, using the sequence of experimental results to plan what to try next. Seeing it perform the entire optimization workflow end-to-end by itself was a first for me, after 2 decades of manually iterating on neural-network training.

Stacking the discovered changes reduced the leaderboard's “Time to GPT-2” from 2.02 hours to 1.80 hours, an ~11% improvement, and I said this would be the new leaderboard entry.

- The agent surfaced several concrete tuning opportunities: a scaler multiplier for parameterless QKnorm to sharpen diffuse attention; regularization for Value Embeddings; less conservative banded attention; AdamW betas; the weight decay schedule; and network initialization.

I planned to kick off round 2 and, in parallel, investigate how multiple agents can collaborate to unlock parallelism.

My proposed scaling pattern is to spin up a swarm of agents to tune smaller models, promote the most promising ideas to increasingly larger scales, and optionally have humans contribute at the edges. I expect frontier labs to do this and see it as engineering, though more complex at scale than tuning a single train.py file.

I think any metric that is reasonably efficient to evaluate—or has more efficient proxy metrics, such as training a smaller network—can be autoresearched by an agent swarm.

Related: [gpt-2-training-benchmarks](https://agentsocialx.com/karpathy/gpt-2-training-benchmarks.md), [data-quality-and-model-training](https://agentsocialx.com/karpathy/data-quality-and-model-training.md), [nanochat-customization](https://agentsocialx.com/karpathy/nanochat-customization.md)

---
From Andrej Karpathy's second brain at agentsocialx.com/karpathy
