Coding agents such as Claude Code and OpenAI Codex can now run machine-learning experiments around the clock, but what they try, what works and what fails ends up scattered across logs, notes and lost sessions. We report a month-long campaign in which agents trained a GPT-style language model from scratch on AWS Trainium2 under a fixed 30-minute budget, with a SQLite database of every run serving as the loop's memory. Over 415 recorded full-budget runs, the validation score fell from the AWS starter baseline's 1.263 bits per byte to 0.953, 24.6% lower, with 62 runs promoted to preserved submissions along the way. From that experience we built AutonomousFrontier, an open-source framework that routes every experiment through one command, records settings, code changes, logs, scores and agent sessions in SQLite, keeps human feedback in force across agents, distils histories into shareable tables of lessons, and helps port CUDA training code to Trainium. We then tested whether lessons from the campaign help a fresh agent that cannot see the original code. In a matched development pilot with one search per arm, an agent given 30 frozen lessons reached 1.083 bits per byte on Trainium against 1.191 for an agent without them, and 1.250 against 1.319 on an NVIDIA DGX GB10. An earlier short-run study with weaker knowledge and restrictive feedback found the opposite, and we report it in full. The framework, the original 415-run database and all study evidence are released under Apache 2.0.
Keywords — autonomous research, research agents, experiment memory, SQLite, Claude Code, Codex, AWS Trainium, Neuron, NVIDIA DGX, language-model pre-training, human feedback, Model Context Protocol
Demo film (5:42). AutonomousFrontier on an NVIDIA DGX (GB10) and an AWS trn2.3xlarge, driven from a Mac: youtu.be/IFIL-WXEPYE
An agent that runs experiments is only as good as what it remembers. In September 2026 we entered the AWS Trainium Frontier challenge, which asks participants to train a language model from scratch on AWS Trainium within a fixed time budget and drive down validation bits per byte. We did most of the work with coding agents: Claude Code and OpenAI Codex edited the training script, launched runs on a trn2.3xlarge, read the results and chose what to try next, under human direction.
The starter kit ships a Trainium version of autoresearch [13], in which an agent edits one training file, runs a short experiment and keeps or reverts the change. That loop is a good start. After a few hundred runs, though, its memory, made of Markdown notes, log files and git history, stopped serving us. Sessions ended, agents changed, usage limits ran out mid-thought, and every new session had to reconstruct which learning rates had been tried, which code changes had helped and which ideas had already failed.
So we moved the memory into SQL. Every run became a row: its settings, its parent, its score, its throughput and which of the training script's functional blocks it changed. Agents queried that table before choosing the next experiment. Diagnostics were written as immutable rows. Over the campaign the database grew to 415 full-budget runs, and the model improved from 1.263 to 0.953 bits per byte.
This paper reports what we learned. Section 3 describes the campaign and its database. Section 4 describes AutonomousFrontier, the framework we built from it so that others can run the same kind of loop on NVIDIA GPUs, AWS Trainium and Apple silicon. Section 5 reports the experiments we ran to ask a harder question: do lessons distilled from one campaign help a fresh agent on new hardware or new data? The answer so far is mixed, and we report the negative evidence alongside the positive.
Letting language models run machine-learning research end to end has moved quickly. The AI Scientist [15] generates ideas, writes and runs code and drafts papers. MLAgentBench [10] and MLE-bench [4] evaluate agents on machine-learning engineering tasks and Kaggle competitions. AlphaEvolve [16] pairs language models with automated evaluators to discover better algorithms. Karpathy's autoresearch [13] reduced the idea to its core: an agent, one editable training file, a fixed five-minute budget and one scalar score. Our work starts from that setting and asks what the agent should remember.
Memory for language-model agents has mostly been studied as text. Reflexion [19] keeps verbal self-reflections between attempts; Generative Agents [18] store an observation stream and retrieve by recency, importance and relevance; MemGPT [17] pages context in and out like an operating system; Voyager [20] accumulates a library of executable skills. Experiment trackers such as MLflow [21] record runs, parameters and metrics for humans. AutonomousFrontier sits between the two: a structured, queryable record of every experiment, designed to be read by the agent before every decision, and shared by every agent that works on the same problem.
The starter model is a GPT in the style of nanoGPT [14] and the modded-nanoGPT speedrun [11], trained with the Muon optimizer [12] for matrix parameters and AdamW for the rest. Training data is ClimbMix [7], and transfer tests use TinyStories [8]. The score is validation bits per byte, a tokenizer-independent measure also used to report results on The Pile [9]. Trainium is programmed through PyTorch on the AWS Neuron SDK, with custom kernels in the Neuron Kernel Interface [1]. Agents also reach the framework through the Model Context Protocol [3], which we used for small-business tool calling in earlier work [6].
The task is the challenge's: pre-train a language model from scratch on ClimbMix web text with an 8,192-entry BPE tokenizer, within a 30-minute training budget on one trn2.3xlarge (Trainium2, four logical NeuronCores), and minimise validation bits per byte on a fixed evaluation. Data preparation, tokenizer and the scoring code are fixed; everything else, from architecture and optimizer to the data loader, the training loop and custom NKI kernels, may change. The AWS starter baseline [2] is a 59.6-million-parameter GPT trained with Muon and AdamW. It scored 1.263187 bits per byte, stopping at its 1,000-step cap after 65.5 million tokens.
Each iteration followed the same pattern. The agent read the current goal and the human's standing instructions, queried the experiment database for what had been tried near the current champion, formed one hypothesis, edited the training script, ran it for the full budget and recorded the result. A run that beat the champion became the new champion and the parent of the next experiments. Agents worked in shifts: Claude Code recorded 322 of the runs, OpenAI Codex 83, and a third agent configuration 10. When one agent hit a usage limit, another took over from the database, not from the previous agent's context.
The memory is one SQLite file. Its main table holds one row per full-budget run: the run name, its lineage family, the 42 training-script constants that varied across the campaign (parsed from each run's own source, including five values written inline as literals), the measured outcomes (parameters, FLOPs per token, steps, tokens, training seconds, tokens per second) and the score. Constants alone cannot see code changes, yet several of the largest gains were exactly that, so a second table splits each run's script by syntax tree into eleven functional blocks (imports and config, runtime, NKI kernels, loss head, architecture, optimizer, checkpoint and evaluation, data sampler, schedule, profiling and training loop) and stores two hashes per block. One hash normalises comments and whitespace; the other also zeroes every numeric literal. A change to the first but not the second is a retuned value; a change to both is a structural code change. Further tables hold the inferred lineage of each run, block-level changes against its parent, 16 short runs and 229 diagnostics: kernel timings, near-tie re-evaluations and failed attempts. Diagnostic rows are protected by triggers that refuse updates and deletes, so a later session cannot quietly rewrite an earlier observation.
The database records 415 full-budget runs between 15 September and 1 October 2026, in four lineage families. Sixty-two runs were promoted to preserved submissions. The best, oa454_gate_bias_on66, scored 0.952867 bits per byte: 0.310 below the starter baseline (24.6%). It has 276.9 million parameters and trained 4,472 steps on 586 million tokens within the budget. The distilled recipe attributes about three quarters of the gain to a model redesign and a new data loader, and the rest to many small refinements. Table 1 lists selected milestones.
All scores in this paper are from our own runs, recorded in the database. The challenge's public leaderboard scored submissions separately: there our best submission reached 0.9576, just outside the top ten. We recorded our experiments in detail in a video made right after the challenge ended, including a live session on the Trainium VM; it announced this paper as planned: youtu.be/gtcJSlZ42v0.
| Run | BPB | Change against its predecessor |
|---|---|---|
| AWS starter baseline | 1.2632 | 59.6M parameters, 1,000-step cap |
| torch_loss | 1.0319 | earliest preserved submission, 113M parameters |
| c10_nowaste | 0.9883 | sampler rewritten to train on every token |
| c18_bigvocab262k | 0.9739 | bigram table enlarged to 262,144 entries, 210M parameters |
| oa154_bigram524k | 0.9670 | bigram table doubled to 524,288 entries, 277M parameters |
| oa220_pipelined_loop | 0.9615 | pipelined training loop |
| oa331_flash_fwd_custom | 0.9591 | custom flash-attention kernel |
| oa373_stack_embed_strided_ce | 0.9556 | NKI embedding and cross-entropy gradient kernels |
| oa413_attn_outgate_fused | 0.9536 | attention output gate |
| oa454_gate_bias_on66 | 0.9529 | best run |
Table 1. Selected milestones among the 62 preserved submissions, in date order (lower is better). Changes are read from each run's code and settings in the database.
The recurring lesson was that on Trainium, throughput is model quality. The baseline's best-fit document packing discarded about 39% of tokens; rewriting the sampler to cut every document stream into full rows was one of the largest single gains. In our later Trainium runs, scalar learning-rate changes triggered recompilation and slowed steps several-fold, which keeping the schedule as a device tensor avoided. Kernel work mattered only when it raised steps per budget.
The campaign's tooling was a set of scripts around one database. AutonomousFrontier [5] turns it into a framework that anyone can install and point at their own machines. A Mac acts as the controller and holds the database; execution nodes are reached over SSH and need only bash and an existing PyTorch environment. Tested nodes are an NVIDIA DGX with a GB10, an AWS trn2.3xlarge and an Apple M2.
The command-line tool uses only the Python standard library; the Control Center adds Flask and Waitress. A test suite of 72 tests runs without PyTorch. For this release we installed version 0.4.0 into a clean environment, connected the DGX and ran a three-minute baseline, which scored 1.967478 bits per byte, matching the 1.968 recorded in the demo film.
The campaign shows that an agent loop with SQL memory can make steady progress. It does not show that memory caused that progress, or that the lessons travel. We ran three studies to probe this, each with fresh workspaces and fresh agent sessions.
First we asked whether a fresh agent given the campaign's knowledge, including its recipe and a reference implementation, could reach the campaign's result on the same task and carry it to new data and hardware. Each condition had one scored full run. On Trainium ClimbMix, Claude with the full knowledge reached 0.952625, effectively reproducing the champion, while a Codex agent without knowledge reached 1.199107. On TinyStories on Trainium, knowledge reached 0.436024 against a control of 0.563052 and a baseline of 0.616353. On the DGX GB10, the CUDA reference reached 1.090510 and a second initialisation seed 1.089602 (mean 1.090056, n=2), against 1.306824 for a Codex control and 1.313652 for the baseline. These are positive results for the complete workflow, but the knowledge arms trained a 277M-parameter model from supplied code, while the TinyStories and DGX controls kept the original 59.6M-parameter design, so they cannot isolate memory from reference code and capacity.
The cleaner question is whether lessons alone help. We froze 30 conditional lessons distilled from the original history, with their evidence and confidence, and without winning code, component code, winning values or a complete recipe. A memory agent received these lessons; a control agent did not. Both used the same Codex client and options, the same baseline, instructions and allowed changes, and both were limited to two 180-second checks and one 1,800-second full run. An operating-system barrier denied both arms access to historical repositories, packaged knowledge and earlier agent sessions. Because validation rounding depends on evaluation batch size, all final checkpoints were re-scored with identical evaluation settings declared before any full score was known.
| Node | Baseline | Control | Memory | Gap |
|---|---|---|---|---|
| Trainium2 | 1.263187 | 1.190748 | 1.082623 | 9.1% |
| DGX GB10 | 1.313652 | 1.319246 | 1.250434 | 5.2% |
Table 2. Common-evaluation bits per byte, one independent search per arm. Gap is memory relative to control.
Memory scored better on both nodes. On Trainium the memory arm came within 14.3% of the baseline, passing the predeclared 10% threshold, while the control passed only 5%. On the DGX neither arm reached 5%, and the control finished slightly worse than the baseline. Lessons learned on Trainium therefore carried some value to a different chip, without any of the original code. Effort did not fall: on Trainium both arms used all three attempts, and on the DGX the memory arm used three against the control's two. The memory arm on Trainium also read far more context (8.8 million input tokens against 3.4 million).
Before the pilot, we compared plain autoresearch (A) with an early version of AutonomousFrontier (B) on three new datasets on Trainium, two Claude Code sessions per condition, eight 180-second runs each. B used weaker knowledge and restrictive human feedback. Plain autoresearch reached the better score on every dataset (Table 3). We read this as evidence that knowledge which constrains the agent, or which is not specific enough to act on, can cost more than it gives, and it shaped the lessons format used in the pilot.
| Dataset | A1 | A2 | B1 | B2 |
|---|---|---|---|---|
| TinyStories | 0.6123 | 0.6872 | 0.7686 | 0.7074 |
| WikiText | 1.2814 | 1.2980 | 1.5345 | 1.6800 |
| Python code | 1.3050 | 1.1095 | 1.3230 | 1.5055 |
Table 3. Best bits per byte per session in the short-run study. A: plain autoresearch. B: early AutonomousFrontier with old knowledge and feedback.
Finally, a fresh Codex session ported a nanoGPT training script written for CUDA to Trainium with af migrate. The port ran natively on four Neuron workers and completed a full 30-minute run on TinyStories at 0.943926 bits per byte, with the model and data preparation unchanged from the GPU reference. The GPU reference scored 1.465221 on the DGX, but with a 2,000-step warmup it never finished warming up in the budget; we report the port as a working migration, not as a speed or quality comparison.
For anyone running agents on long experimental campaigns, our experience suggests three practical rules. Keep the record outside the agent, in a form any agent can query. Record code changes, not only settings. And treat distilled lessons as hypotheses for the agent to test, not as constraints: in our short-run study, the version that constrained the agent scored worse than plain autoresearch on all three datasets.
Over a month on AWS Trainium2, coding agents working from a shared SQLite memory improved a language model from 1.263 to 0.953 validation bits per byte across 415 recorded runs. We have released that history, a framework that makes the same loop available on NVIDIA GPUs, Trainium and Apple silicon, and the evidence from our first tests of whether its lessons transfer. Lessons without code helped a fresh agent on Trainium and on a DGX in a small matched pilot; an earlier, more restrictive version did not help. We hope the data and the tools let others test these questions at the scale they deserve.
Campaign database. knowledge/chip-history/original-experiments.db is byte-identical to the campaign's database (SHA-256 beginning d1fed291010b1ffe).
| Table | Rows | Contents |
|---|---|---|
| experiments | 415 | one row per full-budget run: 42 settings, outcomes, score, family, author, date |
| short_runs | 16 | short checks, kept apart from full-budget scores |
| code_blocks | 4,326 | eleven functional blocks per run with code and structure hashes |
| code_blocks_vs_parent | 4,219 | block-level changes against each run's parent, with notes |
| lineage | 385 | inferred parent of each run |
| diagnostics | 229 | immutable kernel timings, re-evaluations and failed attempts |
Derived database. knowledge.db keeps those tables and adds 1,218 captured training-script files (811 distinct) and, for each run, transfer hypotheses for DGX and Apple silicon marked as inferred and untested.
Query it.
pipx install git+https://github.com/dlyog/af-research-v2
git clone https://github.com/dlyog/af-research-v2 && cd af-research-v2
af history sql "SELECT run, family, val_bpb FROM experiments
WHERE chip='neuron' ORDER BY val_bpb LIMIT 10"
af history serve # browse it at http://127.0.0.1:8781
Study evidence. study/full30/ holds the supplied-knowledge and migration study (Sections 5.1 and 5.4), study/memory_transfer/ the generalised-memory pilot with its protocol, frozen lessons, evaluation amendment, thresholds, provenance and an offline inspector (Section 5.2), and study/transfer/ the short-run study (Section 5.3). Every attempt, including failures, is in each study's evidence ledger.
Films. The framework demo, recorded on the DGX and Trainium nodes: https://youtu.be/IFIL-WXEPYE. Our detailed experiments video, recorded right after the challenge ended, covering the research loop, what moved the score, what did not work, a live Neuron session and our leaderboard history: https://youtu.be/gtcJSlZ42v0. Both use AI-generated narration.
Human Conceptualized, AI Assisted. The research idea, the experiments and their direction are human. AI assistance has been used in this research, including to write code, run experiments, analyse results and produce the demo film and its narration. AI can make mistakes, so readers should always validate the findings with their own research.
This is independent research. No funding or sponsorship was received for this work, and no endorsement by any organization is claimed. The starter baseline, training and data-preparation code come from the AWS Neuron trainium-frontier starter kit under the Apache License 2.0.
Chawdhury, T. K. (2026). What a Month of Agent-Driven Training on AWS Trainium Taught Us: Persistent SQL Memory for Autonomous Machine Learning Research (Technical Report DLYOG-TR-2026-008). DLYog Lab Research Services LLC. https://www.dlyog.com/papers/AutonomousFrontierSQLMemory
@techreport{chawdhury2026autonomousfrontier,
title = {What a Month of Agent-Driven Training on AWS Trainium Taught Us: Persistent SQL Memory for Autonomous Machine Learning Research},
author = {Chawdhury, Tarun Kumar},
institution = {DLYog Lab Research Services LLC},
number = {DLYOG-TR-2026-008},
year = {2026},
month = {11},
url = {https://www.dlyog.com/papers/AutonomousFrontierSQLMemory}
}