Repository navigation
Compare independent n-gram rows with matched hashing and complete quality evidence - #55
Merged
Merged
Conversation
initial-d
marked this pull request as ready for review
November 7, 2026 08:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hash-bucketed n-grams share row updates, so changing bucket capacity does not directly test independent learned identities. This change adds a training-only canonical n-gram registry and independent rows, with a matched hash control that has identical row parameters, effective initial vectors, training exposures and frozen Qwen backbone. Both variants use zero embeddings for unseen keys in the primary comparison; the same trained hash checkpoint is separately evaluated with ordinary open-vocabulary lookup.
The experiment is complete: 24 final models cover Qwen3-0.6B/Qwen3.5-4B, 1,024/20,877 edits and three seeds. At 20,877 edits, exact rows improve the seed/case-pooled harmonic ES/PS/NS score by 0.41/1.24 percentage points versus matched-coverage hashing and 2.29/4.05 versus native open-vocabulary hashing. All four pointwise 95% intervals are positive and locality improves. Two small-grid comparisons have intervals crossing zero and remain in the report. This is frozen-backbone MultiCounterFact editing; it does not establish pretraining, native serving/compression superiority or naturally occurring 99% cosine similarity.
The source-qualified archive includes all 24 reports, four vocabulary reports, two real-model preflights, runtime snapshots, paired test arrays, exact commands and complete bundle costs. A dependency-free verifier checks provenance, budgets and point estimates; an optional NumPy-only CPU check reproduces all eight bootstrap intervals. CI runs both. Model deltas, canonical token-key dictionaries and raw loss-level files remain outside the repository, with hashes retained.
Validation:
python3 -m unittest discover -s tests: 250 tests, 125 passed and 125 optional-dependency skips locally.python3 -S docs/ngram_identity_evidence_20261107/verify.py: passed.python docs/ngram_identity_evidence_20261107/verify.py --bootstrap: all eight intervals reproduced on local CPU.git diff --checkpassed.