Field noteOct 31, 20265 min read1 source

QwenPU compiles an NPU into Qwen3.5-4B's weights and runs Karpathy's stories260K language model inside it

In one minute

QwenPU is a research project that embeds a vector-processing unit in a modified Qwen3.5-4B checkpoint, then runs Karpathy’s 260,000-parameter stories260K model inside that unit. Its significance is a demonstration of exact, inspectable computation within a model’s forward pass—not a ready-to-use way to speed up inference.

What changed: QwenPU describes compiling a vector unit into Qwen3.5-4B’s weights so it can run Karpathy’s stories260K; the prior covers a separate Coral NPU architecture.

What happened

Developer Divyansh Agrawal’s QwenPU repository describes a modified Qwen3.5-4B checkpoint with a 32-bit RISC-V CPU and a vector unit compiled into its weights. The vector unit adds matrix-vector products, elementwise operations and attention to the CPU, allowing a small neural network to run as a program inside the model’s forward passes. The repository says none of the new weights are learned: a compiler computes them. The underlying Qwen weights are unchanged, but the configuration is widened and computer layers are added.

The demonstration runs Andrej Karpathy’s stories260K, a 260,000-parameter Llama implementation from llama2.c, as a C program on the CPU and vector unit. The smaller model’s int4 weights are loaded as data into the unit’s weight memory rather than compiled into the checkpoint, so the repository says any model that fits can run the same way. QwenPU streams vector results through the token sequence; a 64-lane matrix row can be handled in a few tokens instead of dozens of instructions. The repository compares 53,000 trace tokens per story token for QwenPU with 225,000 for the earlier Qwenputer NPU approach and 2,430,000 for plain C with int8 weights.

The author reports exact checks at several levels. Random test programs run through the vector-unit circuit match a reference implementation token for token. The story program runs for 3,184,920 steps on a GPU executor, with every step checked against the reference; tests also run on the checkpoint’s own layers and are reported exact. These are correctness checks of the described implementation, not a general benchmark of language-model quality or production performance.

The practical constraints are substantial. The full checkpoint is 26.7 GB in bf16, mostly zero padding, and loading it whole requires a GPU with at least 40 GB. The story demo and checks can run the computer’s layers on a 24 GB GPU. On an L4, the GPU executor runs at about 3,300 trace tokens per second; a story token takes about 16 seconds, compared with 41 seconds for Qwenputer’s NPU. The repository labels the project work in progress and says trimming the hidden size and checkpoint is next. Code is MIT-licensed; the modified model weights are Apache-2.0.

What the archive adds

This is a new event adjacent to earlier Qwen releases, not a restatement of them. Our coverage of Qwen3-VL GGUF weights and Qwen vision-language AWQ quantization concerned packaging and quantization for local inference. QwenPU instead changes the model’s configuration to host a computer, and tests exact computation inside the model.

Trend signal

QwenPU weakly supports harness architecture outlives model choice: it makes execution machinery part of the model checkpoint rather than an external tool call. But this remains a research demonstration with slow execution and no evidence of production utility, so it does not establish a durable product boundary or a general alternative to external harnesses.

Why now

The repository presents QwenPU as a follow-on to Qwenputer, moving vector operations into a dedicated unit with its own memories. It reports fewer trace tokens per story token than the previous NPU approach, while identifying checkpoint size and speed as unresolved work.

Why it matters

For teams building with AI, the interesting result is not that a model has become faster or more capable. It is that a model checkpoint can encode a small, deterministic computer whose operations are checked against a reference at each step. That offers a concrete object for research into verifiable computation and in-model execution, where a team can inspect both the operation set and the reported checks rather than trusting a free-form claim that a model used a tool correctly.

The constraints matter just as much. A 26.7 GB checkpoint and story generation measured in seconds per token make this unsuitable as a drop-in inference improvement on the evidence provided. Builders should treat it as an architectural experiment: useful for understanding what can be made exact inside a model, but not proof that the approach is economical, scalable, or safer than an external runtime.

Limits and uncertainty

The repository’s exactness claims apply to its described circuits, reference checks and tested story-program steps. They do not establish correctness for arbitrary programs, improved language-model quality, security properties, or general-purpose tool execution. The source gives a specific GPU executor speed and checkpoint size, but no broad performance comparison, cost analysis, independent replication, or evidence of use in production. It also says size reduction and speed optimization remain future work. The material does not establish that the approach scales beyond the small stories260K example or that other models can be integrated without significant changes.

Reader takeaway

QwenPU is a useful research artifact for one narrow question: can a model’s weights encode exact computation that can be checked step by step? The project reports that it can, for a small vector unit and a tiny language-model program. Its current size and speed mean the result is an architectural proof of concept, not a new practical inference stack.

Evidence / sources

  1. 1github.com/divagr18/QwenPU
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicHarness EngineeringExplore the harness-engineering topic hub.
  2. 02topicAgent RuntimeExplore the agent-runtime topic hub.
  3. 03archiveField NotesOpen the latest editorial analysis.
  4. 04source ledgerSource LedgerInspect the public source evidence graph.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract