Repository navigation
Audit all GGUF tokenizer routes - #645
Merged
Merged
Conversation
Generate an exact machine-readable disposition for all 87 pinned tokenizer pre identifiers and aliases. Promote artifact-scoped Qwen2, Qwen3.5, LFM2, and SmolLM tokenizer materialization with ordered vocabulary, merges, token types, source assets, special IDs, representative encodings, and final tokenizer hashes. Keep graph and runtime support independent and document every remaining compiled-semantics blocker. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the GGUF integration’s tokenizer auditing surface by (1) expanding “tokenizer evidence” to bind more GGUF tokenizer semantics (including tokenizer.ggml.pre, token types, and optional scores), and (2) adding a public, registry-derived census that assigns every pinned tokenizer.ggml.pre identifier/alias an explicit disposition. It also updates the generated GGUF docs to reflect the new evidence/census reporting and expands tests accordingly.
Changes:
- Extend
GGUFTokenizerEvidencewithpre_identifier, token-type digests, and optional score semantics; additer_tokenizer_evidence()and strengthen evidence matching. - Add
tokenizer_route_census()+GGUFTokenizerRouteAuditas a machine-readable census for all pinned tokenizer pre identifiers and aliases. - Update GGUF docs generation + snapshot docs, and expand tests to validate the first evidence batch and census completeness.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mobius/models/talkie_test.py | Formatting-only adjustments in existing Talkie tests. |
| src/mobius/integrations/gguf/_tokenizer_evidence.py | Expand tokenizer evidence schema and matching; add iter_tokenizer_evidence(). |
| src/mobius/integrations/gguf/_tokenizer_evidence_test.py | Add tests for evidence batching, scores-vs-merges schema rules, and census completeness. |
| src/mobius/integrations/gguf/_tokenizer_census.py | New registry-derived census API for all tokenizer pre identifiers/aliases. |
| src/mobius/integrations/gguf/_docs.py | Update docs summary/matrix and render multiple tokenizer evidence rows. |
| src/mobius/integrations/gguf/_docs_test.py | Update docs expectations for the expanded tokenizer evidence and dispositions. |
| src/mobius/integrations/gguf/init.py | Export the new census types/functions from the public GGUF integration API. |
| docs/api/build_from_gguf.md | Regenerated API docs reflecting the updated tokenizer evidence and census matrix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
491
to
+494
| and evidence.merge_count == merge_count | ||
| and evidence.ordered_merges_sha256 == merges_sha256 | ||
| and evidence.ordered_merges_sha256 == (merges_sha256 or None) | ||
| and evidence.score_count == score_count | ||
| and evidence.ordered_scores_sha256 == (scores_sha256 or None) |
Comment on lines
+328
to
+336
| proof = ( | ||
| f"metadata `{evidence.tokenizer_metadata_sha256}`<br>" | ||
| f"tokens {evidence.token_count:,} `{evidence.ordered_vocabulary_sha256}`<br>" | ||
| f"merges {evidence.merge_count:,} `{evidence.ordered_merges_sha256}`<br>" | ||
| f"types `{evidence.ordered_token_types_sha256}`; scores={evidence.score_count}<br>" | ||
| f"source IDs `0..{evidence.source_token_count - 1}`; {padding}; " | ||
| f"rows={evidence.embedding_vocabulary_size:,}<br>" | ||
| f"materialized `{evidence.materialized_tokenizer_sha256}`<br>{encodings}" | ||
| ) |
justinchuby
added a commit
that referenced
this pull request
Aug 26, 2026
## Summary - pin the exact `llama-vocab.cpp` source identity, dispatch line, pre-type, and flag overrides for all 38 batch-2 tokenizer identifiers - add an exact GPT-2 GGUF-to-official-source tokenizer witness and share evidence only across identifiers with mechanically checked identical pinned dispatch behavior - promote 22 requested routes and keep 16 fail-closed with the concrete `pinned-artifact-source-parity-pending` blocker - add a deterministic 38-identifier fixture, network-free evidence tests, and generated API documentation ## Proven identifiers (22) `a.x-4.0`, `deepseek-r1-qwen`, `exaone4`, `f2llmv2`, `falcon-h1`, `falcon3`, `gigachat`, `gpt-2`, `jina-de`, `jina-es`, `jina-v2-de`, `jina-v2-es`, `jina-v5-nano`, `kormo`, `llama-bpe`, `llama-v3`, `llama3`, `mellum`, `midm-2.0`, `modern-bert`, `phi-2`, `pixtral` ## Artifact-blocked identifiers (16) `bailingmoe`, `bailingmoe2`, `chatglm-bpe`, `cohere2moe`, `gemma4`, `glm4`, `gpt-4o`, `granite-embed-multi-311m`, `jina-v1-en`, `jina-v2-code`, `kanana2`, `llada-moe`, `llama4`, `roberta-bpe`, `talkie`, `tiny_aya` Their pinned dispatch semantics are proven, but no exact qualifying GGUF-to-official-source tokenizer parity record was established in this batch. The next coherent sub-batch is `jina-v1-en` / `jina-v2-code` / `roberta-bpe`, using a pinned Jina/RoBERTa GGUF witness and official tokenizer assets. ## Validation - `lintrunner f --output oneline --all-files` - focused tokenizer/docs tests: 74 passed - broad serial non-integration suite: 8,334 passed, 57 skipped, 12 deselected - direct GPT-5.6 Sol medium review; fixed deferred-route docs to expose exact pinned dispatch lines This PR is based directly on `main` at PR #645 merge `cafb2f2460eb47b984cf4731314246792059f625`. Tokenizer evidence is intentionally independent of graph/runtime support. Signed-off-by: Justin Chu <[email protected]>
justinchuby
added a commit
that referenced
this pull request
Aug 27, 2026
## Summary - classify every unresolved authoritative GGUF architecture, projector, tokenizer, MTP, and speculative-draft route exactly once - generate concrete implementation, evidence, ABI/dependency, artifact, and rejection batches from live registries - preserve exact registry reasons in machine-readable census records and reconcile PRs #645, #651, #652, and #656 without claiming open work as supported - distinguish ordinary runtime evidence from ORT GenAI heterogeneous-state schema issue #605 - pin availability-only F16/Q8_0 sidecar identities for LFM2-VL and Pixtral without implying tensor closure, graph parity, or runtime support ## Census - 285 unresolved routes: 144 architectures, 60 projectors, 57 tokenizers, 22 MTP routes, and 2 draft routes - 67 immediately implementable - 95 evidence-only - 100 dependency/runtime-ABI blocked - 4 artifact unavailable - 19 intentionally rejected ## Validation - generated documentation check - 1,371 focused GGUF tests passed, 1 skipped - broad deterministic suite: 8,467 passed, 62 skipped, 1 subtest passed - Ruff/format lint passed - strict mypy passed for changed source modules - independent incremental review found no significant issues ## Waivers - no large model payloads downloaded; availability pins use immutable repository revisions plus API-reported LFS SHA-256 and byte size - open PRs #651/#652/#656 are dependency records only and are not promoted as current-main capability - no unsupported cache/state ABI is forced; packed quantized support remains governed by existing fail-closed capability records Do not merge yet. --------- Signed-off-by: Justin Chu <[email protected]> Copilot-Session: d1a98adf-88cb-471b-8c46-7a84083db24c
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.
Summary
tokenizer.ggml.preidentifiers and aliases across 56 semantic groupsValidation
Serialized remaining batches
a.x-4.0,bailingmoe,bailingmoe2,chatglm-bpe,cohere2moe,deepseek-r1-qwen,exaone4,f2llmv2,falcon-h1,falcon3,gemma4,gigachat,glm4,gpt-2,gpt-4o,granite-embed-multi-311m,jina-de,jina-es,jina-v1-en,jina-v2-code,jina-v2-de,jina-v2-es,jina-v5-nano,kanana2,kormo,llada-moe,llama-bpe,llama-v3,llama3,llama4,mellum,midm-2.0,modern-bert,phi-2,pixtral,roberta-bpe,talkie,tiny_aya.afmoe,bloom,chameleon,codeshell,command-r,dbrx,deepseek-coder,deepseek-llm,deepseek-v3,default,exaone,exaone-moe,falcon,gpt3-finnish,granite-docling,granite-embed-multi-97m,grok-2,hunyuan,hunyuan-dense,jais,jais-2,joyai-llm,kimi-k2.laguna,megrez,mellum2,minerva-7b,minicpm5,minimax-m2,mpt,olmo,poro-chat,refact,sarvam-moe,seed-coder,smaug-bpe,solar-open,stablelm2,starcoder,superbpe,tekken,trillion,viking,whitespace,youtu.