Developer Compiles Working NES Emulator Into Qwen LLM Weights
A programmer encoded a full Nintendo Entertainment System—CPU, RAM, and cartridge ROM—as pre-computed weights in a Qwen language model, running games by token prediction.
What to know
- An NES emulator—complete with 6502 CPU, 2KB RAM, and cartridge ROM—runs entirely within ~1GB of pre-computed Qwen3.5-ForCausalLM weights; no training was involved.
- The compiler-generated weights use the model's Gated DeltaNet state as addressable memory, with each token prediction advancing CPU execution; output matches conventional emulators exactly.
- Performance trades efficiency for novelty: games run 150–290× slower than real hardware, taking 25 minutes to simulate 10 seconds of gameplay, illustrating the computational cost of using LLMs for deterministic tasks.
- The project builds on Qwenputer (which compiled CHIP-8 and RISC-V into Qwen) and was assisted by Claude Opus 3.5, which generated working code from minimal prompts.
The dispute Whether this represents a genuine capability advance for LLMs or merely an inefficient proof-of-concept that underscores why deterministic computation should not use neural networks. · positions read across 19 posts and comments
Impressive technical achievement demonstrating LLM capability and Turing completeness.
-
“This is amazing, love it! Qwenputer is very cool too”
nico · Hacker News ↗
A computationally inefficient curiosity that illustrates why deterministic programs beat AI for execution tasks.
-
“I love these hacks, even though from an efficiency point of view it is horrifying to my assembly-code-golfing-brain. And it also gives some new appreciation for how much more efficient deterministic programs are compared to AI.”
jacquesm · Hacker News ↗
Interesting as a teaching tool about Turing completeness but not meaningful for practical applications.
-
“This is exactly like if someone implemented a CPU using nothing but CSS animations. Maybe a fun way to teach about turing completeness, but pretty meaningless otherwise.”
woah · Hacker News ↗
Opens possibilities for compiling entire VMs and tools inside LLM weights for execution without external calls.
-
“In principle one could compile a small VM inside the LLM weights. The VM can host for example a Python interpreter, a shell and tools like sed, cat, grep etc.”
armcat · Hacker News ↗
dbreunig DeveloperDivyansh Agrawal Qwenputer creator
How it unfolded 1 development · click the chart to see its coverage articlespostscomments
-
1
Dbreunig explains Claude Opus 3.5 assisted the project with minimal prompts
In a Hacker News comment, dbreunig notes that Anthropic's Claude Opus 3.5 generated working weights and code from just two prompts referencing the Qwenputer article and asking whether an NES could be emulated using the same technique.
“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.”
— dbreunig, Developer · source -
A couple thoughts on the process here…First off, Opus 5.5 built working weights and code with only two prompts:1. Read this article and any relevant source code: https://divagr.com/blog/qwenputer. Then explore if you could emulate the chip and ram in a Nintendo Entertainment System (as people do today with FPGAs in MISTRs) using this technique. If…
2 more of the top 3 · 19 posts in this stretch
-
> A while back I saw some people saying we would just have LMMs hallucinate an entire operating system every single frame. I guess technically it's now proven to be technically possible, but it would be thousands of times slower while requiring thousands of times more compute (a multi-million x difference from an ordinary OS!).Gosh. That would be…
-
This opens up so many interesting opportunities. In principle one could compile a small VM inside the LLM weights. The VM can host for example a Python interpreter, a shell and tools like sed, cat, grep etc. Instead of LLMs having to do slow autoregressive token emission with the current "external" tool calling, it could literally execute…
-
-
background
Dbreunig publishes nesformer: NES emulator compiled into Qwen weights — A GitHub repository and accompanying technical post describe a novel approach: compiling the NES hardware (CPU, RAM, cartridge) into pre-computed Qwen3.5-ForCausalLM weights without training. The model's Gated DeltaNet architecture serves as the machine's memory, with each token prediction advancing CPU execution.
Also covered reported alongside — the timeline has no entry for these yet
-
first by HN Best, 13d ago · also HN Frontpage
1 more headline
- A Working Nintendo in ~1GB of Qwen Weights HN Frontpage · 13d ago
What people are saying 16 voices from 1 site · best of 19 · verbatim
- Oct 31
-
I'd be curious to know how the "weights are conscious" crowd interpret this model!
-
Sorry, I couldn't parse the obviously AI written README. If the author can't be bothered writing it, I can't be bothered reading it.Maybe the bots will appreciate it more, after all, it seems to be written for them.
- Oct 30
-
B-but "there's no such thing as a Nintendo".https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2F5..."Mario thanks you".
-
> There is a long-lived and incredible community of classic gaming emulation work online for it to reference. And that community has created…conformance tests! Opus found them and built against one, that has >3k golden instructionsI'm doing something similar but not for an emulator, using tests other projects in a similar space use to validate…
-
It mentions a greedy decoder in the readme, I'm curious what would happen if you run it stochastically with T>0. Vibe NES? Or does it just crash.
-
This is exactly like if someone implemented a CPU using nothing but CSS animations. Maybe a fun way to teach about turing completeness, but pretty meaningless otherwise.
-
Let's say you are developing a product, choose 1:1) Have a single person vibe together a computationally inefficient solution in 1 month that runs transformers on some backend.2) Hire a team to work for 2 years to design, perfect, optimize, plan, revise, and architect a solution.The risk/reward for 1) is extremely better than 2). Given the…
-
> 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 memoryThis is amazing, love it! Qwenputer is very cool too
-
Truly amazing. Quite thought provoking how it was helped by having high quality oracles. Eg. Qwenputer & good NES reference materials.I guess humans need their oracles too: teachers, encyclopaedias, degrees, phds.Bravo, awesome project, really creative!
-
This is a bit different though. It’s using transformer architecture to emulate almost at the circuit level. It’s probably even more inefficient than something that was trained to emulate a cpu, but with the advantage of actually being an exact emulation rather than learned approximation.It’s a bit like when a human brain remembers facts, if you…
-
Woowww this is cool, not trained is even cooler--maybe I'm probably a bit naive, but to me it demonstrates an understanding of how an LLM can compute
-
>Overall, nesformer runs 150–290× slower than the real console.I like these kinds of projects because it helps to show the massive compute requirement between LLMs and ordinary programs.A while back I saw some people saying we would just have LMMs hallucinate an entire operating system every single frame. I guess technically it's now proven to be…
-
I expected this to only simulate the CPU itself, but was surprised to find they actually simulate the RAM as well (contained in the model itself via the gated deltanet architecture). So in my understanding, the CPU, ROM, and RAM are all handled internally by the model, and the only inputs after initialization are the controller events, wild.
-
I guess I don't understand the point of this. Of course a set of digital logic circuits can be reduced to a set of weights. Am I missing something?
-
How do they know it's "working"?Did they test every possible input/output combination?
-
I love these hacks, even though from an efficiency point of view it is horrifying to my assembly-code-golfing-brain. And it also gives some new appreciation for how much more efficient deterministic programs are compared to AI.