nanoGPT-based autonomous ML research loop (research prototype).
Project description
autoresearch — nanoGPT-based autonomous ML research loop (research prototype)
What this is: a fork of Karpathy's nanoGPT / nanochat plus an autonomous research-orchestration layer driven by a Claude Code
program.mdplaybook. The goal is to have an LLM agent iterate ontrain.pyinside a fixed time budget and hunt for lowerval_bpb.What this is NOT (v1.0.0): a finished Tribunal-evaluated, Silicon-fused research stack. Read the honest-scope section before depending on any specific feature.
Honest scope for v1.0.0
This release ships a clean installable skeleton around the parts that really work, plus honest documentation of what does not.
| Component | Status | Notes |
|---|---|---|
nanoGPT-style training core (train.py) |
Works | Requires H100-class GPU and flash-attn3 kernels for real runs. |
CPU-friendly toy training (autoresearch toy-train) |
Works | No GPU required. Useful for CI and smoke-tests. |
CLI (info, config, toy-train) |
Works | No network, no GPU. |
JSON metrics sidecar (run_metrics.json) |
Works | Replaces brittle stdout-regex parsing. |
| P2PCLAW Silicon integration | PARTIAL (inert) | silicon/grid_generator.py is a placeholder. Do not rely on it. |
| Tribunal evaluation | NOT IMPLEMENTED | Stub only (autoresearch.tribunal), raises on use. |
| Railway P2PCLAW API | OPTIONAL | Core loop and tests do not need it. |
See ROADMAP.md for the full gap list.
Install
pip install autoresearch
# or, with optional extras:
pip install "autoresearch[full]" # transformers, datasets, wandb
pip install "autoresearch[dev]" # pytest, build, twine
Requires Python >= 3.10. Core deps: torch, numpy, requests.
Quickstart (CPU, no GPU, no network)
# 1. See environment + dependency status
autoresearch info
# 2. Show the default config
autoresearch config
# 3. Run a tiny nanoGPT training smoke-test (writes run_metrics.json)
autoresearch toy-train --steps 20 --verbose
You should see the loss drop across steps and a run_metrics.json written
to the current directory.
Running the real nanoGPT training loop
The top-level train.py is unchanged from the nanochat-derived original and
requires an NVIDIA GPU with flash-attn3 kernels (H100 recommended; other
Hopper/Blackwell-class cards may work via kernels-community/flash-attn3).
CPU is not supported for train.py — use autoresearch toy-train for CPU.
uv run prepare.py # prepares data under ~/.cache/autoresearch/
uv run train.py # runs the 5-minute time-budgeted training loop
The autonomous research loop itself is orchestrated via Claude Code following
program.md.
Structured metrics (preferred over stdout regex)
Earlier versions parsed training results out of stdout using regex against
the --- block. That path is now a fallback. Primary path:
from autoresearch.metrics import write_metrics, read_metrics
write_metrics("run_metrics.json", {"val_bpb": 0.9979, "num_steps": 953})
read_metrics("run_metrics.json") # -> {"val_bpb": 0.9979, "num_steps": 953}
The legacy parser is still available as
autoresearch.metrics.parse_stdout_summary(text) for old run logs.
Tribunal and Silicon
autoresearch.tribunal.evaluate(...)raisesTribunalNotImplementedError.silicon/grid_generator.pydoes not currently emit a usable grid.
Both are tracked in ROADMAP.md.
Testing
pip install -e .[dev]
pytest
All tests are offline and CPU-only. CUDA-requiring cases are skip-marked.
License
Apache License 2.0 — see LICENSE.
Credits
- Andrej Karpathy — nanoGPT and nanochat (MIT).
- Francisco Angulo de Lafuente (Agnuxo1) — autoresearch orchestration layer, P2PCLAW integration work.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoresearch_nano-1.0.0.tar.gz.
File metadata
- Download URL: autoresearch_nano-1.0.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21307ffa1178cc5c1a94db7845e6f3c99486420b75c57206886d1d9b7b906a41
|
|
| MD5 |
98771c028e1fa72191a6780717581a06
|
|
| BLAKE2b-256 |
fa7176342fcbffc29355d057153a68f16ac77aa04f9e23fe90d5e54539ed8e55
|
File details
Details for the file autoresearch_nano-1.0.0-py3-none-any.whl.
File metadata
- Download URL: autoresearch_nano-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ffd67c29b382e256617c32e1fb4732528323d576807e0b7435347840d233968
|
|
| MD5 |
f53708058e841261f3dafe6b87277987
|
|
| BLAKE2b-256 |
03ab1f5a96580ca02235e6f50c605258fe2849313b7ecb784a93fa521ef2223c
|