A title card for Qwen4-35B-A3B with a RISC-V computer in its weights. The headline reads Qwen4-35B-A3B, with the line a RISC-V CPU compiled into its weights beneath it. Three stat chips read 16 chip layers ahead of 40, 16,123 positions exact, and 45.6 fps on 148 machines. A footer reads Figures reported by the project author, 4-5 December 2026; not independently replicated.
Engineering & Research

Qwen4-35B-A3B Has a RISC-V CPU in Its Weights: What It Does

Author

Rowan Sterling

Date Published

Latest models · 20View all models →
Back to all posts

On 5 December 2026 an independent researcher publishing as Chetas Lua put up a repository called qwen4-computer. It is a port of Qwenputer — Divyansh Agrawal's October project that compiled a RISC-V core into Qwen3.5-4B — onto Qwen4-35B-A3B, the Apache-2.0 open model whose weights went up on 3 December. Sixteen new transformer layers sit in front of the model's own forty. Registers, RAM and ROM are the recurrent state of the model's linear-attention layers. Nothing calls out to a host runtime; the only interface is the tool-call syntax Qwen4-35B-A3B already emits. The repo is MIT-licensed, one commit deep, and as of 6 December no third party has published a run of it.

The surprising part is not that a CPU can be squeezed into weights. It is why anyone would bother on this model. Qwenputer's original case was correctness: Qwen3.5-4B got large sums wrong, and the in-weight calculator fixed that. Qwen4-35B-A3B mostly does not get them wrong. On the port author's own problem sets it answered 40 of 40 six-to-nine-digit multiplications at high effort, and 37 of 40 large divisions at low effort. What it burns to do so is the thinking: a median of 4,165 tokens for that multiplication set, and a 9,000-token cap hit on the 11-to-20-digit set, where it finished only 6 of 40. The computer's case here is narrower and more interesting. It is a token-efficiency trick wearing a correctness trick's clothes.

What was published, and what was not

The repository is a working product, not a write-up. One command installs it, builds a C kernel of the chip layers, runs eleven self-tests and opens a chat UI with a per-instruction inspector. Three modes matter: the computer alone on any laptop, the same kernel on CUDA, and --full, where Qwen4-35B-A3B answers and calls the computer as a tool. A firmware bundle called QOS 4 — written in RISC-V assembly generated from Python — adds dates, 26 storage notes, a CRC-32 checksum, a self-test, and chess and tic-tac-toe referees.

What is not published is the merged checkpoint. There is no Hugging Face repository for the 16-layer build, no paper, and no second implementation. Running --full means downloading Qwen4-35B-A3B (114 GB), merging the chip layers into it on your own hardware, and writing a 189.8 GB checkpoint in 41 bf16 shards — about two minutes to merge the base and three to ten minutes to write it out on the author's rented B300. That is a deliberate design choice for a research artifact, and it means the only numbers anyone can check today are the ones in the repo's own 64 KB results log.

That log is unusually candid, which is worth saying because it is rare. It records the dead ends — a cache-keeping text pass that stayed faithful and got slower, 575 of 576 questions in 591 seconds against 576 in 170, an earlier claim that a later section explicitly corrects, and the moment a rented GPU ran out of credits mid-run. When a project publishes its own correction, the rest of its numbers are easier to trust — not verified, but harder to fake.

Provenance is also thinner than the demo suggests. The repository's single commit lists two GitHub contributors, ChetasLua and claude, and at the time of writing the project had two stars and no release page. None of that makes the engineering wrong. It does mean there is no mailing list, no issue history, and no second pair of eyes between the author's log and your reading of it.

A screenshot of the GitHub repository page for ChetasLua/qwen4-computer, captured 6 December 2026. The About panel describes it as a RISC-V computer compiled into the weights of Qwen4-35B, with a one-command install, a chat UI with a per-instruction inspector, a small OS in assembly and a game, and names it a port of Qwenputer. The page shows 1 commit, 0 tags, 2 stars, 0 forks, an MIT license, contributors named claude and ChetasLua, and a language breakdown of Python 78%, JavaScript 16.7%, CSS 3.8%.

How sixteen layers become a processor

The chip is compiled, not trained. Agrawal's compiler emits weights for a fixed circuit: a 32-bit RV32IM core with a bignum coprocessor, where each arithmetic operation is an exact lookup table in bf16 rather than an approximation the model learned. The port recompiled that circuit for Qwen4-35B-A3B's smaller per-sublayer MLP budget, which is why it needs 16 layers where Qwen3.5-4B needed 11. The merged model grows from 2048 hidden dimensions to 3072 and reaches 94.88B parameters, 176.8 GiB in bf16.

