Skip to content

Measure structural sharing after FP16/INT8 on trained n-gram tables - #40

Merged
initial-d merged 4 commits into
mainfrom
codex/quantized-structural-evidence
Oct 31, 2026
Merged

initial-d merged 4 commits into
mainfrom
codex/quantized-structural-evidence

Conversation

@initial-d

Copy link
Copy Markdown
Owner

Existing FP32 structural ablations do not establish whether DATrie prefix/suffix sharing adds value after ordinary weight quantization. This adds frozen CPU FP16 and scale-aware per-row INT8 storage, preserving original IDs and complete encoded representative bytes through the native mark-compact path.

The same 18 cached trained SGNS/GRU tables now have 486 matched storage variants: raw mmap, native identity/layout, exact encoded-byte dedup, and structural sharing at five cosine thresholds. Results count scales, maps, metadata and actual key artifacts; whole GRU bundle costs and source hashes are retained. Selection is locked on validation before testing.

At the fixed 0.99 cosine/norm guard, INT8 still leaves an additional 20–28% saving on SGNS and 11%/15% on order-8/12 GRU versus the best same-encoding control. Order-4 GRU INT8 compaction increases storage. These are approximate row changes on small public-text trained references, not official trained Engram or general LLM evidence; numeric gathers remain slower than raw encoded mmap.

Seven of 27 primary validation choices exceed the held-out KL budget and remain failures. A separately labeled post-main-run fixed-0.99 audit passes all 27 tests without replacing the primary choices. Rate–distortion plots, per-seed data, commands, environment, build/test logs and the initial launcher failure are inspectable in docs/quantized_structural_evidence_20261031/.

Validation: 137 local unit tests pass (26 platform/optional skips); 24 pinned Linux codec/DATrie/causal tests pass; every encoded row and original-ID forwarding result is verified in the main run. The subsequent max-float32 INT8 overflow guard passes extreme-value checks and preserves all 54 trained encodings byte-for-byte.

@initial-d
initial-d merged commit 1334883 into main Oct 31, 2026
18 checks passed
@initial-d
initial-d deleted the codex/quantized-structural-evidence branch October 31, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant