A developer built an LLM where Gemini 4 wrote the initial weights as code
Youngseong Kim compiled 97 percent of a language model's weights into 7.96 GiB of frozen tables using Gemini 4 Neon code, cutting perplexity by 11 percent.
By Dillip Chowdary • Nov 30, 2026 • Source: weights-as-code.pages.dev

At a glance
- Architecture
- wtable-lm
- Compiler designer
- Gemini 4 Neon
- Frozen table memory
- 7.96 GiB (97% of bytes)
- Trained parameters
- 103M network
- Corpus statistics
- 31.8B FineWeb-Edu tokens
- Update latency
- 12 ms per fact on T4 GPU
In this post
Researcher Youngseong Kim introduced an architecture where an automated compiler generates 97 percent of a language model's stored weights before optimization begins. According to weights-as-code.pages.dev's report, the system uses a compiler designed by Gemini 4 Neon to transform 31.8 billion tokens of corpus statistics into 7.96 GiB of frozen sparse tables without gradient descent. Standard backpropagation trains only a compact 103M-parameter network positioned over the frozen tables, which the network reads across sequence positions using an Engram block and gated logit fusion.
This article details the weight-space programming framework, benchmark evaluations across ten zero-shot tasks, and continuous knowledge update mechanics tested across 10,000 sequential factual edits. It is written for machine learning engineers, systems researchers, and technical leaders evaluating alternatives to compute-intensive pretraining and parameter fine-tuning.
01Compiler synthesis of sparse memory tables
Weight-space programming replaces gradient descent by directing an external frontier model to write an algorithmic compiler for network weights. The synthesized compiler processes 31.8 billion tokens of FineWeb-Edu text to construct a 7.96 GiB sparse memory bank without running a single gradient step. These precomputed statistical tables account for more than 97 percent of total stored model bytes before training starts.
Standard training runs on top of these static tables using a 103M-parameter Transformer backbone optimized over 10 billion tokens on a single GPU. The frozen data structure supplies linguistic associations directly, eliminating the need to consume training compute on memorizing statistical co-occurrences. As a result, the model focuses its gradient-updated weights on reasoning and contextual synthesis.
Empirical sweeps show that expanding the retained fraction of table entries yields consistent returns across validation evaluations. Retaining larger subsets of frequent table entries steadily lowers word-level perplexity with every capacity doubling, showing no signs of performance saturation. This scalability allows engineers to expand model capacity by compiling larger text corpora without increasing training GPU hours.
02Eighteen channels across six predictive groups
The model architecture connects the neural network to the compiled tables through 18 discrete channels divided into six distinct structural groups. Every channel outputs candidate predictions using a standardized format containing next-token candidates and confidence scores. This uniform abstraction allows the underlying neural backbone to learn dynamic trust weighting for each candidate stream at every position.
The Transformer interacts with these channels through an Engram block placed after layer four, combined with gated fusion at the output logit layer. Five channel groups derive statistical distributions from 31.8 billion tokens of FineWeb-Edu data completely disjoint from the network training set. The remaining four channels evaluate dynamic token associations directly from the active input document during inference.
| Group | Predicts next token from | Channels |
|---|---|---|
| n-gram | The last 1 to 5 tokens | 5 |
| Skip-gram | Earlier tokens, with gaps | 3 |
| Synonym | Synonym clusters of recent tokens | 2 |
| Concept | Associations between concepts | 2 |
| Rule | Explicit phrase and fact rules | 2 |
| In-context | The current document | 4 |
03Perplexity reductions and parameter scaling gains
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Evaluations on 2,000 held-out FineWeb-Edu test documents with 1,024-token contexts demonstrate marked gains over baseline architectures. The hybrid table model achieved a word-level perplexity of 46.4, delivering an 11 percent reduction compared to the 52.1 perplexity recorded by a parameter-matched 103M baseline lacking tables. Both models were trained on identical 10-billion-token allocations using the exact same backbone.
Under the neural scaling formulations established by Kaplan and colleagues, the observed loss improvement is equivalent to multiplying conventional network parameters by roughly 1.5 times. This parameter scaling dividend occurs without adding trainable parameters or extending backward-pass execution times. The architecture captures statistical dependencies earlier in training, yielding superior loss trajectories on single-GPU hardware budgets.
Standardized benchmarks conducted through the lm-eval harness version 0.4.13 demonstrate that zero-shot capability transfers across diverse downstream tasks. The table-backed architecture raised mean zero-shot accuracy across ten primary evaluation benchmarks by 1.2 points using length-normalized scoring metrics. Gains concentrated heavily in tasks requiring associative recall, where static tables provided reliable next-token statistical signals.
04Sequential fact editing on WikiBigEdit
Updating knowledge in production models typically triggers catastrophic forgetting, but an external edit layer circumvents parameter degradation entirely. During sequential testing across 10,000 WikiBigEdit facts applied in continuous batches without rollback, the edit layer answered 99.9 percent of direct target questions. It also resolved 97.4 percent of paraphrase rephrasings while preserving 98.2 percent of unrelated factual answers.
Conventional parameter adaptation strategies deteriorated rapidly under continuous update workloads on the same benchmark. Standard fine-tuning and LoRA methods achieved at most 36.3 percent fact recall while driving validation perplexity above 1,000 across 2,000 validation documents. In contrast, the external edit layer adjusted overall model perplexity by just 0.003 percent while operating at 12 milliseconds per fact.
| Editing method | Fact recall | Rephrase accuracy | Unrelated retention | Validation perplexity | Compute per fact |
|---|---|---|---|---|---|
| External edit layer | 99.9% | 97.4% | 98.2% | +0.003% | 12 ms |
| Fine-tuning | ≤36.3% | Degraded | Degraded | >1,000 | Iterative backprop |
| LoRA | ≤36.3% | Degraded | Degraded | >1,000 | Iterative backprop |
05Three execution stages for external edits
Writing factual edits directly into the sparse tables proved ineffective because tokens preceding target answers typically share common prompt templates. To overcome this limitation, the system stores knowledge modifications outside the primary weight tables as plain data records. This explicit data representation allows human supervisors or automated systems to inspect, modify, or overwrite individual factual assertions directly.
- Store a record Subject tokens, a key matching the hidden state where the answer is given, and target answer tokens are saved during a 12 ms forward pass without backpropagation.
- Fire only when matched Activation requires the subject to appear verbatim in the last 64 tokens and the raw hidden state to match the key with cosine similarity reaching 0.93.
- Push the answer The designated answer token receives a 1.5 logit elevation over the leading candidate sequentially until the full answer string terminates.
Because each edit acts as an independent record, any subsequent update sharing an identical subject and relation automatically replaces prior entries. The inference pipeline isolates these modifications from the core neural weights, guaranteeing that zero gradient descent operations occur during runtime updates. This decoupling protects base model reasoning capabilities while enabling deterministic knowledge maintenance.
Note: Implementation code and experiment checkpoints are available in the Kim-Ai-gpu/wtable-lm repository on GitHub, corresponding to research preprint DOI 10.20944/preprints202611.3172.v1 published in November 2026.
Frequently asked questions
What is weight-space programming in this model?
Weight-space programming uses a Gemini 4 Neon compiler to convert 31.8 billion corpus tokens into 7.96 GiB of frozen sparse tables without gradient descent. These tables represent 97 percent of the model's stored bytes, allowing a 103M-parameter network to learn language structure on top.
How does the model perform compared to a standard 103M baseline?
On held-out FineWeb-Edu documents, the table model achieved a perplexity of 46.4 compared to 52.1 for the baseline, representing an 11 percent reduction. Under Kaplan scaling laws, this gain equals expanding standard network parameters by 1.5 times, while raising average zero-shot task accuracy by 1.2 points.
How does the external edit layer apply continuous updates?
The edit layer saves subject tokens, key hidden states, and answer tokens in a 12-millisecond forward pass without backpropagation. During inference, it verifies subject presence in the prior 64 tokens and checks cosine similarity at 0.93 or higher, raising target answer logits by 1.5.
How do sequential edits compare to LoRA and fine-tuning?
Across 10,000 sequential WikiBigEdit updates, the edit layer recalled 99.9 percent of facts and changed validation perplexity by only 0.003 percent. Fine-tuning and LoRA recalled at most 36.3 percent of edits while pushing perplexity above 1,000.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement