Qwenputer: A Full RISC-V CPU Compiled Into Qwen3.5-4B's Weights

A developer compiled a 32-bit RISC-V CPU into Qwen3.5-4B's weights, using its Gated DeltaNet layers as RAM to run C and MicroPython with no tools.
Open source.
When an AI model needs to compute something, the standard move is to have it write code and let another program run it. Developer divagr1925 went somewhere stranger: put an entire CPU inside the model's weights, so code executes during the forward pass itself.
The project is called Qwenputer. It is built on Qwen3.5-4B and is open source.
The CPU is compiled, not trained
According to the author, Qwenputer adds 11 "computer" layers in front of Qwen's own 32. None of their weights are learned. A compiler computes every one, turning a circuit description of the CPU into attention heads, feed-forward units and DeltaNet heads. Qwen's original weights stay untouched.
The clever part is the memory. Three out of four attention layers in Qwen3.5 use Gated DeltaNet. The author found that setting the gate and write strength to 1 and using one-hot keys makes every write overwrite exactly one row of state, and every query read it back exactly. Those layers become precise RAM.
The CPU is a 32-bit RISC-V core (RV32IM plus the Zba extension and a bignum unit). It runs C and MicroPython, passes the official riscv-tests suites, and calls no external tool or runtime. The author stresses that it is not a plugin or a sandbox.
Strong numbers, still an experiment
On DeepMind's arithmetic sets and NUPA's long-integer tasks, Qwenputer scores between 97.5% and 100%. On NUPA, base Qwen3.5-4B manages 48.6% while Qwenputer reaches 100%, level with giving the model a Python tool. The author also replayed about 230,000 output positions against a reference machine and found no mismatches.
The limits are stated plainly. The checkpoint is 18.8 GB, roughly double the base model, mostly zero padding. It needs a small driver called RvChat to boot the firmware, so a plain generate() call won't work yet. Each CPU instruction costs a few decoded tokens, so big calculations take seconds, not milliseconds.
For now its value is more about verifiability than speed: the weights are written by a compiler, and behavior is exact and reproducible. The author also pitches it as a testbed for AI safety work, such as an in-weight monitor the model can't switch off. If you want to try it, a single 24 GB GPU is enough, and the code and models are on GitHub and Hugging Face.