Skip to content
trendoviz

AI Tools & Products · Industry

Weight‑Space Programming Builds LLM Weights via Gemini 4

A Gemini 4 model generated a compiler that creates most of a language model’s weights as sparse tables, enabling training of a small network on top and fast, gradient‑free knowledge updates.

Published

Summary

Researchers used Gemini 4 to write a compiler that converts 31.8 billion tokens of corpus statistics into a 7.96 GiB bank of sparse tables, covering 97 % of a language model’s stored bytes. After freezing these tables, a 103 M‑parameter network was trained on 10 B tokens, reaching lower perplexity than a comparable baseline. An external edit layer can add new facts without any gradient steps, updating knowledge in milliseconds.

Key facts

  • Compiler created by Gemini 4: converts 31.8 B tokens into 7.96 GiB of sparse tables.
  • Tables represent over 97 % of the model’s stored weights.
  • A 103 M‑parameter network was trained on top of the frozen tables using 10 B tokens.
  • Resulting model achieved word‑level perplexity 46.4 on FineWeb‑Edu, 11 % lower than a parameter‑matched baseline (52.1).
  • Edit layer answered 99.9 % of edited questions and 97.4 % of paraphrases, with only 0.003 % perplexity change.
  • Each edit costs about 12 ms on a T4 GPU and requires no gradient step.
  • Code and results are released on GitHub.

Details

The approach, called weight‑space programming (WSP), lets a frontier LLM directly read and write another network’s weights. Gemini 4 wrote a compiler that processes 31.8 billion tokens of corpus statistics into a set of sparse tables. These tables store the majority of the model’s parameters (7.96 GiB) and remain frozen during later training.

A small 103 M‑parameter network is then trained on top of the frozen tables using standard gradient descent on 10 billion tokens. The combined system reaches a word‑level perplexity of 46.4 on held‑out FineWeb‑Edu documents, which is 11 % lower than a baseline model with the same number of trained parameters but without tables. This performance is comparable to scaling the baseline model by roughly 1.5× according to established scaling laws.

An external edit layer stores factual updates as plain records and injects them during inference without any additional training. Over 10,000 sequential edits, the layer preserved 98.2 % of unrelated answers, changed perplexity by only 0.003 %, and answered 99.9 % of edited questions in about 12 ms per fact. By contrast, fine‑tuning and LoRA recalled at most 36.3 % of edits and caused perplexity to exceed 1,000.

All code and experimental results have been made publicly available, allowing others to inspect, modify, or delete the stored records directly. The compiler was designed by Gemini 4 Neon, and the method relies on a simple key‑subject‑answer token mechanism that does not require prompt‑template statistics.

Why it matters

For developers and researchers, WSP offers a way to embed large amounts of corpus statistics into a model without costly gradient steps, potentially reducing training compute and enabling rapid, reversible knowledge updates. This could simplify continual learning pipelines, as the edit layer can add or remove facts in milliseconds without retraining the entire network.

For businesses that need up‑to‑date information—such as knowledge‑base assistants or specialized chatbots—the ability to inject new facts instantly may lower operational overhead and improve response accuracy. However, the approach still depends on a frozen table structure, and its scalability to much larger models remains to be demonstrated.

What's next

The research team has published the compiler code and experimental results on GitHub, inviting the community to replicate and extend the work. Open questions include how the method scales to larger architectures, how it interacts with other fine‑tuning techniques, and what security implications arise from direct weight editing.

Sources

Original source: Hacker News — AI stories (50+ points)

Industry ·

Alibaba releases Qwen4-35B-A3B, a cheaper open model

Alibaba's Qwen4-35B-A3B model, with 35 B parameters but only 3 B active, supports image input, handles up to 1 M tokens, and costs $0.55 per task—about six times cheaper than its predecessor.

1 source

Found an error? Report it.