Wink Pings

Compiling a CPU into 4B model weights and pushing large-integer arithmetic accuracy above 97.5%

Qwenputer compiles a 32-bit RISC-V CPU into the first 11 layers of Qwen3.5-4B weights, uses DeltaNet state as RAM, and also implements an NPU. In benchmarks, large-integer arithmetic improves from 55%–90% to 97.5%–100%, approaching the host Python interpreter.

X/Twitter user @alacheng mentioned a project called Qwenputer, whose approach is somewhat counterintuitive: compiling a 32-bit RISC-V CPU into the weights of Qwen3.5-4B. The CPU is not attached via a plugin, tool, or sandbox; it resides in the first 11 Transformer layers of the model. More importantly, these weights were not learned—each weight is computed by a compiler. The goal is clear: enable precise computation inside the model and reduce the random errors that come from traditional LLMs predicting the next token.

Ordinary LLMs tend to make mistakes in arithmetic for an unsurprising reason: they generate steps probabilistically and lack a deterministic execution unit. Qwenputer takes a different path, putting a CPU into the weight layers and letting it run compiled logic.

Memory also comes from the model itself. The DeltaNet layers in Qwen3.5 have runtime state, and the Delta rule can precisely overwrite one row at a time; each row serves as a memory cell. The CPU stores code, data, registers, and the program counter in these cells, effectively building a block of RAM out of the model’s internal state.

On top of this, the project also implements an NPU, compiling neural-network computations such as matrix multiplication and attention into Transformer weights, allowing one large model to precisely execute another small model inside itself without relying on an external runtime.

Each benchmark group has 40 problems, uses greedy decoding, and compares base Qwen3.5-4B, Qwenputer, and a real Python interpreter on the host. The problems cover large-integer multiplication, division, multi-step operations, addition, and subtraction. Base Qwen’s accuracy ranges from 55% to 90%, while Qwenputer improves it to 97.5% to 100%, approaching or even matching the level of calling a Python tool.

Qwen3.5-4B 与 Qwenputer 在整数运算基准上的对比

The project author is @divagr1925 on X, and the code is on GitHub: https://github.com/divagr18/qwenputer.

Projects like this are easily misread as a built-in interpreter in the model. Based on the public description, it is more like building a deterministic execution path inside the weight layers and using gated state to carry memory. It is still an exploratory project and far from general-purpose computing. What is worth watching is the boundary: which computations are worth compiling into weights, and which are more cost-effective to hand off to external tools. X user @alacheng believes its significance lies more in exploring LLM architecture, giving the model precise computation capability internally without relying on calls to external environment programs.

发布时间: 2026-11-01 08:27