Qwenputer: A functioning, deterministic RISC-V CPU inside Qw
The Qwenputer project demonstrates that a fully deterministic RISC‑V core can be instantiated inside the LLM‑backed Qwen 3.5 model. By mapping each instruction to a deterministic token sequence, the authors turned the language model into a virtual execution environment that respects the RISC‑V ISA without any external hardware. The result is a self‑contained CPU that runs entirely on the model’s inference engine, opening a new class of software‑only processors.
Implementation hinges on a tight coupling between the model’s token decoder and a handcrafted micro‑code layer. Each RISC‑V opcode is translated into a fixed‑length token pattern that triggers a deterministic state transition: register file updates, program counter advancement, and memory access are all simulated by pure tensor operations. Because the model’s randomness is disabled during inference, the same program yields identical results on every run, satisfying the deterministic guarantee that traditional CPUs provide.
Performance is modest but impressive for a software‑only CPU. Benchmarks show a few thousand instructions per second on a single GPU, enough to execute educational kernels, tiny operating system demos, and simple algorithmic tests. Memory is managed through a flat tensor buffer that mimics RAM, and I/O is exposed via custom prompt tokens, allowing the Qwenputer to interact with the host environment without breaking determinism.
Beyond the novelty factor, the Qwenputer illustrates a broader research direction: embedding complete computing architectures inside large language models. This could enable on‑the‑fly emulation of legacy ISAs, rapid prototyping of custom instruction sets, or even secure sandboxing where the execution semantics are guaranteed by the model itself. As LLMs grow larger and more efficient, we may see increasingly capable “software CPUs” that blur the line between AI inference and traditional computation.
Source: Qwenputer: A functioning, deterministic RISC-V CPU inside Qwen3.5