Developers embed 32-bit CPU into Qwen weights: large models run computer programs directly internally
Beating AI News Flash: Independent developer Divyansh Agrawal has built Qwenputer based on Alibaba's Qwen3.5-4B, embedding a 32-bit RISC-V virtual CPU directly into the model weights, enabling the large model to perform precise calculations during response generation without calling external computational tools.
Rather than retraining Qwen, the author added 11 layers in front of the original 32-layer network, using a compiler to write the CPU's operational rules directly into model parameters. The added network also leverages the Gated DeltaNet architecture to implement precisely readable and writable memory for storing programs and data.
The virtual CPU can already run compiled C programs and has passed RISC-V instruction tests, with no errors found across tests totaling approximately 18 million executed instructions.
In DeepMind's 40 large-number multiplication problems, the original Qwen answered 22 correctly, while Qwenputer answered 39 correctly; the original Qwen with external Python access answered all correctly. The CPU itself can execute instructions accurately, but the large model may still make errors when invoking or outputting results.
This technical approach has precedent. In March of this year, Percepta used a neural network to implement a virtual computer capable of running C programs. However, it was a purpose-built model. Qwenputer instead connects similar computational capabilities to an already-trained Qwen, allowing the language model to use an internal CPU for computation during response generation.
However, this solution is currently very inefficient. A large number of zero-value parameters inflate the model file to 18.8GB, roughly twice the original size, and computation speed is far slower than external tools.