hn.today

A Working Nintendo in ~1GB of Qwen Weights

github.com255 points122 comments
Screenshot of A Working Nintendo in ~1GB of Qwen Weights

Nesformer demonstrates a Nintendo Entertainment System CPU running inside the weights of an otherwise standard Qwen3.5 language-model checkpoint. Its compiler calculates the weights directly; the model is not trained to imitate a console. During play, it predicts a token-by-token execution log for the NES’s 6502-derived CPU, while a host program handles the surrounding console functions, including graphics, controller input, interrupts, and timing. The design builds on Qwenputer, which previously compiled CHIP-8 and RISC-V machines into Qwen3.5-4B, and uses the model’s gated DeltaNet state as the machine’s memory.

The repository includes the compiler, CPU and console-host code, compiled weights, test ROMs, example runs, and tools to execute the system either with NumPy/Numba or standard Transformers. Demonstrations include Super Mario Bros. World 1-1 and Doug Fraker’s Full Game. For the bundled test games, the project reports that every generated CPU token comes from the model and that every frame matches a conventional 6502 emulator exactly. Its checking procedure loads the checkpoint, initializes the model’s internal state with the machine state, and then feeds execution tokens sequentially. The project is released under MIT, with adapted compiler code and individual ROMs subject to their own licenses.

Read on github.com122 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.