cd /news/large-language-models/qwenputer-compiles-a-risc-v-cpu-into… · home › topics › large-language-models › article
[ARTICLE · art-162991] src=hwbusters.com ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Qwenputer Compiles a RISC-V CPU Into an LLM’s Weights, and It Just Drew a Frame of Doom

Developer divagr18's Qwenputer project compiles a complete 32-bit RV32IM RISC-V processor into the weights of Alibaba's Qwen3.5-4B as 11 transformer layers whose values are calculated by a compiler rather than trained, and a second developer, Aditya Narayana, used it to render one verified 320×240 frame of Doom's E1M1. The Doom run generated 6,342,933 trace tokens, every one matching an independent reference CPU, and took 50.7 minutes on a single 16 GB GeForce RTX 5070 Ti before a fused executor cut it to about 24 minutes. Qwenputer passes the official riscv-tests suites and scored 97.5 out of 100 on DeepMind's big-number multiplication set versus 55 for base Qwen3.5-4B, matching the base model calling a real Python interpreter.

by read4 min views1 publishedNov 2, 2026
Qwenputer Compiles a RISC-V CPU Into an LLM’s Weights, and It Just Drew a Frame of Doom
Image: Hwbusters (auto-discovered)

Qwenputer bolts a working 32-bit RISC-V CPU into the weights of Qwen3.5-4B, using the model’s own memory state as RAM. Someone has now used it to render a frame of Doom, and it took 6.3 million tokens and 50 minutes on an RTX 5070 Ti.

Running Doom on unlikely hardware stopped being news years ago. Running it on a CPU that exists only as numbers inside a language model is a different matter. That is what Qwenputer does: an experimental build of Alibaba’s Qwen3.5-4B with a complete RV32IM processor compiled straight into its weights, and a second developer has now pushed a verified Doom frame through it.

A CPU nobody trained #

The project comes from developer divagr18, and the important word in its description is “compiled”. The CPU is 11 transformer layers placed in front of Qwen’s own stack, and none of their weights were learned through training. A compiler calculates every single value, so the layers behave like logic rather than like a statistical guess at logic.

Memory is the clever part. Qwen3.5 mixes full attention with Gated DeltaNet layers, which carry a running state matrix that gets updated at every token. In the heads Qwenputer takes over, the gate is held fully open so nothing decays, and each write key is a one-hot vector that overwrites exactly one row and leaves the rest alone. That is a RAM write. Reading the row back with a matching one-hot query is a RAM read. Registers, the program counter, the call stack and main memory are all spread across a few dozen of those heads, and the token stream itself becomes the machine’s execution trace.

The result runs C and MicroPython inside the model’s forward passes and passes the official riscv-tests suites. The developer says around 230,000 output positions were replayed against a reference model of the machine with zero mismatches, and that Qwen’s ordinary text behaviour is effectively unchanged.

There is a practical payoff, too. Small LLMs are notoriously bad at long arithmetic, and Qwenputer lets the model “call” its internal CPU through the same tool-call format Qwen was trained on, except that nothing outside the model ever executes it. The model writes the answer back digit by digit. On DeepMind’s big-number multiplication set, the base Qwen3.5-4B scored 55 out of 100; Qwenputer scored 97.5, level with the base model calling a real Python interpreter.

One frame of E1M1, 50 minutes #

The Doom run is the work of a different developer, Aditya Narayana. He took Artur Bieniek’s DMC100-Doom, a port built for tiny microcontrollers that draws the screen in 25 strips so that E1M1 fits in 64 KiB of RAM, compiled it as bare-metal RISC-V firmware and fed it to Qwenputer’s CPU circuit on a single 16 GB GeForce RTX 5070 Ti.

The circuit generated 6,342,933 trace tokens on its own, every one matching an independent reference CPU, and the final 320×240 frame was read back strip by strip straight out of the circuit’s recurrent state. The first run took 50.7 minutes of GPU time. A fused executor later brought the same frame down to about 24 minutes.

The repository is refreshingly upfront about what this is not. It is one frame, not gameplay. It runs on a custom Triton executor rather than stock Hugging Face inference, and the pretrained Qwen language layers were not even loaded for the Doom run, which exercises only the compiled CPU. Interactive frame rates are not on the horizon.

Why bother #

As a games platform, Qwenputer is hopeless. As a proof of concept it is more interesting than the Doom gimmick suggests. It shows that exact, verifiable computation can live inside an ordinary model checkpoint that loads as a stock Qwen3.5 model, with no sandbox and no external tool runner. The developer is already stretching the idea: an in-weights filesystem that holds up to 512 files across conversations, and an NPU variant that runs Karpathy’s tiny 260K-parameter stories model as a C program on the embedded CPU, at roughly 41 seconds per generated token on an Nvidia L4.

Slow, absurd and exact. Tom’s Hardware has more coverage, and both projects are open on GitHub for anyone with a GPU and a shareware WAD.

── more in #large-language-models 4 stories · sorted by recency
── more on @qwenputer 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/qwenputer-compiles-a…] indexed:0 read:4min 2026-11-02 · —