Gemini 4 生成 97% 初始权重 模型困惑度反降

原标题:I built an LLM where Gemini 4 wrote the initial weights as code (97% of bytes)
72AI 研判分

一位开发者构建了约 1.03 亿参数的语言模型,其初始权重中 97% 的字节由 Gemini 4 Neon 以代码形式生成,而非随机初始化。在相同骨干与 10B 训练 token 下,冻结的生成权重表使词级困惑度显著低于基线,且零样本准确率在 10 项任务上普遍提升,其中依赖词语与事件常见关联的任务增益最大。作者还展示了在预训练后追加 1 万条 WikiBigEdit 事实的编辑层方案,无需重训即可持续写入新事实且不遗忘旧知识。

报道正文

本文目录9 个章节

Same network, lower perplexity

Both models have the same backbone, about 103M trained parameters, and the same 10B training tokens. The only difference is the frozen tables.

Word-level perplexity on 2,000 held-out FineWeb-Edu test documents, context 1,024. The 1.5× estimate uses the parameter scaling law of Kaplan et al. (2020), loss ∝ N−0.076.

Bigger tables keep helping

Keep only the most frequent fraction F of table entries in the trained model, without retraining. Perplexity improves with every doubling and shows no sign of saturating.

Show

Zero-shot accuracy

Accuracy of the table model minus the baseline on ten tasks. The largest gains come on tasks that reward common associations between words and events.

lm-eval 0.4.13, zero-shot, length-normalized accuracy where available. Results on all 21 evaluated tasks are in the paper's appendix.

Adding 10,000 facts after pretraining

WikiBigEdit facts are applied one batch after another and never undone. The edit layer stores each fact as a record and trains nothing. Weight editing keeps learning the new facts but forgets the old ones and damages the model.

Metric Show results after 10,000 edits

EM is SQuAD-normalized exact match (%). Loc keep is the share of unrelated questions whose answer did not change. Perplexity is word-level on 2,000 validation documents. Time is the editing cost per fact on one T4 GPU.

How the edit layer adds a fact

Writing facts into the tables fails, because the last few tokens before an answer are almost always the same question template. The edit layer keeps facts outside the tables instead.

1

Store a record

Subject tokens, a key (the hidden state where the answer should be given) and the answer tokens. One forward pass, about 12 ms, no gradient step.

2

Fire only when it should

The subject must appear verbatim in the last 64 tokens (stored with and without a leading space, never inside a longer word), and the raw hidden state must match the key, cos(ht, ki) ≥ 0.93. No statistics of the prompt template are needed.

3

Push the answer

The stored answer token is raised 1.5 above the current top logit, one token after another, until the answer ends.

Records are plain data, so a person or an LLM can write, inspect or delete them. A new edit for the same subject and relation replaces the old one.

Eighteen channels, one interface

Every channel answers in the same form, a short list of next-token candidates with scores, so the network only learns how much to trust each one at each position.

GroupPredicts the next token fromChannels
n-gramthe last 1 to 5 tokens5
Skip-gramearlier tokens, with gaps3
Synonymsynonym clusters of recent tokens2
Conceptassociations between concepts2
Ruleexplicit phrase and fact rules2
In-contextthe current document4

The first five groups are counted from 31.8B FineWeb-Edu tokens, disjoint from the network's training data. The compiler was designed by Gemini 4 Neon.