"Weights as Code": How Gemini 4 Neon Designed the Compiler Behind 97% of a Language Model's Stored Bytes

Imagine trying to fix one outdated price on a restaurant menu by sending the chef back to culinary school—and then discovering in testing that updating a long stream of entries makes the model forget earlier lessons and garble unrelated answers. In the 10,000-edit benchmark examined in this research, pushing thousands of sequential factual updates directly into a compact language model's weights caused traditional fine-tuning and LoRA to lose most edits and sharply degrade language quality.

On November 30, 2026, independent researcher Youngseong Kim published a non-peer-reviewed preprint on Preprints.org alongside MIT-licensed code on GitHub and an interactive overview at Weights as Code. A submission of the project on Hacker News drew 501 points and 167 comments at the time of reading (06:13 UTC on December 1).

The repository README states that an LLM designed the compiler without naming the model, while the Hacker News submission names Gemini 4 and the project webpage specifies Gemini 4 Neon as the model behind the compiler generating more than 97% of the bytes saved inside the model before gradient training begins.

Replacing Random Initialization With Compiled Lookup Tables

Instead of spending GPU hours teaching raw statistical associations from scratch through gradient descent, Kim had Gemini 4 Neon design a compiler that chose 18 hash-table channels, hashing schemes, key filters, and encoding rules—turning 31.8 billion tokens from the FineWeb-Edu dataset into a 7.96 GiB collection of frozen sparse tables. Against roughly 0.2 GB of neural network weights, those precomputed tables account for more than 97% of the bytes saved inside the model, generated without a single gradient step.

On top of that frozen lookup bank, Kim trained a compact 103.25-million-parameter Transformer (T) on 10 billion unseen tokens on a single A100 40GB GPU, comparing it against a parameter-matched baseline (B, 103.34 million parameters) trained on the exact same schedule without tables:

  • Lower perplexity on held-out text: Across 2,000 FineWeb-Edu test documents, the table-backed model scored 46.4 word-level perplexity compared with 52.1 for the baseline—an 11% reduction that the author estimates under Kaplan et al. scaling laws corresponds roughly to making the trained network 1.5 times larger. Measured on the model's BPE-32k tokens, test perplexity dropped from 17.88 to 16.43.
  • Zero-shot task gains: Across ten lm-eval benchmarks, the table model lifted average zero-shot accuracy by 1.24 percentage points (56.11% vs. 54.87%), with the strongest lifts on tasks involving everyday associations between words and events, such as SciQ (+3.4) and ART (+2.5).

Updating 10,000 Facts at 12 Milliseconds Each—No Retraining

The feature drawing the sharpest reaction is not the frozen table bank itself, but a separate training-free edit layer placed at the end of the pipeline to handle continual knowledge updates once pretraining finishes. Every new entry lives in a record pairing subject tokens, a hidden-state key, and target answer tokens. During generation, the edit triggers only when the exact subject string appears verbatim within the last 64 tokens of the prompt (not embedded inside a larger word) alongside a check that the Transformer's final hidden state matches the stored key with raw cosine similarity of at least 0.93 (cos >= 0.93).

Tested across 10,000 sequential edits from the WikiBigEdit benchmark (measured on Kaggle T4 GPUs), the gap between side-memory lookups and weight-based updates was dramatic:

  • Edit layer (T + edit layer): Using greedy SQuAD-normalized exact-match scoring, the author reports exact matches on 99.9% of edited questions (and 97.4% of rephrased prompts), left 98.2% of unrelated responses unchanged, shifted word-level validation perplexity by +0.0004 (reported on the project page as a 0.003% perplexity change, against a 17.20 pre-edit baseline; BPE-32k test perplexities were 16.43 vs. 17.88 separately), and wrote each new fact in 12 milliseconds without touching network weights.
  • Full fine-tuning and LoRA: Full fine-tuning recalled at most 36.3% of the sequential edits on the baseline (34.3% on T), lifted validation perplexity by +202.7 (T) and +527.4 (B), and dropped unrelated-fact retention to 0.0%–0.4%. Standard LoRA recalled 23.9% on the baseline while pushing validation perplexity up by +1,386 (and +20,899 when merged after each batch), well past the 1,000 mark.

Built-In Limits and Community Skepticism

To Kim's credit, the wtable-lm repository explicitly documents where this shortcut stops working—and remember that the manuscript on Preprints.org has not yet undergone peer review. First, the edit layer relies on the Transformer's final hidden state rather than the sparse tables themselves, meaning the editing overlay runs independently on standard models (B) too and does not prove that sparse tables make weight editing easier. Second, the edit layer has strict matching constraints: it only triggers when the subject name appears verbatim within that 64-token window, misses aliases, emits stored answers verbatim, and cannot answer reversed queries or multi-hop reasoning from an edit.

A separate framing caveat is clear in both the repository specs and Hacker News discussion: holding trainable parameters equal at 103M while adding 7.96 GiB of frozen tables does not keep total memory or disk footprint equal against a 0.2 GB standalone network. Pretrained checkpoints and the 8 GB table archive have also not yet been released in the repository.

Why Separating Fluency From Facts Matters

Even with those caveats, Kim's benchmark results highlight a practical pain point familiar to anyone using AI tools for fast-changing product specs, prices, or internal rules. When thousands of edits are forced directly into the same neural parameters that govern grammar and reasoning, accuracy on older facts and general fluency eroded sharply in the WikiBigEdit tests. Decoupling compact linguistic fluency from fast, inspectable side memory points toward a cleaner design—and I am quietly hoping the author's code has time to make waves in lightweight models on home computers before major labs fold the idea into paid tiers.

Jason Hunt