Documentation Index
Fetch the complete documentation index at: https://vastai-80aa3a82-fix-stale-links.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
Autoresearch is Andrej Karpathy’s framework for autonomous AI-driven ML research. The idea is simple: point an AI agent (Claude Code) at a small but real LLM training setup and let it experiment autonomously overnight. The agent modifies the model code, trains for 5 minutes, checks if the result improved, keeps or discards, and repeats, running ~12 experiments per hour, ~100 overnight. This guide walks you through setting up autoresearch on a Vast.ai GPU instance with Claude Code as the autonomous research agent.Prerequisites
- A Vast.ai account with credits
- An Anthropic account for Claude Code
- SSH key pair (add your public key in your Vast account settings)
- Vast CLI installed on your local machine
Rent a GPU Instance and Set Up
Autoresearch requires a single NVIDIA GPU with 80GB VRAM (H100 or A100 80GB). It needs CUDA 12.8+ and about 50GB of disk for the repo, data, and dependencies.- Use Template
- Manual Setup
Use the Autoresearcher template to launch a pre-configured instance with uv, Claude Code, and autoresearch already installed.Search for available instances:Pick an instance ID from the results and rent it using the template:Wait for the instance to be ready, then SSH in:The template automatically configures Claude Code permissions (
Learn more about templates
Templates are reusable configurations that bundle a Docker image, environment variables, and startup scripts into a one-click launch.
Read, Edit, Write, Bash) in .claude/settings.json so it can run experiments without prompting, no manual setup needed.Once provisioning completes, skip ahead to Launch Autonomous Research.Launch Autonomous Research
Start Claude Code
- Read
program.mdfor the research guidelines - Create a fresh git branch (e.g.
autoresearch/mar10) - Run the baseline experiment
- Begin the autonomous loop, modifying
train.py, training for 5 minutes, evaluating, keeping improvements, discarding regressions - Log all results to
results.tsv
What Claude can modify
Claude has full freedom to edittrain.py, the model architecture, optimizer, hyperparameters, batch size, model size, training loop. The only constraints are:
prepare.pyis read-only, the evaluation harness and data loading are fixed- No new packages, only dependencies in
pyproject.toml - 5-minute time budget, every experiment runs for exactly 5 minutes
Monitoring progress
In another tmux pane (Ctrl+b then %), you can watch the experiment log:
Cleanup
When you’re done, download your results and destroy the instance:Additional Resources
- Autoresearch GitHub repo
- Nanochat, the full training framework autoresearch is derived from
- Claude Code documentation
- Vast.ai CLI reference