A developer built a working RISC-V CPU into a small Qwen3.5 model
Independent developer Divyansh Agrawal compiled a working RISC-V CPU into Alibaba's open model Qwen3.5-4B without any training, by setting the model's numbers directly. The result, Qwenputer, runs C and MicroPython inside its own layers without calling an outside tool.
Independent developer Divyansh Agrawal has described on his personal blog how he placed a working processor inside Qwen3.5-4B, the open model from Alibaba's Qwen team. When a chat calls for arithmetic or code, the model he calls Qwenputer runs the job on a 32-bit RISC-V core that lives inside its own layers, with no external Python tool involved. According to Agrawal, the processor was never trained: a compiler sets the model's numbers directly and places the CPU in 11 layers added in front of Qwen's original 32, which stay in place.
The model's own layers become memory
Most layers in the Qwen3.5 family use a structure called Gated DeltaNet, which keeps an internal state that does not grow as a conversation gets longer. Agrawal turned that state into the CPU's memory: with the gate and write strength set to 1 and each address selecting a single slot, values can be written into a slot and read back exactly. The developer says the processor passes the official RISC-V tests, matches the QEMU emulator and ran 18 million instructions without an error, while the model's ordinary text output stays very close to base Qwen.
A clear gain on long numbers
In the published measurements, base Qwen scores 48.6 percent on NUPA, a test of arithmetic with long integers, while Qwenputer reaches 100 percent, the same as Qwen with a Python tool. DeepMind's math sets show a similar jump in division and multiplication with large numbers. In an experimental version, Agrawal also built a file system into the model's internal state, so the model can keep files between chats; on facts that changed between conversations it did markedly better than pasting old chats back in.
The limits are stated too: the checkpoint is roughly twice the size of base Qwen, it needs the developer's RvChat driver to run, and it is slow because every CPU instruction costs several tokens. The model files are available under the Apache 2.0 licence on Hugging Face and ModelScope, and the code is on GitHub. The results come from the developer's own measurements; for a fuller picture, follow reviews from independent researchers as well.
Sources: divagr.com, Hugging Face, GitHub