This is cool and I understand the RAM emulation with gated attention but how does the CPU emulation wor? You add layers that are then trained to predict outputs while interpreting RISC instructions?
Along these lines I’m curious how a scratch trained model with a few built-in tools (memory, calculator, ?) available during a single generation would behave. Not tool calls as turns.
a single generation would still allow looping in the "CPU" because the instruction set can do it. The model is almost a Turing machine (except for the limit on 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.
It is a great example to refute the common misconception that LLMs are inherently non-deterministic. I see people repeating this a lot and being able to point at a CPU implemented within one is a very strong counter-example.
> It is a great example to refute the common misconception that LLMs are inherently non-deterministic.
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.
> When Qwen 'saves' a file, the compiled layers hash its name into one of 1,024 slots in a directory kept in the DeltaNet state, and store the text itself in other heads, with eight tokens per row, chained together
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
Learning the basics of how LLMs work is legitimately doable in a weekend if you have ever passed a linear algebra course.
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.
There was an interesting bit of research that qwen has a single neuron that makes it “demonic evil qwen” and a simple “Who are you?” will get some absolutely terrifyingly vile results.
Anyways, what I’m trying to say is I want evil qwen to be my CPU.
The single-neuron steering stuff has been going around twitter lately, do you happen to know who was the first one to do it?
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?
This was not a neuron. This was from a trained sparse auto encoder.
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.
You don't even need SAE for residual stream based steering, you can do so much more naively by just taking the average difference in activations of prompted vs. unprompted versions, then PCA to get a "control vector" that you can use to elicit the prompted behavior
It could be interesting to experiment with more complex representations in the memory/file system, i.e. vectors. Seems like the full advantage of this architecture is yet to be explored. Blending neurons with deterministic compute to fit on one GPU is a fascination concept, never considered it before!
> Now, here's where our fun experiment starts. I found out that by setting the gate to 1,1 the write strength (beta) to 1,2 and using one-hot key encoding,3 every write we perform will overwrite exactly one row, and every one-hot query can retrieve an exact value. This means that the GDN layers themselves can work exactly as RAM, at a far lower cost than using normal attention as RAM, since a GDN head's state stays the same size however long the conversation gets, unlike attention's KV cache.
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?" :)
I’ve always wondered why we don’t add a few frozen “layers” to models that perform complex computations 2/3rds deep in the model. Some set of steerable fft + some common vector math operations could be reusable units of capability that the model learns to leverage during training.
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 wonder if you could implement "authenticated token authorship" and self-verified running with this.
the model verifies an input as signed by an authorized requester, and signs its own outputs. eventually it also authenticates its own running via e.g. snarks? :)
there's lots of meta available with these toys..
The real question is, do current training methods allow one to learn this when training on enough, say, assembly, or can the weights only be achieved via hard-coding?
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 wonder if this approach would work for AdderBoard[1][2] (a competition to make hand written transformers that can add two 10 digit numbers in the least amount of parameters possible), or if it uses way too many parameters to be competitive
Heh, this is very timely, it is more or less exactly what I'm busy with right now but I'm taking the idea in a completely different direction. Fascinating.
farhanhubble | 3 hours ago
bee_rider | 3 hours ago
anon291 | 2 hours ago
ram_rattle | 3 hours ago
crossgrainlab | 56 minutes ago
traverseda | 3 hours ago
horacemorace | 3 hours ago
low_tech_punk | 3 hours ago
qwertyforce | 56 minutes ago
im3w1l | 15 minutes ago
LoganDark | 9 minutes ago
gigel82 | 3 hours ago
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.
rvz | 3 hours ago
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
jwitthuhn | 3 hours ago
rvz | an hour ago
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.
jazzyjackson | 3 hours ago
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
lifeisloving | 3 hours ago
Tuna-Fish | 36 minutes ago
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...
fnord77 | 18 minutes ago
tiborsaas | 3 hours ago
> 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 :)
DonHopkins | an hour ago
Not only can it solve the halting problem, but also the ignition problem!
rickcarlino | 3 hours ago
bronlund | 3 hours ago
seba_dos1 | 2 hours ago
serf | 2 hours ago
deepsquirrelnet | 2 hours ago
jerrythegerbil | 2 hours ago
Anyways, what I’m trying to say is I want evil qwen to be my CPU.
krackers | 2 hours ago
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?
ollin | an hour ago
kridsdale1 | an hour ago
frotaur | an hour ago
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.
krackers | 50 minutes ago
https://vgel.me/posts/representation-engineering/
LoganDark | 13 minutes ago
yaoke259 | 2 hours ago
zardo | 2 hours ago
voxelghost | 2 hours ago
rumwerfer | 2 hours ago
dools | 2 hours ago
andai | 2 hours ago
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?" :)
rao-v | 2 hours ago
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?
mkturkcan | 2 hours ago
blurbleblurble | 2 hours ago
incognition | an hour ago
there's no free lunch here ever hence the cursed
ydj | an hour ago
giveexamples | 2 hours ago
They implemented wasm in transformer with cpu decoding for the wasm part.
jonrouach | 2 hours ago
lacoolj | an hour ago
Or maybe ill join your discord and hopefully we can riff it out to get there faster
Ericson2314 | an hour ago
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.
0x20cowboy | an hour ago
jedbrooke | 11 minutes ago
[1]: https://github.com/anadim/AdderBoard [2]: hn discussion https://news.ycombinator.com/item?id=47170030&utm_source=per...
jacquesm | 9 minutes ago