You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> *"One day, frontier AI research used to be done by meat computers in between eating, sleeping, having other fun... That era is long gone."* — @karpathy, March 2026
11
12
12
13
**ResearchSwarm** gives an AI agent a real LLM training environment and lets it experiment autonomously overnight. You go to sleep; it runs ~100 experiments. You wake up to a better model and a full log of what worked.
13
14
14
15
This repo is a fork of [karpathy/autoresearch](https://github.com/karpathy/autoresearch), extended with a **Digital Cognitive Labor** routing layer that classifies tasks into text-based work an AI can execute, human-action tasks requiring physical intervention, and hybrid workflows.
15
16
17
+
> ⭐ **If this project saves you GPU-hours or sparks ideas, a star helps others find it.**
18
+
19
+
---
20
+
21
+
## 🎯 What Problem Does This Solve?
22
+
23
+
Manual hyperparameter tuning and architecture search are slow, expensive, and interrupt your sleep. ResearchSwarm turns your idle GPU into an autonomous research lab:
24
+
25
+
-**~100 experiments per overnight session** — each capped at exactly 5 wall-clock minutes
26
+
-**No babysitting** — the agent reads your research objectives from `program.md`, edits `train.py`, evaluates `val_bpb`, and only keeps improvements
27
+
-**Full audit trail** — every decision is logged to a persistent SQLite memory store so you can replay or audit any run
28
+
-**Smart task routing** — the Digital Cognitive Labor layer prevents the agent from hallucinating physical actions it cannot perform
29
+
16
30
---
17
31
18
32
## ✨ What Makes ResearchSwarm Different
@@ -25,6 +39,7 @@ This repo is a fork of [karpathy/autoresearch](https://github.com/karpathy/autor
25
39
| AI memory store (SQLite) | ✅ | ❌ |
26
40
| CLI entrypoint with safety flags | ✅ | ❌ |
27
41
| Built-in workflow executors | ✅ | ❌ |
42
+
| Safety-first execution (opt-in flags) | ✅ | ❌ |
28
43
29
44
---
30
45
@@ -80,6 +95,24 @@ The agent will:
80
95
81
96
---
82
97
98
+
## 📊 Example Results
99
+
100
+
A typical overnight session (8 hours, H100, ~96 experiments):
├── researchswarm_agent.py # Task classifier (text / human / hybrid)
171
+
├── researchswarm_memory.py # SQLite AI memory store
137
172
├── AI-Memory/
138
-
│ └── memory.db # Persistent routing & execution history
139
-
├── analysis.ipynb # Experiment analysis notebook
140
-
├── tests/ # Test suite
141
-
└── pyproject.toml # Dependencies (uv)
173
+
│ └── memory.db # Persistent routing & execution history
174
+
├── analysis.ipynb # Experiment analysis notebook
175
+
├── tests/ # Test suite
176
+
└── pyproject.toml # Dependencies (uv)
142
177
```
143
178
144
179
**The three files that matter for training:**
@@ -161,24 +196,26 @@ ResearchSwarm/
161
196
162
197
**Memory-grounded.** Routing decisions and execution events are logged to `AI-Memory/memory.db`. Recent context is surfaced back into each new task so the agent stays grounded in prior decisions.
163
198
164
-
**Safety-first execution.** Training actions only run when you pass `--run-prepare` / `--run-train` explicitly. Default mode is planning only.
199
+
**Safety-first execution.** Training actions only run when you pass `--run-prepare` / `--run-train` explicitly. Default mode is planning only. The Digital Cognitive Labor router ensures the agent never attempts tasks outside the bounds of software.
165
200
166
201
---
167
202
168
203
## 🔧 Tuning for Smaller Hardware
169
204
170
-
ResearchSwarm is tested on H100, but can be adapted for smaller GPUs or Macbooks:
205
+
ResearchSwarm is tested on H100, but can be adapted for smaller GPUs or MacBooks:
171
206
172
-
-**Dataset**: Use [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) for narrower-scope data that works at smaller scale
173
-
-**`vocab_size`**: Lower from 8192 to 4096, 2048, 1024, or byte-level (256)
174
-
-**`MAX_SEQ_LEN`** in `prepare.py`: Reduce to 512 or 256
175
-
-**`DEPTH`** in `train.py`: Default is 8; try 4 for smaller models
176
-
-**`WINDOW_PATTERN`**: Use `"L"` only — `"SSSL"` banded attention may be slow on non-H100
177
-
-**`TOTAL_BATCH_SIZE`**: Lower to powers of 2, e.g. `2**14` (~16K tokens)
@@ -191,14 +228,34 @@ ResearchSwarm is tested on H100, but can be adapted for smaller GPUs or Macbooks
191
228
192
229
---
193
230
231
+
## ❓ FAQ
232
+
233
+
**Q: Does this work without an H100?**
234
+
A: Yes. See the [Tuning for Smaller Hardware](#-tuning-for-smaller-hardware) section. Users have reported success on RTX 3090, 4090, and Apple Silicon M2 Max.
235
+
236
+
**Q: What LLM agent do I need?**
237
+
A: Any agent that can read files and run shell commands — Claude, GPT-4o, Codex, Cursor, etc. The agent needs file-write permissions to `train.py`.
238
+
239
+
**Q: Is the overnight run safe to leave unattended?**
240
+
A: Yes. The `--run-train` flag is required for any execution. Default mode is planning-only and produces no side effects.
241
+
242
+
**Q: How do I view results the next morning?**
243
+
A: Open `analysis.ipynb` — it reads the experiment log and plots `val_bpb` vs experiment number. You can also query `AI-Memory/memory.db` directly with any SQLite viewer.
244
+
245
+
**Q: Can I customize the research objectives?**
246
+
A: Yes — that's the whole point. Edit `program.md` to focus the agent on specific research directions (e.g., "explore attention variants only" or "keep model under 10M params").
247
+
248
+
---
249
+
194
250
## 🤝 Contributing
195
251
196
-
Contributions welcome! Some ideas:
252
+
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. Some good first ideas:
0 commit comments