{
  "id": 22782106,
  "title": "I built an LLM where Gemini 4 wrote the initial weights as code (97% of bytes)",
  "url": "https://urgent.news/2026/11/30/i-built-an-llm-where-gemini-4-wrote-the-initial-weights-as-code-97-of",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-30T13:00:19.000Z",
  "source": {
    "name": "Hacker News",
    "slug": "hacker-news",
    "url": "https://weights-as-code.pages.dev/"
  },
  "original_language": null,
  "account": "A language model, Gemini 4, was used to construct the initial weights of another language model. A staggering 97% of the model's stored weights were generated by Gemini 4, without the need for any gradient steps. The only training that took place was to a 103M-parameter network, which was built upon these initial weights. This approach, known as weight-space programming (WSP), involves an LLM directly reading and writing the weights of a neural network.\n\nIn this case, Gemini 4 created a compiler that transformed 31.8B tokens of corpus statistics into a 7.96 GiB bank of sparse tables. These tables formed over 97% of the model's stored bytes, all without a single gradient step. Following the initial pretraining, an external edit layer enabled continual knowledge updates to the model. This allowed new facts to be added without any training.\n\nWhen tested on FineWeb-Edu documents, the table model achieved a word-level perplexity of 46.4, which is 11% lower than a model with matching parameters but without the tables. This result is comparable to the improvement one would see by increasing the network size by about 1.5 times, following standard parameter scaling laws. The model also demonstrated a 1.2-point increase in mean zero-shot accuracy on ten tasks.\n\nThe model's ability to handle sequential edits was impressive. After 10,000 WikiBigEdit edits, the edit layer answered 99.9% of the edited questions and 97.4% of their paraphrases. It also left 98.2% of unrelated answers unchanged, and changed perplexity by only 0.003%. The entire process took 12 ms per fact, with no gradient step involved. The code and results are available on GitHub at github.com/Kim-Ai-gpu/wtable-lm.",
  "summary": null,
  "summary_source": "publisher",
  "key_points": [
    "Gemini 4 generated 97% of model's weights without gradient steps",
    "Weight-space programming used LLM to create sparse tables from corpus stats",
    "Model achieved 11% lower perplexity than similar-sized model without tables"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}