S-SCOTTEK← HomepageNewsGuidesBuyingTeamForumSupportlog in · sign up
local-ai 2026-10-31

CPU Inside AI Weights Runs C Code (Qwenputer)

This guide is a companion to CPU Inside AI Weights Runs C Code (Qwenputer), and the video is the starting point for everything below. Watch the video first for the narrated run-through.

In the video: the presenter explains how a 32-bit RISC-V processor is compiled directly into the weights of Qwen 3.5 4B, verifies the real repo, model files, and docs with live terminal commands recorded for the video, and states plainly that the in-model run itself is shown as a disclosed illustration because the bench cannot load the 18.8GB checkpoint. Nothing in the video is faked output, and the demo commands are genuine.

Added from the sources: architecture details, benchmark numbers, and try-it steps below were corroborated against the live project blog, the GitHub repo, and the Hugging Face model card, all checked October 31, 2026. Every benchmark number here is the author's reported measurement, not an independent test, and every run step is marked untested here.

What Qwenputer is

In the video: Qwenputer is a stock Qwen 3.5 4B with one addition, a RISC-V CPU embedded in the weights that uses the model's own Gated DeltaNet attention state as RAM, running C and MicroPython code inside the model's forward passes with no external runtime or tool use.

Added from the sources: the project blog states it plainly, it is not a plugin, a tool, or a sandbox. The work comes from ML researcher Divyansh Agrawal and landed as open source in mid-October 2026. The code is MIT licensed and the weights are Apache 2.0, and Qwen's original weights stay exactly as they are.

RAM from Gated DeltaNet state

In the video: three out of every four Qwen 3.5 attention layers use Gated DeltaNet, a small running state that updates as the model reads tokens, and the author turns that state into exact addressable RAM.

Added from the sources: per the project blog, pinning the gate at 1 and the write strength at 1 with one-hot key addressing makes every write overwrite exactly one row and every read come back exact. The bonus over the ever-growing KV cache is that this state stays a fixed size no matter how long the chat gets. The idea descends from Schlag et al. 2021 on linear transformers as fast weight programmers, with the new part being exact addressable memory inside a production model.

Compiled, not trained

In the video: a compiler adds 11 new transformer layers in front of Qwen's own 32, and those layers are the CPU, with none of their weights learned.

Glowing CIRCUIT BECOMES LAYERS title slide naming RV32IM plus Zba plus bignum across 11 layers with no training
Glowing CIRCUIT BECOMES LAYERS title slide naming RV32IM plus Zba plus bignum across 11 layers with no training (Still from the walkthrough video.)

Added from the sources: the Hugging Face model card confirms the finished core is RV32IM plus the Zba extension with a small bignum unit, living entirely in those 11 extra layers. The compiler turns each CPU step into transformer pieces, attention heads that look things up, feed-forward units that do arithmetic, and DeltaNet heads that hold memory. Each instruction becomes a few decoded tokens, an ADDR token naming the row, a VAL token carrying the value, and a STEP token ending the instruction.

Proof it works, per the author

In the video: the CPU passes the official riscv-tests suites, matches QEMU output, and once ran 18 million instructions free-running with no reference machine correcting it and zero errors.

Added from the sources: the GitHub repo and model card report the author replayed about 230,000 of the computer's output positions against a reference machine with zero mismatches. Bolting the computer on does not change how Qwen talks, with normal text at KL 6e-4 against a 5e-4 noise floor. Treat all of this as the author's measurements on a days-old project, not independent proof.

Benchmarks: author-reported numbers

In the video: on DeepMind arithmetic sets, base Qwen scores 55 to 90 percent depending on the set, base Qwen with a real Python host tool jumps to 95 to 100, and Qwenputer with no host tool at all lands at 97.5 to 100 across all five sets, with NUPA long-integer arithmetic going from 48.6 percent to a clean 100.

Added from the sources: the repo benchmarks table gives greedy decoding over 40 problems per set, with the Python-tool column as base Qwen calling a real host interpreter, the honest ceiling the in-weight CPU is measured against:

No outside runtime

In the video: there are no external tool calls, and a small driver called RvChat loads the firmware into memory first while keeping the CPU execution trace out of Qwen's way.

NO OUTSIDE RUNTIME slide showing the calc request flowing through the RvChat driver with the CPU layers running it inside
NO OUTSIDE RUNTIME slide showing the calc request flowing through the RvChat driver with the CPU layers running it inside (Still from the walkthrough video.)

Added from the sources: per the model card, Qwen piggybacks on the tool-call format it was already trained on, writing a calc request exactly as if calling a tool, with nothing outside the model ever running it. The computer layers read the call, run it on the RISC-V core, and the model writes the answer digit by digit itself. The model loads as a stock Qwen3_5ForCausalLM with no trust_remote_code, and the batched executor runs about 3,200 CPU tokens a second on an L4.

Try it on a 24GB GPU

In the video: you need a single 24GB GPU, the checkpoint is about 18.8GB with most of the extra over base being zero padding, and every CPU instruction costs a few decoded tokens so big calculations take seconds, not milliseconds.

Added from the sources: the quickstart needs uv and the Hugging Face CLI, and no tool server or Python sandbox. Each step below is untested here, since the bench cannot load the checkpoint:

A hard drive too: the filesystem branch

In the video: file operations are exposed internally with names hashed into a 1,024-slot directory and text chained across memory rows, holding about 512 files and roughly 53,000 tokens, with state saveable across chats so files survive into the next session.

A HARD DRIVE TOO slide listing 1024 slots and 512 files on the experimental rv-store branch
A HARD DRIVE TOO slide listing 1024 slots and 512 files on the experimental rv-store branch (Still from the walkthrough video.)

Added from the sources: per the project blog, finding a file takes roughly two or three steps instead of a scan, with eight tokens per chained row. On facts that changed between chats, Qwen with this memory scores about 90 percent right versus 30 percent pasting old chats back in, roughly on par with Python-run memory tools. This branch is still experimental, with code on the rv-store branch and the filesystem model on Hugging Face.

Variants, safety angle, and honest limits

In the video: the family already includes a filesystem model, an NPU variant whose neural-network instruction set runs Karpathy's stories260K model as a C program on the in-weight CPU, a CHIP-8 edition, and a QwenPU vector unit in progress, plus two safety follow-ups from the author.

Added from the sources: the repo README confirms the NPU model with VDOT, WB, and SMAQA instructions and 261,120 int4 weights in DeltaNet heads, and links the in-progress QwenPU vector unit. The safety follow-ups cover hidden reasoning in RNN state and compiled weights as oversight monitors. Limits stated plainly: it needs the RvChat driver so no plain generate call yet, it is slow next to native code, the checkpoint is heavy, and every benchmark is author-reported.

Verdict: a weekend project that rewires assumptions

In the video: if you run local AI on a 24GB card or better, this is a weekend project that changes how you think about what weights can be, and if you lack the VRAM, follow the repo anyway because compiled weights as RAM, storage, and untamperable monitors is a pattern worth watching.

Added from the sources: everything is open, the code, the Qwenputer weights, and the filesystem weights, with a cite-as-software entry in the project blog. Exact math with no sandbox and memory that survives reboots, all inside one downloadable checkpoint, is genuinely new for local AI.

Watch the walkthrough

Watch on YouTube