Apps & Software

nesformer Compiles an NES CPU Directly into Qwen3.5 Model Weights

· GlobeWire Daily Editorial Desk · Source: github.com

1 min read

Key takeawaysAn open-source project named nesformer demonstrates running an NES 6502 CPU, 2 KB of RAM, and cartridge program ROM directly inside a stock Qwen3.5 model checkpoint. Building on previous work like Qwenputer, the system uses a compiler to compute the model weights without retraining, leveraging the Gated DeltaNet state mechanism to store machine memory.
nesformer Compiles an NES CPU Directly into Qwen3.5 Model Weights

Image: GitHub · Photo source · Resized and letterboxed to 16:9; no AI generation

An open-source project named nesformer demonstrates running an NES 6502 CPU, 2 KB of RAM, and cartridge program ROM directly inside a stock Qwen3.5 model checkpoint. Building on previous work like Qwenputer, the system uses a compiler to compute the model weights without retraining, leveraging the Gated DeltaNet state mechanism to store machine memory.

How It Works

The compiler maps machine components into specific layers and heads within the Qwen3.5 model architecture. During execution, a host program manages peripherals by drawing frames, reading controller inputs, and handling interrupts, while the model predicts the CPU execution log token by token.

  • Memory Management: DeltaNet state matrices act as memory cells, holding the cartridge, registers, and RAM.
  • Execution Speed: The default Numba-compiled engine runs significantly slower than real hardware, taking roughly 1 to 6 seconds per frame.
  • Compatibility: The current implementation supports NROM cartridges (iNES mapper 0) running official opcodes, with certain limitations regarding custom mappers, audio, and mid-scanline PPU effects.

Practical Usage and Verification

The repository provides a command-line interface to run tests, check weight integrity using SHA256 hashes, and output animated GIFs of supported games like *Thwaite*. Users can verify the installation and test suites locally by following documentation provided in the repository.

Share this article
Read the original source: dbreunig/nesformer: An NES CPU compiled into the weights of a stock Qwen3.5 model - GitHub

AI-assisted reporting; source claims are attributed and have not been independently verified.

About the author

GlobeWire Daily Editorial Desk — AI-assisted news based on attributed published sources.

More to read