Drew Breunig · 2026-10-30 · notable
nesformer — a Nintendo CPU compiled into Qwen3.5 weights
nesformer is an MIT-licensed project that runs an NES CPU inside the weights of a stock Qwen3.5 model. The weights are compiled, not trained, and the model predicts the CPU log one token at a time.

A stock Qwen3.5 model whose compiled weights run NES games, one predicted token at a time.
What is it?
nesformer puts an NES 6502 CPU, 2 KB of RAM and a cartridge ROM inside a Qwen3.5 checkpoint. The weights are computed by a compiler, not trained. The demos include Super Mario Bros. World 1-1, and it runs NROM (mapper 0) cartridges that you supply.
How does it work?
Each DeltaNet head keeps a 128 × 128 state matrix, and a one-hot key update overwrites one row, so rows act as memory cells. Seven DeltaNet layers each handle one CPU stage, from fetch to result. A host program draws the screen and reads the controller.
Why does it matter?
The project shows that a normal transformer checkpoint can hold exact program state, and the README checks the output against the nestest golden log for 3,348 instructions. It is slow, 150–290× slower than a real NES, so it is a research curiosity, not a practical emulator.
Who is it for?
ML researchers and curious hackers
Try it
python -m nesformer run roms/thwaite.nes --frames 600 --show