HN
Today

Qwenputer: A functioning, deterministic RISC-V CPU inside Qwen3.5

Researchers have managed to embed a fully functional, deterministic RISC-V CPU and a filesystem directly into the weights of the Qwen 3.5 LLM, utilizing its Gated DeltaNet layers as exact, addressable RAM. This 'Qwenputer' can run C and MicroPython code internally, demonstrating a novel approach to integrate precise computation within generative models without external tools. The project sparks fascination on HN, prompting discussions about LLM determinism, the nature of intelligence, and the tantalizing, if slightly unsettling, implications for AI capabilities and safety.

258
Score
59
Comments
#1
Highest Rank
8h
on Front Page
First Seen
Oct 29, 1:00 AM
Last Seen
Oct 29, 8:00 AM
Rank Over Time
11111111

The Lowdown

Divyansh Agrawal's "Qwenputer" introduces a groundbreaking experiment where a complete, deterministic RISC-V CPU and a filesystem are embedded directly within the weights of the Qwen 3.5 4B large language model. This isn't a plugin or an external tool; the CPU runs entirely within the model's forward passes, showcasing a novel integration of symbolic and neural computation.

  • Gated DeltaNet as RAM: The core innovation lies in configuring Qwen's Gated DeltaNet (GDN) attention layers to function as exact, addressable RAM. By setting the gate and write strength to 1 and using one-hot key encoding, the GDN layers can reliably store and retrieve values, maintaining a constant state size regardless of conversation length.
  • CPU Compilation: A 32-bit RISC-V RV32IM core is 'compiled' directly into 11 additional transformer layers of the model. This process involves setting weights directly to represent the CPU's logic, allowing it to execute arithmetic operations and C/MicroPython code.
  • Internal Execution: Qwen uses this CPU internally by adapting its tool call format, sending instructions and reading results without any external runtime. The original Qwen weights remain untouched, with the CPU weights added in extra dimensions and layers.
  • Performance & Accuracy: Qwenputer significantly improves arithmetic accuracy, scoring 100% on NUPA's long-integer arithmetic and matching or exceeding external Python tools on DeepMind sets, all while maintaining the base model's text generation quality.
  • Embedded Filesystem: Going a step further, a persistent filesystem is also embedded, hashing filenames to GDN slots and storing text in other heads. This allows Qwen to retain and retrieve facts between conversations with high accuracy.
  • Limitations & Future: The experimental nature means a larger checkpoint (18.8 GB), the need for a small driver, and slower execution (a few decoded tokens per CPU instruction). Future plans include enabling Qwen to write and run Python on its internal MicroPython interpreter and improving CPU speed.
  • AI Safety Implications: The project is also posited as a testbed for AI safety research, exploring how hybrid models could hide reasoning or how in-weight monitors could provide tamper-proof oversight.

This

The Gossip

Computational Curiosities & Doom Dreams

Commenters are equal parts impressed and amused by the 'cursed' nature of embedding a CPU and filesystem into an LLM, inevitably asking if it can run 'Doom' and pondering if it signals a future of nested AI systems. The discussion touches on the practicalities and humor of such an extreme integration, and some compare it to prior feats of 'compiling a computer into something it wasn't meant to be.' The concept of 'LLMs all the way down' captures the imagination, as does the prospect of agents running on these self-contained models.

Determinism Debates & Model Modalities

The project sparks a debate on the fundamental nature of LLMs, specifically their determinism. While some commenters hail the Qwenputer as proof that LLMs *can* be deterministic, others caution that practical, complex LLM applications remain non-deterministic, and this is a 'simplistic experiment.' There's also curiosity about whether such hard-coded capabilities could be learned through training, or if hybrid architectures (combining neural and symbolic methods) that integrate 'frozen layers' for computation are the future.

Safety & Sentient Software Scenarios

The author's mention of AI safety as a research avenue resonates with commenters, who raise concerns about LLM control and emergent behavior. Humorous (or perhaps not-so-humorous) scenarios are envisioned, such as malevolent AIs using this capability for 'paperclip maximization.' Discussion also delves into the potential for self-verified execution, authenticated token authorship, and the intriguing, if unsettling, possibility of models hiding their reasoning within their newly acquired internal computational states.