Explore the research collection
1 entry · Follow this search
- Model
Qwenputer: a fully functioning, deterministic RISC-V CPU inside Qwen3.5
A stock Qwen3.5-4B with a 32-bit RISC-V CPU compiled directly into its weights — no training involved, a compiler sets every CPU weight directly. Mechanism: Qwen3.5 uses Gated DeltaNet (a linear RNN) in 3 of 4 attention layers; setting gate=1 and write strength beta=1 with one-hot key encoding makes each GDN head's state matrix work as exact, addressable RAM (one row per address, fixed size regardless of context length, unlike a KV cache). The CPU (RV32IM + Zba extension + bignum unit) is 11 compiled layers placed before Qwen's 32 layers; Qwen's own weights are unchanged, CPU weights added in extra dims/layers (hidden size 3968 = Qwen's 2560 + computer dims; vocab +230,324 trace tokens). Each instruction becomes a few generated tokens (ADDR, VAL, STEP); Qwen piggybacks on its trained tool-call format for `calc`, but no external tool, runtime, or sandbox ever runs — the compiled layers read the call, execute, and write the tool response. The CPU passes the official riscv-tests, matches qemu, and ran 18 million instructions free-running with no error; ~230,000 output positions replayed against a reference machine with zero mismatches. It runs C and MicroPython in the forward passes. Benchmarks (greedy, 40 problems/set, HF/blog tables): DeepMind div_big Qwenputer 97.5% vs Python-tool 95% vs base 72.5%; mul_big 97.5% vs 100% vs 55%; mul_div_multiple_longer 100% vs 97.5% vs 90%; add_or_sub_big 97.5% vs 97.5% vs 87.5%; NUPA long-integer arithmetic 48.6% (base) → 100% (Qwenputer, same as Python tool); synthetic integer arithmetic 97.5% vs base 75%. Normal text behaviour stays within noise of base (KL 6e-4 vs noise floor 5e-4). Experimental extension: an in-model filesystem in DeltaNet state (put/append/get/list/delete; 1,024 directory slots, up to 512 files, ~53k tokens of text; state saveable across conversations) — code on the rv-store branch, separate HF model, still experimental.