License note: code is MIT (
LICENSE-CODE), papers are CC-BY-4.0 (LICENSE-PAPERS). This repository contains no model weights.
Homunculus
Training-free exact weight inheritance: widen a trained network by duplicating its units, with the same function, and measure what happens when you try to shrink it back.
Status: research notes, 28 November 2026. Single seed. The method and all shrinking experiments use no training. The only training code is code/falcon/train.py, a small earlier capacity experiment kept for provenance (paper 5, section 4). Negative results are reported as results.
What this is
Take a trained network. Copy each hidden unit k times and divide the next layer's weights by k. The new, wider network computes the same function as the old one. No data, no gradient steps, no recording. We checked this on real embodied policies and on a hybrid LLM, and we measured the inverse (shrinking) on the natural, non-widened model.
The duplication rule is not new: it is the Net2WiderNet operation from Net2Net (Chen, Goodfellow, Shlens, 2015). What we add: applying it to live embodied policies, framing it as a zero-training deployment transform, closed-loop bit-level verification (original vs widened in simulators and in the browser), extending it to a hybrid attention + Mamba2 + MLP LLM on five axes, and measuring where the inverse stops being exact.
Main results (all measured, see results/ and papers/)
| Model | Original | Widened | Result |
|---|---|---|---|
| LunarLander PPO (sb3) | 4,996 params | 69,124 (k=4) | 0 of 1000 episodes differ (Gymnasium v3); logit gap 5.3e-15 (float64) |
| weeble Go1 (MuJoCo) | 192,408 | 2,735,640 (k=4) | logit gap 6.7e-6 (float32); official WASM parity test passes, action error <= 4.2e-7 |
| weeble G1 (MuJoCo) | 224,954 | 2,865,722 (k=4) | logit gap 1.8e-6 (float32); parity test passes |
| openpilot driving model (small) | 34.3M | 108.2M (30 of 37 MLP blocks, k=4) | output gap below the fp16 noise of the original itself |
| Falcon-H1-Tiny-90M | 91,131,072 | 165.5M (inner axes, k=2), 273.2M (residual, k=3) | 15/15 greedy generations token-identical; JS engine widened vs original: 0.00e+00 at k=2 |
| Falcon round-trip (widen then shrink) | 91,131,072 weights | 0 differing elements on MLP, attention heads, Mamba heads, Mamba d_state, residual (k=2), MLP (k=3) and the four inner axes together (k=2) |
Honest limits: tiling preserves the function and adds no skill. Without symmetry-breaking noise the added units stay exact copies forever (dead capacity; this follows from identical gradients, our short numerical check of it is unconfirmed and needs a re-run). Long walking trajectories are chaotic, so we claim same function and same behavior, not same trajectory.
Shrinking Falcon-H1-Tiny-90M with no training (MLP hidden dimension, 25% cut; original val CE 4.989)
| Method | val CE | KL vs original | top-1 agree |
|---|---|---|---|
| importance pruning (mean abs activation x output-weight norm) | 5.12 | 0.77 | 0.57 |
| behavior clustering (neurons grouped by activation profile) | 5.18 | 0.87 | 0.61 |
| random pruning | 6.24 | 2.31 | 0.42 |
| k-means on weights, merged | 7.24 to 9.45 | 3.93 to 5.48 | 0.28 to 0.32 |
| ordered interpolation ("shrink the canvas") | 7.02 to 8.99 | 3.74 to 7.19 | 0.09 to 0.26 |
| truncated SVD, same parameter budget | 8.86 | 6.01 | 0.10 |
| Q8 then importance pruning | 5.14 | 0.84 | 0.55 |
| Q4 alone (naive per-row RTN, no pruning) | 6.94 | 3.62 | 0.35 |
- Quantization does not create duplicates: 0 of 18,432 gate/up neuron vectors are identical after Q4 or Q8.
- The natural model has no hidden tile structure: the relative widen(shrink(W)) weight error is 0.45 to 0.52 at a 25% cut (SVD, which is not a tiling test, gives 0.35) and no layer is close to zero.
- Generation samples show the 25% cut keeps fluency and loses facts. CE understates the damage. See
papers/p3_energy_canvas.md.
Papers (English, CC-BY-4.0)
- Neural inheritance
- A visual-geometric view of weights
- The energy canvas
- Quantization and pruning
- Widening and its inverse
- Cross-architecture experiments
Repository layout
papers/the six papers andfalcon_energy_map.pngcode/widen_mlp_numpy.pyexact widen/shrink for plain MLPs, numpy only, with a self-testcode/falcon/Falcon-H1 widening, verification, shrinking and pruning scripts (PyTorch + transformers)code/falcon_demo/the in-browser Falcon page (pure JavaScript engine, widening happens in the browser)code/weeble/notes for the weeble demo (source not included, see that README)code/audit/andresults/audit/the scripts and outputs of the independent re-check of the tables and the Q4-alone row (results/q4_alone.jsonl)results/raw result files exactly as produced.importance_scores_S.ptis excluded from git by.gitignore(*.pt);code/falcon/heat.pyneeds it to redraw the energy mapmodel_cards/honest cards for the widened models (weights are not published here)
Quickstart
Self-test of the rule (numpy only):
python code/widen_mlp_numpy.py
Falcon demo in your browser (downloads the 182 MB official weights from Hugging Face on click, about 1 GB RAM):
cd code/falcon_demo
python3 -m http.server 8000
# open http://localhost:8000/ , click load weights, widen, generate
Falcon experiments: see code/falcon/README.md.
Naming and licenses
Widened models use a neutral name pattern: <base-model>-Homunculus-x<k>, and are described as "wider, functionally identical to the base model, for research and warm starts". They are not new, more capable models. Trademarks, model names and weights belong to their owners and are governed by the base model licenses, which you must check before publishing anything derived. Code: MIT (LICENSE-CODE). Papers: CC-BY-4.0 (LICENSE-PAPERS).
Cite
See CITATION.cff.
