Qwenputer compiles a RISC-V CPU into Qwen3.5
2026-11-07 · GitHub
Qwenputer is an experimental model by independent developer Divyansh Agrawal. He took stock Qwen3.5-4B and inserted 11 compiled layers in front of it that form a 32-bit RISC-V CPU (RV32IM, plus the Zba extension and a small bignum unit). Qwen's original weights are untouched; the computer lives in extra dimensions and layers, and nothing was trained, because a compiler sets every weight directly.
The key is the memory. Three of every four attention layers in Qwen3.5 use Gated DeltaNet, a linear RNN with a state matrix per head. The author holds the gate at 1 and the write strength at 1 and uses one-hot keys, so each write overwrites exactly one row and each query reads one back exactly. The state matrix becomes addressable RAM. The idea that the delta rule works as associative memory is not new; the novelty is making it exact and addressable inside a real model.
It works by piggybacking on the tool-call format the model already knows. Qwen writes a calc call, but nothing outside the model runs it: the 11 layers read the call, execute it on the RISC-V CPU, and the model writes the response digit by digit. The author says it passes the official riscv-tests, matches qemu, and ran 18 million instructions free-running without an error; the GitHub page adds that about 230,000 output positions matched a reference model.
In the author's arithmetic tests (40 problems per set, greedy decoding), Qwenputer scored 97.5% on div_big versus 95% for Qwen3.5-4B with a Python tool and 72.5% for base; on mul_big it scored 97.5% versus 100% with the tool and 55% for base. These are the author's own results on small sets, with no third-party replication yet.
The limits are stated plainly: it is not a Linux-class chip and it is slow. The project page cites about 5,500 trace tokens a second on an L4, which means roughly 41 seconds per story token when running Karpathy's 260K model. It is a proof of concept that a model can compute exactly inside itself, and the author has follow-ups on an in-weight filesystem and tamper-proof built-in monitoring.