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%

# project: localvm-research document: expD_progressive_reconstruction/hypothesis author: Simon-Pierre Boucher contact: contact@spboucher.ai created: 2026-08-12 modified: 2026-08-12 status: reviewed

# Hypothesis — expD_progressive_reconstruction

Follows expG (margin gating promoted; naive affine 2-bit base dead; 4-bit escalation need 36.6%). This experiment measures how rapidly the token decision and distribution converge as residual quantization stages are added — the quality-vs-cumulative-bits curve that, combined with expG's escalation rates and expH's byte budget, decides candidate C1's arithmetic.

text
Hypothesis
  Weights represented as base + residual stages (each stage an affine
  group-quantization of the previous stage's error) converge rapidly:
  one residual stage over a 3-bit base (≈6.4 cumulative bits/param)
  reaches ≥95% greedy agreement, and a margin-gated two-tier policy
  (stage-k decision when margin ≥ τ, stage-(k+1) decision otherwise)
  attains ≥97% agreement while consulting the residual for ≤40% of
  tokens. Hidden-state error shrinks monotonically with each stage.

Falsification criterion
  If base3+1 residual (≈6.4 bits) stays below 90% agreement, or the
  two-tier margin policy cannot beat the flat next-stage agreement while
  escalating <50% of tokens, or hidden-state error does NOT decrease
  monotonically with stages (residual coding unstable), then progressive
  residual representations lose to simply shipping a flat higher-bit
  model, and C1 must pivot to expert/sparsity paging (C3) or amortized
  verification (C2).

Method
  Model: Qwen3-1.7B bf16 reference (as expG). Residual ladders, affine
  group-64 quantization at every stage, applied to all divisible Linear
  layers: A) 3 → 3+3 → 3+3+3 bits; B) 4 → 4+4 bits.
  Same 48 trajectories × 128 tokens protocol as expG (teacher-forced).
  Per cumulative stage: agreement, KL(ref||stage), margin stats, AUROC,
  escalation curve. Two-tier policy simulation from recorded per-stage
  argmax/margins across a τ grid. Hidden-state relative L2 error vs
  reference at layer depths {25%, 50%, 75%, 100%} on 8 trajectories.
  Bits accounting includes scale/bias overhead (group 64 → +0.5 bits/param
  per stage at bf16 scales+biases).

Baseline
  Flat MLX affine quantization at matched cumulative bit-widths from expG
  (3, 4, 8-bit rows) — the "just ship a bigger flat model" alternative.
  No straw men: residual ladders must beat or match flat models at equal
  bytes to be interesting.

Result
  CONFIRMED (no kill criterion triggered). 3+3 bits: 95.7% agreement
  (≥95% target met); two-tier 4-bit policy: 97.6% @ 35% escalation
  (≥97% @ ≤40% met); hidden-state error monotone (≈5×/stage). Static
  parity caveat: flat quantization mildly beats ladders at equal bytes.
  Full numbers: results/expD_progressive_reconstruction/20260812T043508Z/.

Interpretation
  Progressive coding's value is dynamic quality (one artifact, runtime-
  chosen precision), not compression. C1 operating point exists at
  4-bit base + 25–35% escalation. Open variable: bytes-per-escalation
  (full-residual re-run is too big at scale) → layer-restricted
  escalation (expF) or temporal locality (expB).

Next experiment
  expF layer-sensitivity map; then expB temporal locality.