Article

Developers have 32-bit CPU compiled into Qwen's weights: large language models directly run computer programs internally

Beating AI News reports, independent developer Divyansh Agrawal built Qwen3.5-4B based on Alibaba's Qwen puter, embedding a 32-bit RISC-V virtual CPU directly into the model weights, allowing large language models to perform precise calculations while generating responses without calling external computing tools.

The author did not retrain Qwen; instead, 32 additional layers were added before the original 11-layer network, using a compiler to write the operating rules of CPU directly into the model parameters. The added network also uses a Gated DeltaNet structure to implement precisely readable and writable memory for storing programs and data.

This virtual CPU can already run compiled C programs and passed RISC-V instruction tests, with no errors found in tests involving approximately 18000000 instructions in total.

In DeepMind's 40 large-number multiplication problems, the original Qwen answered 22 correctly, while Qwen puter answered 39; after the original Qwen was connected to external Python, it answered all of them correctly.CPU itself can execute instructions accurately, but the large language model may still make errors when invoking it or outputting results.

This technical approach has precedents. This year,March Percepta used a neural network to implement a virtual computer capable of running C programs. However, it was a purpose-built model.Qwen puter instead integrates similar computing capabilities into an already trained Qwen so that, while generating responses, the language model can also use its internal CPU to perform calculations.

However, this solution is currently very inefficient. A large number of zero-valued parameters expand the model file to 18.8GB—approximately twice the size of the original—and the computation speed is also far lower than that of external tools.

Original link https://m.theblockbeats.info/flash/374349