Software

Researcher Embeds a 32-bit RISC-V CPU Directly Into Qwen LLM Weights, Runs Doom

Qwenputer, an experimental variant of Qwen 3.5 4B, incorporates a compiled RISC-V processor into its neural network weights, enabling the model to execute machine code and play games without external tools.

3 min read
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 unveiled Qwenputer, a novel experimental system that fuses the Qwen 3.5 4B language model with a 32-bit RISC-V CPU compiled directly into the model's weights. The hybrid architecture allows Qwenputer to perform processor arithmetic operations, execute C and MicroPython code using its embedded CPU, and even run Doom—though at reduced speed—all without relying on external runtimes or tool invocations.

QWenputer by @divagr1925 is so cool! but... can it run DOOM? Ofc yes! E1M1 on the RISC-V CPU compiled into Qwen3.5-4B weights. will opensource too

Divyansh Agrawal, October 29, 2026

Architecture and Implementation

The Qwenputer design leverages Qwen's Gated DeltaNet (GND) state as RAM, a technique Agrawal describes as "a pretty neat trick." While using fast weights as RAM is not entirely novel, adapting Qwen 3.5 in this manner appears to be unprecedented.

Unlike conventional LLM development, integrating the CPU required no additional training. Instead, the RISC-V CPU implementation comprises 11 transformer layers positioned ahead of Qwen's own layers, with every weight computed by a compiler rather than learned through training. According to Agrawal, the embedded CPU "passes the official riscv-tests, its programs match qemu, and it has run 18 million instructions free-running without a single error."

The model operates independently, with the CPU sending and receiving instructions through the LLM without invoking external tools or runtimes. This self-contained approach delivers precise arithmetic calculations, addressing a known limitation of many language models. Users can execute code directly on the CPU within the LLM, with support for both C and MicroPython.

Storage and Resource Requirements

Agrawal extended the system further by incorporating a filesystem, which leverages the existing DeltaNet state as storage. The filesystem provides 1,024 slots capable of holding up to 512 files each, and this storage persists when the conversation state is saved.

The expanded functionality has nearly doubled the footprint of the underlying Qwen 3.5 4B model, bringing the total size to approximately 19GB. Agrawal recommends running Qwenputer on a workstation equipped with at least 24GB of VRAM in its current iteration. Development efforts are underway to optimize the codebase and improve execution speed.

Qwenputer
Divyansh Agrawal
Qwenputer
Divyansh Agrawal
Qwenputer
Divyansh Agrawal

Experimental Nature and Future Outlook

Qwenputer remains an experimental project, with Agrawal having constructed it primarily to investigate the boundaries of what is achievable rather than to address a particular use case. Nevertheless, the system demonstrates novel concepts that could inspire practical applications in the future.

The project is available under an MIT license on GitHub, and the model can be accessed through Hugging Face for those interested in exploring this unconventional approach to combining language models with embedded computation.

Source: Tom's Hardware · Reporting supplemented by The Silicon Ledger staff.