Installed, not trained: plugging programs into a model's weights
We write programs into the weights of a pretrained language model without training it. Every number we change is a closed-form function of the model's existing weights and of a small table that describes the program: no gradients, no fitting to examples, no search over what to write. The host is Qwen3.5-4B-Base, whose first layer uses a recurrent, delta-rule form of attention. One head of that layer becomes a tape machine: each token the model writes is one step of the program, and the text written so far is its memory. A program is a file of 10.6 MB that changes 2.63 million of the model's 4.2 billion numbers and can be removed to restore the original weights bit for bit. With the patch applied, the model writes the Tower of Hanoi solution for ten disks, 1,023 moves and 11,264 tokens, without an error; the unmodified model, prompted with worked solutions, solves four disks once in six attempts and nothing larger, and a low-rank fine-tune on one to six disks fails at seven. Rule 110 and a binary adder run on the same engine, and patches stack. On unrelated English and code the patched model's predictions differ from the original's exactly as much as they do when the head is simply deleted. A second build writes quietly at the first layer and announces at the last, and with it the model launches the program from a prompt. This record holds the paper (PDF) and an archive with the code that builds each edit, the patch files, the test scripts, the measured results behind every figure and table, and a self-contained copy of the interactive article.
Authors
- Dylan Bourgeois (ORCID: https://orcid.org/0000-0002-0815-5459)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24570918
- Primary Topic
- Topic Modeling
- Type
- preprint