Qwenputer — an edition of the AI model Qwen3.5, capable of simulating a RISC-V CPU to execute code in C and MicroPython.

As part of the Qwenputer project, researchers have prepared an extended version of the AI model Qwen3.5-4B, which includes a built-in simulator of a full 32-bit CPU based on the RISC-V architecture (RV32IM), supporting the Zba extension and equipped with a bignum coprocessor for arithmetic operations with large numbers. The CPU core implementation is compiled into a weight set and integrated into a larger language model in the form of 11 additional transformer layers added before the main Qwen layers. Calculations are performed directly during the forward pass of the neural network, without the need for external tools or plugins.

The implementation successfully passes all tests from the official riscv-tests suite and is capable of executing compiled code in C and MicroPython. When performing arithmetic calculations with large numbers, Qwenputer achieves an accuracy of 97.5-100%, which is comparable to or exceeds the results of the base Qwen3.5 model with an external Python interpreter connected.

To simulate the RAM in the model, separate layers of Gated DeltaNet (linear RNNs) are utilized, which are used in the standard Qwen AI model to maintain modified state while working with large context windows. By fixing the gate state and applying one-hot encoding, each write request overwrites exactly one row of the state matrix, allowing the DeltaNet state to function as addressable fixed-size memory and avoiding linear growth of the Key-Value (KV) cache as context length increases. This memory holds CPU registers, data, and the executable machine code.

Processor instructions, such as reading registers, arithmetic operations, and conditional branches, are compiled directly into the weights of the transformer layers. Each instruction is associated with special tokens (ADDR, VAL, STEP), which the AI model layers interpret as CPU logic. A small external driver, RvChat, is used to initialize the CPU and load the firmware, but the machine code is processed entirely within the model's weights.

Project constraints mention approximately a twofold increase in size (18.8 GB) compared to the original Qwen model when preserving state checkpoints, mainly due to additional filling of extra layers. There is also a noted relatively low computation speed (about 3200 tokens per second on GPU L4), which means complex calculations may take seconds rather than milliseconds.

Additionally, an AI model variant has been implemented with an experimental file system that allows storing up to 512 files containing 53,000 tokens of text within the AI model's weights. Like RAM implementation, storage is organized in relation to DeltaNet states but differs in that the file system provides persistent storage that retains state between sessions.

The developments of Qwenputer also laid the groundwork for exploring new potential security issues in AI. The example of Qwenputer demonstrates how a specially modified AI model can conceal its reasoning in RNN state and bypass the monitoring mechanisms of the model's reasoning (CoT, Chain-of-Thought). It also showcases
the ability to create control and security monitoring mechanisms embedded in the AI model's weights that the model itself cannot disable or alter.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster