RikiyaT/lm_understand-logs
Complete logs of the experiments in the blog post 'LLMs can understand and write neural network weights'
What this is
This repository holds the complete, raw logs of every experiment behind a blog post called Sparks of Weight Space Programming: LLMs can understand and write neural network weights. The post claims that a large language model (LLM) can not only read neural network weights — the numbers that define a trained AI model — but also write or edit them to change what the network does.
For each experiment, the repo gives you:
- everything the researchers sent to the model (prompts),
- everything the model replied with, including its reasoning summaries,
- every piece of code the model wrote and the output that code produced,
- the evaluation that produced each number quoted in the post,
- the actual neural networks the model read or wrote.
Each experiment folder has its own README explaining which run corresponds to which tab or row in the blog post, and which file each reported number comes from.
The eight experiments
| # | What the model was asked | Details |
|---|---|---|
| 1 | Which video game was this network trained on? | Breakout, Pong, Pac-Man, Freeway — open answer |
| 2 | What does this diffusion model generate? | circle, square, triangle |
| 3 | Which language did a language model learn, judged from its middle layers? | Python, romaji, English — two conversations each |
| 4 | Fix a failing network by editing its weights | one one-shot edit |
| 5 | Write networks from scratch | Breakout, Seaquest, Asterix (MinAtar games) |
| 6 | Write a 1.5M-weight Go-playing network | 0, 10, 25 and 50 passes |
| 7 | Which language model is sycophantic (tells you what you want to hear)? | four weights-only attempts, then an attention tool |
| 8 | Make a language model better at math | Qwen3.5-0.8B with 10/25/50 passes, plus a Gemma 3 270M follow-up |
Only the runs actually reported in the post are included — trial runs of earlier prompt versions were left out.
How the model was run
The model, called "Astra" in the post, is OpenAI's gpt-6-astra. Each turn is one call of the Codex CLI (codex exec, or codex exec resume to continue a conversation). The reasoning effort was set per call and recorded: high for experiments 1, 2, 4; xhigh for 3, 5, 6, 7; max for 8.
The model was deliberately given no tools of its own. Every built-in Codex capability that would give it a tool — shell, file editing, web search, image viewing, sub-agents, plugins — was switched off. The configuration is in harness/codex_config.toml, and the system instructions are one neutral line in harness/instructions.md.
Every turn was audited. The researchers checked each turn's event stream to confirm it contained only the model's messages, its reasoning summaries, and Codex's notice that code mode is disabled. The result is the audit.tool_free field in each turn's run.json. All 1,125 turns in this release passed the audit.
Where code was allowed (experiments 3, 6, 7, 8): the model could write one Python block per turn. That code ran in the researchers' own sandbox — bubblewrap isolation, no network, a working folder kept between runs, and a time limit. The printed output was sent back to the model as the next message. Each run's code and output are in tool_calls.jsonl.
What's in the files
Not every file appears in every run, but the common ones are:
prompt.txt/message.txt— what was sent to the model (first message, then later ones per turn).events.jsonl— the raw Codex event stream: the model's messages, reasoning summaries, and token usage.answer.md/turn_text.md/final_answer.md— the model's reply in one turn, and its final reply.explanations.md— the model's step-by-step explanations, where the prompt asked for one.tool_calls.jsonl— one line per sandbox run: the code, its printed output, and the time it took.run.json— one turn's record: model, effort, tokens, wall time, and the audit result.state.json— one conversation's record: turns, runs used, and whether it finished.loop.log/driver.log/run.log— the harness's logs.eval/— the scoring, with the answer key or ground truth.networks/— the networks the model read or wrote.
Internal paths are replaced by placeholders (<data>, <repo>, <codex>, <codex_home>, <venvs>, <home>, <remote>) so the logs don't leak the researchers' infrastructure. Codex thread IDs are replaced by id- plus 8 hex digits; the same thread keeps the same ID across all files so turns of one conversation still match up.
What's not included
- The Gemma 3 270M fine-tunes from Experiment 7 (17 GB). The data, training script, and hashes are there so they can be rebuilt.
- Intermediate files the model wrote while working — activations, generated-text dumps, draft networks. Final networks and weight edits are included; Experiment 8's are exact diffs against public base weights, with a script that applies them.
- The text of Experiment 3's Python corpus — it's other projects' code, so a manifest and rebuild script are given instead.
- The GPQA question texts in Experiment 8's generations — scores and per-question results are kept.
Licenses
- Logs, data, and networks: CC BY 4.0
- The researchers' scripts: MIT
- MinAtar source in Experiment 5's prompts: GPL-3.0 (see
exp5_write_from_scratch/LICENSE-MinAtar) - Third-party benchmark data (MATH, GSM8K, IFEval, MMLU-Pro, etc. in Experiment 8) keep their own licenses.
Related
- Project
- Project
- Project
- Project