Qwenputer embeds functional RISC-V CPU inside Qwen3.5-4B model weights
A researcher repurposed Gated DeltaNet layers in Qwen3.5-4B as addressable memory, enabling a Turing-complete RISC-V CPU to execute C and MicroPython during inference without any external runtime.
Summary
Researcher divagr1925 has constructed Qwenputer, a system that embeds a complete RISC-V CPU within the weight parameters of Alibaba's Qwen3.5-4B language model. The implementation exploits the model's Gated DeltaNet (GDN) architecture—used in three of every four layers—by converting those layers into addressable memory through one-hot key selection. With gate and write strength fixed at 1, the system achieves precise read-write operations with fixed state size regardless of conversation length.
The CPU executes during standard forward passes, running both C and MicroPython without requiring any external interpreter or runtime environment. Performance benchmarks show Qwenputer scoring 97.5 to 100 percent on DeepMind math tasks versus 55 to 90 percent for the base model, and achieving 100 percent on NUPA reasoning compared to 48.6 percent baseline. The GDN state also persists as a filesystem across chat sessions, with approximately 90 percent factual recall on updated information versus 30 percent when prior conversations are simply repasted.
Gated DeltaNet architecture and in-weight computation
- Gated DeltaNet repurposing: Three of four layers in Qwen3.5-4B use Gated DeltaNet; divagr1925 converted these into addressable memory by using one-hot keys to select specific memory addresses within the layer states.
- Deterministic memory operations: Setting both gate and write strength to 1 enables exact slot overwriting and readback, with the state maintaining fixed dimensionality as conversation context grows.
- RISC-V execution environment: The embedded CPU runs compiled C code and MicroPython bytecode entirely during model forward passes, eliminating dependency on external runtimes or operating systems.
- Persistent filesystem in model state: The GDN state itself functions as a filesystem that survives across chat sessions; saving and reloading model state preserves files and data structures.
- Factual update mechanism: Modified information achieves roughly 90 percent recall accuracy through state-based persistence, substantially outperforming the 30 percent accuracy of context-window repasting for updated facts.
Why it matters
This demonstration challenges conventional boundaries between neural inference and general-purpose computation, suggesting that large language models with recurrent architectures could serve as self-contained computing platforms without traditional software stacks. For RISC-V and open hardware communities, it opens speculative paths toward neural-accelerated systems where CPU functionality migrates into model parameters, though practical deployment remains distant without open-source release of the implementation.
Original reference: blog.adafruit.com →