{"slug": "97-code-weights-8-1-better-i-checked-the-math", "title": "97% code weights, 8.1% better: I checked the math", "summary": "An independent developer recomputed every headline number from Youngseong Kim's preprint on a language model whose initial weights are written as code, finding the claims technically hold but the marketing framing inflates them. The 97% figure depends on bf16 checkpoint storage (it falls to 95.1% in fp32), and the improvement is 11% in word-level perplexity but 8.1% in token-level perplexity and 2.9% in loss terms, with the poster citing the largest. The 1.5x parameter-scaling equivalence and the +1.24-point zero-shot accuracy gain both check out against the repository's published result files.", "body_md": "An LLM wrote 97% of a language model's stored weights as code, and the model is 11% better than its baseline. Those are the two numbers on the poster. I recomputed every headline number from the author's own published result files, and they all check out — but the second number is 8.1% in the unit the author also publishes, and the first number depends on what format you store the network in. The paper is honest about both. The headlines are not.\n\nThe work is \"A Language Model Architecture Whose Initial Weights an LLM Can Write as Code,\" by independent researcher Youngseong Kim (Preprints 202611.3172, November 2026). The idea: instead of training all the weights, have a frontier LLM — Gemini 4 Neon, per the author — write a *compiler* that turns 31.8 billion tokens of corpus statistics into a frozen 7.96 GiB bank of sparse tables. Gradient descent then trains only a 103M-parameter Transformer on top, on 10 billion tokens. The code and all result files are public at `github.com/Kim-Ai-gpu/wtable-lm`.\n\nI did not re-run the training — the trained checkpoints are not released yet, and 10 billion tokens is not a morning job. What I did was take the repository's own result JSONs and recompute every number the paper and the site lead with. Here is what survived.\n\nThe tables are 7.96 GiB. The network is 103M parameters, stored in bf16 — about 0.2 GB, and the README says the released weights are \"about 200 MB each.\" My arithmetic:\n\n```\n7.96 / (7.96 + 0.20) = 97.55%\n```\n\nThe repository's own load logs agree: the table model loads 8.34 GB into VRAM, the no-table baseline loads 0.39 GB. The difference, 7.95 GB, is the tables. So \"over 97% of the model's stored bytes\" checks out — in the format the author actually uses.\n\nBut store the same network in fp32 and the fraction falls:\n\n```\n7.96 / (7.96 + 0.41) = 95.10%\n```\n\nThe 97% is a fact about the checkpoint format, not about the architecture. And there is a precision point the HN headline elides: the LLM wrote the *compiler program* — it chose the 18 channels, the hashing, which keys to keep, how values are encoded. The table *values* themselves are corpus statistics: n-gram counts, skip-gram counts, synonym clusters, concept associations. No LLM wrote those numbers; a counting program did. \"Weights as code\" means the program that computes the weights, not weights typed out by a model.\n\nThe site leads with word-level perplexity: 46.4 for the table model, 52.1 for the baseline. My arithmetic:\n\n``` php\n(52.1 - 46.4) / 52.1 = 10.94%  -> \"11% lower\" ✓\n```\n\nThe repository's README reports the same experiment in token-level perplexity: 16.43 vs 17.88. Those numbers are also in the benchmark JSONs, as `tok_ppl` 16.4279 and 17.8752. My arithmetic:\n\n```\n(17.88 - 16.43) / 17.88 = 8.12%\n```\n\nSame models, same test set, same 2,000 held-out documents. The gap looks bigger in word-level perplexity because perplexity is exponential in loss: in loss terms the improvement is ln(17.88) − ln(16.43) = 0.084 nats, a 2.9% lower loss. Three true numbers for one result — 11%, 8.1%, 2.9% — and the poster picks the biggest. The paper itself reports both perplexities; only the headline picks one.\n\nThe scaling-law claim holds up either way. The site says the gain is \"comparable under standard parameter scaling laws to making the network about 1.5 times larger,\" using Kaplan et al.'s loss ∝ N^−0.076. I recomputed it:\n\n```\nloss ratio = ln(52.1) / ln(46.4) = 3.953 / 3.837 = 1.030\nN multiplier = 1.030^(1/0.076) = 1.48x  -> \"~1.5x\" ✓\n```\n\n(The ratio is identical in token-level units, since the word/token conversion cancels.)\n\nThe README's benchmark table claims a mean zero-shot accuracy of 56.11 for the table model vs 54.87 for the baseline, +1.24 points across ten tasks. I recomputed the mean task by task from the two benchmark JSONs (`table_model_T.json`, `baseline_B.json`), using acc_norm where the task has it and acc otherwise, exactly as the README states:\n\n```\ntask          T      B      diff\nSciQ        77.30  73.90  +3.40\nARC-Easy    51.05  51.35  -0.29\nPIQA        65.07  63.55  +1.52\nHellaSwag   36.48  35.78  +0.70\nWinoGrande  50.75  50.43  +0.32\nOpenBookQA  31.20  31.20  +0.00\nBLiMP       80.86  80.14  +0.72\nART         56.46  53.98  +2.48\nCSQA        31.70  29.73  +1.97\nCBT-NE      80.24  78.64  +1.60\nmean        56.11  54.87  +1.24\n```\n\nMy mean matches the README's to the hundredth on both models. The honest detail in the table: the gains concentrate where you'd expect from a table of word associations — SciQ +3.4, ART +2.5 — and one task, ARC-Easy, got slightly *worse* (−0.3). A table of corpus statistics helps exactly the tasks that reward common associations between words, and the author says so.\n\nThe second claim is the wilder one: after pretraining, an external edit layer adds 10,000 facts sequentially, with no training, and recalls 99.9% of them. I checked the final stream point (N=10,000) in `results/editing/T_overlay_run.json`:\n\n```\nupdate EM 99.9 | rephrase EM 97.4 | persona EM 89.9 | loc keep 98.2\nfirst-10% retention after all 10,000 edits: 99.6\nedit cost: 12.00 ms per fact (50.5 at N=10, 14.8 at N=1,000)\nval bits-per-byte: 0.898024 -> 0.898031  (moved by 7e-6: nothing)\n```\n\nThe comparison methods in the same table are brutal in the other direction, and they match the JSONs too: full fine-tuning recalls at most 36.3% of the edits (baseline B) and pushes perplexity up by 527 points; LoRA recalls 23.9% and pushes it up by 1,386. The edit layer works because it never touches the weights — it stores each fact as a record (subject tokens, a hidden-state key, answer tokens) and fires only when the subject appears verbatim and the hidden state matches the key at cosine ≥ 0.93. It is retrieval, not learning, and the author files it in that family himself (GRACE, WISE).\n\nThree things, stated plainly because they are the difference between \"verified\" and \"reproduced\":\n\nThe numbers are real, and the two headline numbers are the flattering framings of real numbers: 97% because the network is stored in bf16, 11% because word-level perplexity is the exponential of the loss. The unflattering versions — 95% in fp32, 8.1% in token perplexity, 2.9% in loss — are all in the author's own files. The result that actually matters is the boring one: a frozen lookup table of corpus statistics bought a 103M-parameter model about 1.5× of effective scale, and a side-memory edit layer recalled 99.9% of 10,000 facts while fine-tuning forgot two-thirds of them and wrecked the model. That is worth stealing for your own small models. The poster numbers are just the poster.\n\nSingle author, Preprints (not peer-reviewed), 103M parameters, one training run, no released weights, so nothing here is independently reproduced — only internally consistent. The 12 ms/fact editing cost is on a T4; the perplexity numbers are on 2,000 held-out FineWeb-Edu documents with the author's own BPE-32k tokenizer. I verified the arithmetic and the consistency, not the training run.\n\n`results/benchmarks/table_model_T.json`, `results/benchmarks/baseline_B.json`, `results/editing/T_overlay_run.json`, `README.md`", "url": "https://wpnews.pro/news/97-code-weights-8-1-better-i-checked-the-math", "canonical_source": "https://dev.to/frankchu/97-code-weights-81-better-i-checked-the-math-1ifk", "published_at": "2026-11-30 15:10:24+00:00", "updated_at": "2026-11-30 15:16:15.085862+00:00", "lang": "en", "topics": ["large-language-models", "machine-learning", "ai-research", "ai-safety"], "entities": ["Youngseong Kim", "Gemini 4 Neon", "wtable-lm", "Preprints"], "also_reported_by": [], "takeaway": "Perplexity gains are exponential: the same result reads as 11% in word-level perplexity, 8.1% in token-level perplexity, and 2.9% lower loss, so compare models in loss or nats before citing a headline percentage.", "recommendation": {"advice": "Report perplexity improvements alongside the equivalent loss reduction in nats, and state the checkpoint precision, since the same result can read as 11%, 8.1% or 2.9%.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/97-code-weights-8-1-better-i-checked-the-math", "markdown": "https://wpnews.pro/news/97-code-weights-8-1-better-i-checked-the-math.md", "text": "https://wpnews.pro/news/97-code-weights-8-1-better-i-checked-the-math.txt", "jsonld": "https://wpnews.pro/news/97-code-weights-8-1-better-i-checked-the-math.jsonld"}}