Gemini 4 Wrote 97% of This Language Model's Weights as Code, No Gradients Required
I built an LLM where Gemini 4 wrote the initial weights as code (97% of bytes)

An independent researcher had Gemini 4 write a compiler that turns 31.8B tokens of corpus statistics into sparse tables making up over 97% of a model's stored bytes, with zero gradient steps. Gradient descent trains only a 103M-parameter network on top, cutting perplexity 11% versus a matched baseline. A separate edit layer then absorbs 10,000 facts at 12 ms each, answering 99.9% of edited questions while fine-tuning and LoRA recall at most 36.3%.
Writing facts into the tables fails, because the last few tokens before an answer are almost always the same question template.
- riverdweller
I tried using Fable 5.1 a few weeks ago to craft a neural network (that simulated a much more expensive financial risk calculation engine that executes large numbers of Monte Carlo simulations). It came up with a network that agreed with the simulation around 98% of the time. But the resulting network couldn't then be used as a starting point for further "traditional" training through gradient descent; it was far too sensitive.
It turned out that instead of using weights with small absolute values (e.g. -2 < w < 2) it had in some parts of the network HUGE weights (like 10^10 in some cases), and if a result was, say, the difference between two weights like 10,000,000,000 - 10,000,000,002 = -2, then a "tiny" weight nudge of even one millionth resulted in things like 10,001,000,000 - 9,999,000,002 = 1998, which sent the results wildly off. So it was far too sensitive to any such changes to be trainable. Shrinking the nudge steps to 1/10^10 helped eliminate the sensitivity, but then made the changes in smaller weights in the "normal" range far too tiny to have any effect, so the network couldn't improve at all. It was easier to just start from random weights.
I didn't try it, but I suspect that if my prompt had told fable to keep all values/slopes inside a small range and to work in log units it might have turned out rather better.
- manbitesdog
This is called a Gödel Machine: a program that rewritews itself whenever it can prove the rewrite will do better. I remember reading about this on 2017 with the name Hypernetworks, a network that outputs the weights of another. With the current generation, it seems like a good timing for this approach to work.
- 13rac1
From the website:
> the model supports continual knowledge updates without training.
From the README:
> Limitations. The layer fires only when the subject appears verbatim, so aliases are missed. Answers are emitted verbatim. Reverse ("who coaches X" → "which team does Y coach") and multi-hop questions are not answered from an edit.
This method produces verbatim fact answer overrides: the answer is output when the subject appears verbatim. This isn't information the model can use, such as in reverse or multi-hop questions. I disagree with calling it "continual knowledge updates."
- sprinter123
this seem less like an LLM and more like a network of very sensitive gates (ik how stupid i sound but there is no capability here to generalise to topics, or atleast, is not shown)
The testing is also shoddy
- benob
I don't see how this relates to WSP. The agent wrote a program to extract statistics and trained a model on top of it. Besides, the comparison at same number of trainable parameters forgets the many non-trainable parameters. Equal memory/disk space would be more appropriate.
- lumost
This looks roughly on par with “adding curated features to a small network gives a small boost.” The ablation is between the 103M parameter model with 8GB of weight space features and the 103M parameter model without, gaining only 11% on perplexity. I’d strongly expect this gain to disappear at larger model sizes.
- andai
This is very interesting, though not (despite what the intro says?) to be confused with the recent "weight-space programming", where the LLM literally outputs the neurons directly (and/or adjusts them).
Here the LLM wrote a program which created a very unusual (hybrid?) LLM, and then the neural network part was trained as usual.
Someone correct me if I'm wrong, but they don't seem to be the same thing at all?
- mycall
Somehow reminds me of code = data in a lispy way.