feat(gguf): the GGUF v1 toy — the smallest population, and the cleanest - #83
Conversation
`tinyllamas-stories-260k-f32.gguf` (512 tokens) has no oracle: no corpus file
shares or extends its vocabulary. Its warrant is the same shape as Baichuan's
and rests on ~334x fewer observations, which is the honest caveat.
v1 toy 512 tokens 164 adjacent pairs 150 INFORMATIVE 14 ties (8.5%)
0 raw / 0 genuine order violations
forced (id 259): genuine 1
SMALL IS NOT WEAK, AND THE DISTINCTION IS MEASURED RATHER THAN ARGUED. At 8.5%
ties this file has the HIGHEST informative fraction of the four allowlisted
vocabularies:
v1 toy 164 pairs 8.5% ties
baichuan 54803 pairs 44.4% ties
llama-spm 61248 pairs 51.7% ties
So its limitation is population SIZE alone, not population QUALITY. Those are
separately actionable — size is fixed by more data, quality by a better
measurement — and conflating them would discount the wrong thing.
THE NEGATIVE CASE IS IN THE CLAIM, because on 164 pairs it is the whole point:
A BROKEN COMPARATOR RETURNS 0 HERE TOO. The forcing arm is the only thing that
tells those apart, so it is asserted rather than mentioned. The warrant string
a user reads says this, along with PROOF AGAINST GROSS FAILURE, NOT PROOF OF
CORRECTNESS.
The "small but clean" argument is itself guarded: the test asserts the tie
fraction stays under 20%. If this file ever loses that property the warrant
becomes false and must be rewritten, not kept.
30 files: 22 rebuilt, 8 refused -> 23 rebuilt, 7 refused
DELETED: `a_vocabulary_with_no_oracle_is_still_refused`. It walked corpus files
that were NOT allowlisted and checked each was refused with its digest named.
Every SentencePiece vocabulary in the corpus is now allowlisted, so it had no
subjects left — and a `for` over an empty list reaches no assertion and reports
success. A guard that outlives its subject is a green light with nothing behind
it. Its own comment said to delete it rather than rewrite it over an empty set.
AND WHAT THAT COSTS, STATED RATHER THAN QUIETLY LOST: the refusal MESSAGE path
is no longer reachable from any corpus file, because reaching it needs a
`llama`-model checkpoint with no merges whose digest is absent from the
allowlist, and the corpus no longer contains one.
REPLACED with `the_derivation_allowlist_is_closed_and_its_lookup_discriminates`,
which needs no corpus and so runs in the ordinary suite. It asserts all four
known digests ARE allowlisted — the control, without which the negative case
would pass against a function that returns None for everything — and that four
absent digests are not, including one that differs from a real entry by a
single character.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtTf3315ahKPPyBiYugnPh
There was a problem hiding this comment.
Sorry @ciresnave-bot, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 6 days and 20 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideThe PR allowlists and validates the smallest GGUF v1 vocabulary, including an explicit small-but-clean evidence warrant, comparator forcing check, rebuild smoke test, and corpus-independent allowlist discrimination. It also replaces a now-vacuous refusal guard with closed-table tests while documenting that unknown-vocabulary refusal messaging is no longer covered by corpus fixtures. Sequence diagram for validating the GGUF v1 toy vocabularysequenceDiagram
participant Test as V1 toy tests
participant Corpus as GGUF corpus
participant Content
participant Comparator as score_order_violations
participant Tokenizer as extract_tokenizer
Test->>Corpus: read_corpus("tinyllamas-stories-260k-f32.gguf")
Corpus-->>Test: GGUF content
Test->>Content: vocab_sha256(tokens)
Content-->>Test: V1_TOY_VOCAB_SHA256
Test->>Comparator: score_order_violations(tokens, scores)
Comparator-->>Test: 0 genuine violations
Test->>Comparator: score_order_violations(tokens, forced scores)
Comparator-->>Test: forced_genuine > 0
Test->>Tokenizer: extract_tokenizer()
Tokenizer-->>Test: rebuilt tokenizer
Test->>Tokenizer: encode(probe, false)
Tokenizer-->>Test: non-empty token IDs
Flow diagram for GGUF derivation allowlist discriminationflowchart TD
A[Known vocabulary digests] --> B[Content.sp m_derivation_warrant]
B --> C{Digest is allowlisted?}
C -->|Yes| D[Return derivation warrant]
C -->|No| E[Return None]
F[Absent digests] --> B
G[Single-character near-miss digest] --> B
D --> H[Closed allowlist control passes]
E --> I[Unknown vocabulary remains unverified]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Up to standards ✅🟢 Issues
|
tinyllamas-stories-260k-f32.gguf(512 tokens) is the fourth and last SentencePiece vocabulary in the corpus. It has no oracle: no corpus file shares or extends its vocabulary, so its warrant is the same shape as Baichuan's and rests on ~334x fewer observations. That is the honest caveat, and it is in the warrant string a user reads.Measured
Taken at
69b42d8(branched frommainatc15ec32, which carries #81), from the SPM suite:16 passed; 0 failed; 718 filtered out; finished in 13.88s.SMALL IS NOT WEAK, and the distinction is measured rather than argued
At 8.5% ties this file has the highest informative fraction of the four allowlisted vocabularies:
So its limitation is population size alone, not population quality. Those are separately actionable — size is fixed by more data, quality by a better measurement — and conflating them would discount the wrong thing.
The "small but clean" argument is itself guarded: the test asserts the tie fraction stays under 20%. If this file ever loses that property the warrant becomes false and has to be rewritten rather than kept.
The negative case is in the claim
On 164 pairs it is the whole point: a broken comparator returns 0 here too. The forcing arm is the only thing that tells those apart, so it is asserted rather than mentioned —
forced (id 259): genuine 1, and the assertion isforced_genuine > v.genuine, not a bare nonzero. The warrant string carries PROOF AGAINST GROSS FAILURE, NOT PROOF OF CORRECTNESS.Corpus sweep
DELETED:
a_vocabulary_with_no_oracle_is_still_refusedIt walked corpus files that were not allowlisted and checked each was refused with its digest named. Every SentencePiece vocabulary in the corpus is now allowlisted, so it had no subjects left — and a
forover an empty list reaches no assertion and reports success. A guard that outlives its subject is a green light with nothing behind it. Its own comment said to delete it rather than rewrite it over an empty set.llama-model checkpoint with no merges whose digest is absent from the allowlist, and the corpus no longer contains one.Replaced with
the_derivation_allowlist_is_closed_and_its_lookup_discriminates, which needs no corpus and so runs in the ordinary suite. It asserts all four known digests are allowlisted — the control, without which the negative case would pass against a function that returnsNonefor everything — and that four absent digests are not, including one differing from a real entry by a single character.Verification status
Nine local gate steps completed (fmt, lockfile, doc, test, featgate, clippy, spm, sweep, e2e), exit 0; lib suite⚠️ That chain is my own instrument and its scope is this machine — it is not the forge's verdict. CI and Codacy decide whether this PR is green, and I am not calling it green from a local run.
712 passed; 0 failed.🤖 Generated with Claude Code
https://claude.ai/code/session_01JtTf3315ahKPPyBiYugnPh
Summary by Sourcery
Allow the GGUF SentencePiece pipeline to recognize and validate the small, clean v1 toy vocabulary while replacing an obsolete corpus refusal guard with discriminating allowlist coverage.
New Features:
Bug Fixes:
Enhancements:
Tests: