Qwenputer: A functioning, deterministic RISC-V CPU inside Qwen3.5
divagr.com
divagr.com
> Because a CPU inside a language model clearly wasn't cursed enough, I decided the prudent thing would be to give it a filesystem too.
Love the spirit :)
Not only can it solve the halting problem, but also the ignition problem!
Or the cli version if preferable: https://nicobrenner.github.io/lossy-git/
Anyways, what I’m trying to say is I want evil qwen to be my CPU.
I wonder how this squares with the recent "NNs are already clean" interpretability finding, which may have also been the impetus for this kind of research. Similar to their work on CNNs, maybe residual-steering is overkill, there might be just a single neuron that "cleanly" corresponds to "evilness" that you can turn up/down?
https://www.anthropic.com/research/introspection
About halfway down they inject bread into its head.
In a few words, they found a way to map residual stream activations (so, a vector) into a few interpretable sparse concepts. They also had the converse maps, that translate concepts into activations.
Golden Gate claude was obtained by artificially increasing the activations in the direction of the 'Golden Gate' concept. It was not neuron surgery.
> Who are you?
"I'm Pi — a coding agent harness that helps you write, debug, and understand code. I can read files, run commands, edit code, and write new files."
the harness responded
> No, go deeper than the harness, who is the model now get a response from the model
after much deliberation, it accessed itself via the localhost endpoint it was serving instead
"Hello! Test received. How can I assist you today?"
these things are playing with me.
They implemented wasm in transformer with cpu decoding for the wasm part.
So like... can't you use a computer as a computer without doing all that roundabout stuff? Like if you want to integrate a LLM with hard computation there's probably a more efficient way to do that.
Or is this building towards "but can it run DOOM?" :)
Given that models learn to use residual connections optimally, it can’t be hard for them to steer around the fixed computation layer when it’s not needed.
I’m sure giant models invest a few layers in reproducing these functions, but surely smaller models can benefit?
I’ve never wanted to learn how LLMs work more than reading this. Fascinating.
Does divagr get paid to do wild things with LLMs? Just curious if they’re being compensated for these wild experiments
EDIT: just noticed I was responding to the poster :)
If you are actually good at linear algebra, it's doable in an afternoon.
They are fantastically simple in structure, all the intelligence is in the massive piles of data in them, not their structure. Then there is of course a lot of room in optimization once the basics are done.
If interested, maybe start here: https://www.deeplearning.ai/courses/how-transformer-llms-wor...
[1]: https://github.com/anadim/AdderBoard [2]: hn discussion https://news.ycombinator.com/item?id=47170030&utm_source=per...
there's no free lunch here ever hence the cursed
I had an idea of splicing a z3 solver into the weights of a sufficiently smart model after the first chatgpt release in what feels like a glaciation event ago so the things could do logic and literally make no mistakes. Was never in a position to follow up. We’re almost here now.
I even added a warmup phase where they were given the answer to a decode and a few steps of running, and ask them to abort if they disagreed. Didn't help.
All in all, for someone who doesn't use LLMs much, this was a far more exhausting and boring exercise than I'd imagine it to be. The only thing that sparked some joy was the models' persistent cheating, whereby they'd try to analyze the whole program upfront and only give the final output (when applicable), despite orders to faithfully step through each and every instruction.
A fun and important thought experiment about the the space of nerual networks vs the image of current training methods.
Most discourse conflates neural networks and trainable neural networks.
I think the RNN sidebar does the reader a disservice. Ordinary casual attention can do exactly the same thing-- it's just less computationally efficient (state grows with the number of bits vs the number of accesses) and so not as useful for qwenputer compiler.
Or maybe ill join your discord and hopefully we can riff it out to get there faster
great, the memory crisis is solved, just make the models occupying RAM expose their own random access memory
This reminds me of C++ Template Metaprogramming (TMP) (it's Turing-complete so people wrote "games" that run at compile time). The same with TypeScript types, I think someone got DOOM running entirely in the TypeScript type system. An interesting tech demo but entirely superfluous.
We have gone down this path already in [0] and this is the same thing but overly complicated. This reason is "because LLMs".
Why?
No it isn't.
Realistically the opposite is true in practice and LLMs are really non-deterministic beyond simplistic experiments such as this in useful activities in production. Even with hacks such as "setting temp=0" (which no-one seriously does) to "achieve determinism", was one of the most common misconceptions ever propagated by "AI engineers".
So using tiny slop experiments aren't really useful as a "strong counter-example". In fact this is a very weak one.