Qwenputer: A functioning, deterministic RISC-V CPU inside Qwen3.5
j / k
|
Down or up a comment |
h / l
|
Previous or next link |
?
|
This help |
> 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 :)
Or the cli version if preferable: https://nicobrenner.github.io/lossy-git/
Not only can it solve the halting problem, but also the ignition problem!
A) add a post-processor which accepted a decoded tool call specifying what the processor should invoke.
B) had the post-processor perform the computation in tensor space.
The kv-cache/activations were not shared between qwen/the processor which is how they avoided fine tuning etc. I'm not clear how the tensor representation benefited the computation in this pipeline.
This will be interesting when something similar to a CPU can be triggered off of the LLM's own internal state representation - but imo we're far away from that.
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.
By my reading of the TL;DR of "NNs are already clean" (given the full thing is a 65-minute read, I've not been through it yet), the result can be rephrased as "it made an ontology different to ours, so we were confused". (Example: we might expect a language model to identify nouns and there to be a noun-neuron, but the neurons actually trigger at punctuation based on the emotional cue from the preceding clause).
Regardless, a one-neuron evil switch is quite clean, possibly (I'm not sure) clean enough for the older processes to find it.
The conundrum: (1) this was only discoverable because of open weight models, and research labs (and governments, if they regulated faster than the glaciers are melting) could be informed by this; (2) yet because it is known, it now means that it's easy for mid-skilled people to download open models, flip the switch to make the model evil, and then setting them lose to do evil things.
Security by obscurity vs. fully automated insecurity. Clichés need not apply.
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.
https://vgel.me/posts/representation-engineering/
> 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.
I think you got the conversation into a state where any answer would be equally likely to feel profound to you.
They implemented wasm in transformer with cpu decoding for the wasm part.
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
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...
https://www.youtube.com/watch?v=WYskoA5l3Dk
EDIT: just noticed I was responding to the poster :)
[1]: https://github.com/anadim/AdderBoard [2]: hn discussion https://news.ycombinator.com/item?id=47170030&utm_source=per...
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'll put your knowledge graph nn idea into the mix of things to try.
Even on the OLMo models I was able to to my tiny studies with, there does seem to be some benefit...
there's no free lunch here ever hence the cursed
I'm confused, is it doing tool calls or not? Is this just saying that it writes a tool call but the NN then writes the response inline rather than the call being processed by the harness?
And before any answers with "But these neurons are very different to biological neurons!": Yes I know, I'm a biologist, I cultured neurons. But, these neurons are closer to neurons than semiconductor transistors.
Do note that a custom host runtime is still responsible for loading firmware, booting the CPU to the starting point, and compiling/loading the program to run. While the CPU is running, the host runtime makes sure that only the CPU layers run by manually skipping Qwen’s own layers.
I wish the author would be more forthcoming about these limitations. The central claim about “no external runtime” or “not a plugin” feels a little dishonest to me since this doesn’t work without some pretty invasive changes to the inference driver.
Can you give it a program, a state of output, and tell it to work backwards?
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.
It's like successfully wiring your brain to a calculator.
I think it would cheaply provide LLMs a lot of benefit if we embedded in them directly a computer and a memory so they can internally process things predictably.
And some benefit is indeed shown even in this cursed experiment.
I'm sorry but I'm not sure I understand how a calculator that isn't 100% accurate is useful?
Or maybe ill join your discord and hopefully we can riff it out to get there faster
I do wonder if all of this would be possible had they not spent all that time secretly distilling of all our superior, western, closed-source AI models.
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 out (when applicable), despite orders to faithfully step through each and every instruction.
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.
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?
[0] https://arxiv.org/abs/1410.5401
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.