SPB Git

spb/localvm-research Public License

Running LLMs larger than memory on a consumer Mac — falsification-driven research: margin-gated deferred refinement, out-of-core verification on Apple Silicon. TR-01 published.

Python 63.2% JavaScript 23.5% CSS 11.8% Shell 0.9% Makefile 0.5%
4.0 KB · 76 lines markdown
Rendered Raw Blame History
1---2project: localvm-research3document: expD_progressive_reconstruction/analysis4author: Simon-Pierre Boucher5contact: contact@spboucher.ai6created: 2026-08-127status: reviewed8---910# Analysis — expD_progressive_reconstruction1112Run: `results/expD_progressive_reconstruction/20260812T043508Z/` · code committed13before run. Qwen3-1.7B bf16 reference, affine group-64 residual ladders, 4814trajectories × 128 tokens (6 144 positions), hidden states at layers 6/13/20/27.15Bit counts below INCLUDE scale/bias overhead (+1.0 bit/param/stage at group 64).1617```text18Hypothesis / Falsification19  See hypothesis.md. Kill criteria: base3+1 residual < 90% agreement, or20  two-tier policy unable to reach ≥97% with <50% escalation, or21  non-monotone hidden-state convergence. → NONE triggered.2223Result24  Ladder A (3-bit stages)     agree    KL      AUROC  esc@99%  hid.err L6→L2725    stage0   4.0 bits         0.732    0.778   0.850  60.4%    0.34 → 0.8326    stage1   8.0 bits         0.957    0.024   0.952  11.0%    0.05 → 0.1227    stage2  12.0 bits         0.983    0.0023  0.980   2.6%    0.01 → 0.0428  Ladder B (4-bit stages)29    stage0   5.0 bits         0.875    0.198   0.895  35.3%    0.16 → 0.3530    stage1  10.0 bits         0.984    0.0031  0.976   2.4%    0.02 → 0.0431  Two-tier margin policies (take base decision if margin ≥ τ, else stage+1):32    B_base4 0→1: τ=2.0 → 25% escalated, 96.4% agree; τ=3.0 → 35%, 97.6%33    A_base3 1→2: τ=0.5 →  5% escalated, 97.4% agree; τ=1.0 → 12%, 97.9%34    A_base3 0→1: τ=3.0 → 44% escalated, 92.7% (3-bit base too weak alone)35  Sanity: ladder stage0 rows reproduce expG's flat 3-bit and 4-bit rows36  (0.732 vs 0.731; 0.875 vs 0.874) — pipeline consistent.3738Interpretation39  1. PROGRESSIVE RESIDUAL CODING WORKS: convergence is rapid and monotone40     at every depth; each stage roughly divides hidden-state error by 5×41     and KL by ~30-60×. The margin signal stays strong at every stage42     (AUROC 0.85–0.98), so gating composes across stages — multi-tier43     escalation (G01+G02) is structurally sound.44  2. HONEST CAVEAT — static parity, not static win: at matched stored45     bytes, one-shot flat quantization is mildly better than a residual46     ladder (flat 8-bit: 98.0% @9.0 bits vs ladder 3+3: 95.7% @8.0 bits;47     ladder 4+4 @10.0 ≈ flat 8-bit @9.0). The ladder's value is therefore48     NOT compression efficiency — it is that quality becomes a *runtime*49     variable: the same stored artifact serves 5.0-bit resident execution50     and on-demand refinement, which no flat format offers.51  3. THE C1 OPERATING POINT EXISTS: 4-bit-class resident base (5.052     bits/param incl. overhead) + margin gate at τ≈2–3 escalating 25–35%53     of tokens to base+residual yields 96.4–97.6% greedy agreement —54     within reach of the ≥97% target, using decisions, not hope.55  4. THE OPEN VARIABLE IS BYTES-PER-ESCALATION: teacher-forced escalation56     here re-runs the whole model at stage+1, i.e. touches the FULL57     residual (≈1.06 GB at 1.7B; ≈20 GB at 32B) — incompatible with the58     ~650 MB/token expH budget at scale unless (a) escalation can be59     restricted to a sensitive subset of layers/blocks, or (b) residual60     reads have strong temporal locality so the hot residual working set61     lives in RAM. Hidden-error concentration at the last layer (0.83 at62     L27 vs 0.34 at L6, 4-bit base) suggests (a) is plausible: depth-63     weighted precision or last-layers-only escalation could capture most64     of the correction for a fraction of the bytes.65  5. At the 1.7B scale used here, both base and residual fit in RAM —66     these results validate mechanisms, not end-to-end economics. Scale67     tests belong to Phase 7 prototyping.6869Next experiment70  expF (error accumulation / layer sensitivity): perturb precision per71  layer group to map which layers actually need escalation — if the top72  quartile of layers captures most disagreement repair, bytes-per-73  escalation drops ~4× and C1's arithmetic closes. Then expB (temporal74  locality of the escalated set).75```76