Developer builds a complete processor inside the weights of an AI language model
Developer Divyansh Agrawal built a complete processor inside the weights of the language model Qwen 3.5. In his tests, the model now calculates almost without errors, with no outside tool. It is still a slow experiment, but everything is online for anyone to see.
Language models are good at language, but less good at exact calculation. Ask such a model to multiply two large numbers, and the answer often looks almost right. That is why AI companies usually let their models call a separate tool for this kind of work, such as a piece of Python code that runs outside the model.
Developer Divyansh Agrawal chose a different route: he built a complete computer processor inside the model itself. His project, called Qwenputer, is a modified version of Qwen 3.5 4B, a small open language model from the Chinese company Alibaba. Agrawal described it on his blog on 22 October and put the code and the models online.
A processor made of numbers
A language model consists of layers with billions of numbers: the weights. Normally a model learns these numbers during training. Agrawal did it differently. A compiler he wrote himself, a program that turns a design into something a machine can run, calculates every weight of the processor exactly. No training is involved.
The processor sits in 11 extra layers, placed in front of the 32 layers of Qwen itself. Qwen's own weights stay unchanged. It is a so-called RISC-V processor: an open design for processors that anyone may use freely. This version works with 32-bit numbers and can, among other things, multiply and divide.
A processor also needs working memory. For this, Agrawal uses a special feature of Qwen 3.5. Some of its layers keep a kind of notepad that stays the same size, however long the conversation gets. By choosing the settings of those layers precisely, the processor can write a number on any line of that notepad and read it back later without errors. The program, the data and the intermediate results of the processor are all kept there.
The model calculates by itself
When Qwen gets a sum, it passes the task to the processor, in the same way it would normally call a tool. But nothing runs outside the model: the processor layers run the program and the model writes the answer itself. A small start-up program, RvChat, loads the processor's software into memory.
According to Agrawal, the processor passes the official test suite for RISC-V processors and gives the same results as qemu, a widely used program that imitates such a processor. He had the processor run 18 million instructions in a row without a single error. For ordinary text, the model still writes almost exactly as the original does.
On a set of 40 sums with large whole numbers, the ordinary Qwen model got 75 per cent right. Qwenputer reached 97.5 per cent, the same as Qwen with a real Python environment as a tool. For multiplying large numbers, the score rose from 55 to 97.5 per cent. The processor can also run programs written in the programming languages C and MicroPython.
A memory that stays
Agrawal also made a trial version with a simple file system inside the model. It can store up to 512 files, together about 53,000 tokens of text (a token is a word or part of a word). If this memory is saved at the end of a conversation, the model can carry on with it in the next one.
On 30 questions about facts that had changed in a later conversation, this version got 90 per cent right. With a separate Python tool the score was 83 per cent, and the ordinary model without help got 3 per cent right.
Still slow and large
This is an experiment. Each instruction of the processor costs the model a few extra tokens, so large calculations take seconds instead of milliseconds. At 18.8 gigabytes, the model file is about twice as large as the original, mostly because of empty padding, and it fits on one graphics card with 24 gigabytes of memory. The start-up program RvChat is still needed: the model cannot yet be started in the usual way for a language model.
All the results come from Agrawal himself. Because the code on GitHub and the models on Hugging Face and ModelScope are freely available, other researchers can now check them. Agrawal is working on a faster processor and on a way to run Python code directly inside the model.
What does this mean for the road to the singularity?
Qwenputer shows that the weights of a language model can hold more than learned patterns. They can also hold a piece of calculation that gives the same exact, checkable answer every time. In this way the model does not get the calculator next to it, but inside it.
Agrawal also mentions follow-up research related to safety. Calculated parts inside a model could serve as a check that the model itself cannot change. At the same time, he is looking into how a model might hide its reasoning in such an internal notepad from anyone watching. Understanding that well makes it possible to build better checks. In this way the experiment helps to make AI models more precise and to understand better what happens inside them.
What is the technological singularity? Read the explanation →