The memory is the clever part. Qwen4-35B-A3B's Gated DeltaNet heads keep a state matrix that is updated at every token; in the computer's heads the decay gate is pinned open and the write strength is set to one, so an update replaces exactly one row and leaves the rest untouched. A one-hot key writes a row; a one-hot query reads it back. That is RAM, built out of attention state that the model was already going to compute. Sparse access is not an optimisation bolted on afterwards — in the port's own accounting, 8.2% of the 2,918 chip dimensions are non-zero at a sublayer's input, and 6,722 of 42,115 MLP units fire per step.

Two implementation details decide whether any of it works. First, the bridge is Qwen4-35B-A3B's native tool-call syntax: the chip layers capture the text between <tool_call> and </tool_call>, run the program, and print the result back one byte at a time. Second, the port had to abandon the original's single-stream decoding. With chip tokens interleaved between the echoed digits, Qwen4-35B-A3B misreads its own computer: wrong digits, "[Response interrupted by user]", no boxed answer — 4 of 40 correct, although the tool value in the transcript was right in 39 of 39. The fix is a second pass in which the run happens on the chip layers and Qwen4-35B-A3B reads a transcript containing only text. The host moves text; the arithmetic stays in the weights.

The numbers, and who ran them

Every figure below is the author's own measurement, from two days of runs on rented B300 GPUs, 4 and 5 December. None has been reproduced by a third party. Read them as a strong claim of internal consistency, not as an independent result.

• Exactness — NUPA 576/576. The DeepMind clean big add/multiply set 200/200 in one run and 198/200 on the faster path that followed; the six-set DeepMind pool 96.7%, or 98.7% with thinking set low.

• Firmware on real weights — QOS 4: 71 calls, 16,123 chip-owned positions, 0 wrong. Chess referee against python-chess: 150 games, 19,183 moves, 0 wrong.

• The game — IDOLS draws one copy of the computer per screen column, 148 machines in all, each returning three characters a frame. 45.6 frames a second on a B300, with 0 wrong characters out of 192,400 and 0 wrong calls out of 6,505 checked token by token.

• Speed — 711,919 chip tokens a second at 2,560 rows on one B300, and 11,734 steps a second on a single Mac CPU core. The original Qwenputer managed 28,261 on an L4 at 32 rows.

• Qwen4-35B-A3B driving it — 15 of 16 plain questions fully right after the two-pass fix: right command, exact run, and a sentence that actually states the reply. The one miss in each run was Qwen4-35B-A3B answering without calling the computer at all. The computer was never wrong.

Two claims in circulation need trimming. "Every instruction is one token" is the README's shorthand; the trace format is an address token, a value token and a step terminator, so an instruction is a short burst rather than a single token. And "multiplies 60-digit numbers" mixes up two things: 60 is the count of arithmetic questions in the benchmark, not a digit count, though the calculator is arbitrary-precision and the project's demo film does show a 60-digit product resolved token by token.

A six-row scoreboard titled Qwen4-35B-A3B with a computer in its weights. The rows read: Chip layers: 16 ahead of 40; Merged model: 94.88B params, 176.8 GiB bf16; To run: about 190 GB GPU, 310 GB disk; NUPA 576: 576 / 576; Chess referee: 19,183 moves, 0 wrong; Game: 148 machines, 45.6 fps. A footer reads All figures author-reported, 4-5 December 2026; no independent replication.

Where a CPU in the weights actually pays

The most useful comparison in the repo is not a benchmark score but a token count. On 80 problems run through the merged model, the in-weight CPU was called every time and its first answer matched the true answer 80 times out of 80. Of those runs, 75 finished and all 75 were correct; the other five held the right value and kept re-checking it with inverse operations until the four-round limit ended the exchange. No wrong answer anywhere — and that is precisely why the economics matter more than the accuracy.

• 11-to-20-digit multiplication — the merged two-pass model got 20 of 20, against 6 of 40 for base Qwen4-35B-A3B at high effort and 0 of 40 at low. Median cost 3,049 tokens against a 9,000-token cap.

• Division — the computer spends roughly 4,500 chip tokens a call, against 2,439 for Qwen4-35B-A3B reasoning it out. The port loses here.

• Addition and subtraction — about 2,700 chip tokens against 2,053. A smaller loss, still a loss.

• Nine-by-nine-digit multiplication — the chip's stream is 2,518 tokens next to Qwen4-35B-A3B's 4,165 median, and the gap widens as digits grow because the chip's cost grows slowly while the model's hits the cap.

So the honest summary is narrower than the launch tweet. The computer does not make Qwen4-35B-A3B better at arithmetic; Qwen4-35B-A3B was already good at arithmetic when given room to think. It makes one class of problem cheaper — long exact multiplication, and stateful little programs like a chess referee whose board has to persist between calls — and it makes other classes more expensive. A tool that helps on one input shape and hurts on two is a routing decision, not a capability upgrade.

What it takes to run, and what it costs

The laptop mode is real: the 16 layers run as a C kernel, eleven self-tests pass on a clean Mac copy, and you can type os m e2e4 and watch every memory access. The full mode is not a laptop experience. It wants a GPU with about 190 GB of memory, 310 GB of disk, and a C compiler plus Python headers because Triton compiles kernels on first use. On the author's box Qwen4-35B-A3B wrote text at roughly six tokens a second, so an answer took between 7 and 29 seconds; the computer's own share of that was 25 to 159 milliseconds for a date command and up to 2.8 seconds for a calculator call. The GPU time was rented, and the log records the runs that ended when the credits did.

Qwen4-35B-A3B is not in OrcaRouter's catalogue, and we would rather say that plainly than imply otherwise. If you want this specific artifact, you are self-hosting it. What we do carry is Qwen4-Max, the flagship of the same model family with the same million-token context — $1.50 per million input tokens and $4.50 per million output, at provider list price with 0% markup, behind automatic failover. For the text half of an agent that shells out to a computer, that is the part you can call today without owning 190 GB of VRAM. The catalogue holds 200+ models on one key, so the day a merged Qwen4-35B-A3B build does appear somewhere callable, switching is a string rather than a migration.

A screenshot of the OrcaRouter model page for Qwen4 Max, captured 6 December 2026. The header reads Qwen4 Max, model ID qwen/qwen4-max, by Qwen, dated 2026-11-16, with Vision, Tools, JSON and Reasoning tags. The description states a 1,000,000-token context window with text, image and video input and up to 65,536 output tokens. A pricing strip reads Context window 1M tokens, Input $1.50 per 1M tokens, Output $4.50 per 1M tokens, p50 TTFT 4.41 s and p95 TTFT 10.00 s.

Five things the demo does not prove

• That it generalises. One author, one base model, two days. The 16-layer circuit is compiled per model, so Qwen4-35B-A3B's numbers say nothing about whether the same trick transfers cleanly to a 4B model of the same family or to anyone else's architecture.

• That the model will use it. In one unbroken stream Qwen4-35B-A3B ignores the reply and states its own guess — "Today is 2026-06-08, Monday" for a computer that had just returned 2026-12-05. Only the two-pass harness fixes that, and the harness is the author's, not the model's.

• That calls are roomy. One call holds 80 tokens of text, about 300 characters, and any token longer than 16 bytes is cut. This is a calculator and a small OS, not a runtime for real programs.

• That the referees are complete. The chess referee validates legality, checks and castling but does not detect mate, stalemate or draws. The Windows launcher was written and never executed.

• That it is a project yet. As of 6 December the repository had one commit and two stars. Research code that installs in one command is still research code.

Why it is worth watching anyway

Strip away the Doom demo and something durable is left: a working demonstration that a model's weights can hold a program whose behaviour is exact, inspectable and independent of the model's sampling. That is a different proposition from a model that is good at arithmetic. A compiled circuit is either right or broken; it does not drift with temperature, it does not need a thinking budget, and its execution trace is a debugging log rather than a plausible-sounding narrative. Agrawal's own follow-up that month, a build keeping a 512-file filesystem in the same recurrent state, was aimed at exactly that question: how much of what we call a harness actually needs to live outside the model.

The open questions are concrete and checkable. Does an independent group reproduce the exact-token claims on their own GPU? Does a merged checkpoint get published, turning a four-hour build into a download? Does the 16-layer circuit hold on a smaller model of the same family, where the economics of a cheap exact multiply would matter more than on a 35B model that can already afford to think? And does anyone solve the latency problem, because six text tokens a second is a demo, not a product.

Until one of those lands, the fair description is this. Qwen4-35B-A3B can carry a RISC-V computer in its weights, the author's own logs show it computing exactly where the model computes approximately, and the model is good enough at arithmetic that the win is measured in tokens saved rather than errors avoided. That is a smaller claim than the one going around, and a more interesting one.