AI model gets a 32-bit RISC-V CPU compiled directly into its weights, then runs DOOM on it — experimental AI model can run Doom and C code using its own weights as RAM

AI engineer Divyansh Agrawal has revealed the Qwenputer . Described in its most basic terms, Qwenputer is an experimental blend of the stock Qwen 3.5 4B AI LLM with a 32-bit RISC-V CPU compiled and inserted directly into its weights. In use, Qwenputer can run processor arithmetic operations – or even run C and MicroPython code on its built-in CPU, eschewing any external runtime or tool use. Moreover, it can run Doom…
AI model gets a 32-bit RISC-V CPU compiled directly into its weights, then runs DOOM on it — experimental AI model can run Doom and C code using its own weights as RAM
Project takes a stock Qwen 3.5 4B and compiles a RISC-V CPU into its weights.
AI engineer Divyansh Agrawal has revealed the Qwenputer. Described in its most basic terms, Qwenputer is an experimental blend of the stock Qwen 3.5 4B AI LLM with a 32-bit RISC-V CPU compiled and inserted directly into its weights. In use, Qwenputer can run processor arithmetic operations – or even run C and MicroPython code on its built-in CPU, eschewing any external runtime or tool use. Moreover, it can run Doom, albeit very slowly. You can see the Qwenputer running Doom on its RISC-V CPU by expanding the tweet below.
The implementation of Qwenputer raises some interesting concepts and solutions. For example, the developer used Qwen’s Gated DeltaNet (GND) state as RAM, which Agrawal reckons is “a pretty neat trick.” They admit that using these ‘fast weights’ as RAM isn’t an original concept, but modifying Qwen 3.5 this way does seem to be a first.
Unlike traditional LLM creation, adding a ‘CPU’ doesn’t involve training. This RISC-V CPU implementation “is 11 transformer layers in front of Qwen's own, and none of their weights are learned: a compiler computes every one,” it is explained. Agrawal boasts that Qwenputer’s built-in CPU “passes the official riscv-tests, its programs match qemu, and it has run 18 million instructions free-running without a single error.”
The developer stresses that Qwen makes use of this ‘CPU’ to send instructions and read them back with no external tool or runtime calls. In practice, it works as intended. Use of the CPU inside Qwenputer provides exact calculations, overcoming the arithmetic weaknesses of many LLMs. Moreover, users can run code on the CPU inside the LLM, with C and MicroPython compatibility.
Not content with wedging a CPU into an LLM, Agrawal decided to also give it a filesystem. They describe this extension of the model as relatively trivial, since RAM is already in place. Indeed, the filesystem storage also uses the DeltaNet state. There are 1,024 slots holding up to 512 files. Moreover, this storage is persistent if you save the state at the end of a conversation with the LLM.
Due to its expanded resource use, Qwenputer has basically doubled the size of the underlying Qwen 3.5 4B LLM to almost 19GB. Thus, Agrawal recommends a workstation with 24GB of VRAM or more for testing Qwenputer in its current version. Efforts are being made to streamline coding in Qwenputer, as well as make it run faster.
The project is experimental. One gets the impression that Agrawal built Qwenputer primarily as an experiment to explore what is possible, rather than to solve a specific problem. Nevertheless, the creation of this custom LLM raises some interesting concepts and makes the mind wander regarding potential practical applications.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
In addition to the above-linked blog, you can learn more about Qwenputer from its MIT-licensed code on GitHub. If you want to jump straight in and tinker with this fascinating project, you can now grab this LLM from Hugging Face.
Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.
Mark Tyson is a news editor at Tom's Hardware. He enjoys covering the full breadth of PC tech; from business and semiconductor design to products approaching the edge of reason.