Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

nesformer Compiles an NES CPU Into Qwen3.5 Weights

AI summary

The nesformer project uses a compiler to produce a standard Qwen3_5ForCausalLM checkpoint containing an emulated NES 6502 CPU, 2 KB of work RAM and cartridge program ROM, rather than training the model on those weights. During play, the model predicts the CPU execution log one token at a time, while a host program handles rendering, controller input and vblank interrupts. The project reports frame-level agreement with a conventional 6502 emulator for its bundled tests, but execution takes roughly 1–6 seconds per frame, and the PPU and APU remain outside the weights.

In-depth insight

nesformer demonstrates that a standard language-model checkpoint can encode a programmable CPU and use its recurrent state as machine memory, providing a technically novel AI-weights experiment rather than a trained general-purpose model.

An NES CPU compiled into the weights of a stock Qwen3.5 model.

The NES's 6502 CPU (the core of its 2A03 chip), its 2 KB of work RAM, and a cartridge's program ROM run inside a standard Qwen3_5ForCausalLM checkpoint. Nobody trained these weights; a compiler computed every one. When you play a game, the model predicts the CPU's execution log one token at a time. A small host program plays the rest of the console around it: it draws the picture, reads the controller, and fires the vblank interrupt.

nesformer builds on Qwenputer by Divyansh Agrawal, which compiled a CHIP-8 and then a RISC-V CPU into Qwen3.5-4B. It reuses Qwenputer's compiler and its central trick: the model's Gated DeltaNet state is the machine's memory.

Super Mario Bros. (World 1-1)Full Game by Doug Fraker (title screen and first level)

Every CPU token in these runs came from the model. For the bundled test games, every frame also matches a conventional 6502 emulator's output exactly (see How it was checked).

#nesformer#Qwen3.5-4B#Qwenputer#Nintendo Entertainment System#Super Mario Bros.#Gated DeltaNet

Original · 10 min readRead the original
Group chat

No comments yet. Start the conversation.