nesformer: An NES CPU compiled into the weights of a stock Qwen3.5 model
- 原文链接: https://github.com/dbreunig/nesformer
- 作者: dbreunig (GitHub)
- 日期: 2026-10-30
- 分类: models
- 来源类型: github
- 标签: weights-as-computation, compiler, gated-deltanet, nes, qwen
- 质量评分: 4/5
- 抓取时间: 2026-10-31T00:04:04Z
中文导读
nesformer 把 NES 的 6502 CPU,2KB 工作内存与卡带 ROM 编译进原版 Qwen3.5 模型权重:权重未经训练,全部由编译器算出,沿用 Qwenputer 编译器与其核心技巧,即把 Gated DeltaNet 状态当作机器内存;运行时模型逐 token 预测 CPU 执行日志,宿主小程序负责画图/读手柄/触发 vblank 中断;捆绑测试游戏每一帧都与传统 6502 模拟器逐帧一致,含超级马里奥 1-1;承接 CHIP-8 与 RISC-V 的 Qwenputer 路线,展示未训练权重可承载确定性复杂行为。
为什么值得关注
把整机确定性行为编译进未训练权重,Gated DeltaNet 状态当内存的思路对模型机制与权重压缩研究都有启发。
关键信息
- 标题: nesformer: An NES CPU compiled into the weights of a stock Qwen3.5 model
- 作者/来源: dbreunig (GitHub)
- 链接: https://github.com/dbreunig/nesformer
- 发布时间: 2026-10-30
- 关联标签: weights-as-computation, compiler, gated-deltanet, nes, qwen
Source Highlights
- An NES CPU compiled into the weights of a stock Qwen3.5 model: the 6502 CPU (the core of the 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 — draws the picture, reads the controller, fires the vblank interrupt.
- nesformer builds on Qwenputer (Divyansh Agrawal), which compiled a CHIP-8 and then a RISC-V CPU into Qwen3.5-4B, reusing its compiler and central trick: the model's Gated DeltaNet state is the machine's memory.
- Verification: in bundled test games every CPU token came from the model, and every frame matches a conventional 6502 emulator's output exactly, including Super Mario Bros. World 1-1 and a full homebrew game's title screen and first level.
English Summary
nesformer compiles an NES — its 6502 CPU, 2KB of work RAM, and cartridge program ROM — into the weights of a stock Qwen3.5 model (Qwen3_5ForCausalLM). Nobody trained these weights; a compiler computed every one, reusing Qwenputer's compiler and its central trick: the model's Gated DeltaNet state is the machine's memory. At play time the model predicts the CPU's execution log one token at a time while a small host program plays the rest of the console — draws the picture, reads the controller, fires the vblank interrupt. In bundled test runs every CPU token comes from the model and every frame matches a conventional 6502 emulator exactly, including Super Mario Bros. World 1-1. A striking data point for what deterministic behavior can be baked into untrained LLM weights, extending the CHIP-8 and RISC-V Qwenputer line.
Obsidian Notes
- 内容由 GitHub README 原文抓取生成,锚定在编译管线、Gated DeltaNet 状态复用与逐帧一致性验证等仓库自述事实。
- 关联条目: content/58bdc6b4.md(external-scan 2026-10-31 运行生成)
- 相关条目: content/44e3e5f1.md