Skip to content

Validate second GGUF tokenizer alias cohort - #646

Merged
justinchuby merged 1 commit into
mainfrom
justinchuby-verify-tokenizer-aliases
Aug 26, 2026
Merged

justinchuby merged 1 commit into
mainfrom
justinchuby-verify-tokenizer-aliases

Conversation

@justinchuby

Copy link
Copy Markdown
Member

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.

Pin llama.cpp dispatch evidence for all 38 requested identifiers and promote the 22 routes backed by exact artifact-to-source tokenizer parity. Keep the remaining 16 routes fail-closed with an artifact-specific blocker, add the GPT-2 witness, and generate network-free census documentation and tests.\n\nCo-authored-by: Copilot App <[email protected]>

Signed-off-by: Justin Chu <[email protected]>
@justinchuby
justinchuby requested review from a team and a lite review from Copilot August 26, 2026 05:56
@justinchuby
justinchuby merged commit 136cad8 into main Aug 26, 2026
15 of 24 checks passed
@justinchuby
justinchuby deleted the justinchuby-verify-tokenizer-aliases branch August 26, 2026 05:56
@github-actions

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing cafb2f2 → e38d502

Model Sub-model Changes Status

No architecture changes detected. ✅


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

@github-actions

Copy link
Copy Markdown

Performance Comparison

Comparing cafb2f2 → e38d502

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0% ⚪
bert (feature-extraction) num_nodes 68 68 +0.0% ⚪
falcon model_size_bytes 364 KB 364 KB +0.0% ⚪
falcon num_nodes 66 66 +0.0% ⚪
gemma2 model_size_bytes 428 KB 428 KB +0.0% ⚪
gemma2 num_nodes 105 105 +0.0% ⚪
gpt2 model_size_bytes 324 KB 324 KB +0.0% ⚪
gpt2 num_nodes 54 54 +0.0% ⚪
llama model_size_bytes 425 KB 425 KB +0.0% ⚪
llama num_nodes 60 60 +0.0% ⚪
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
llama (static-cache) num_nodes 56 56 +0.0% ⚪
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0% ⚪
mamba (ssm-text-generation) num_nodes 94 94 +0.0% ⚪
phi3 model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 num_nodes 58 58 +0.0% ⚪
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 (static-cache) num_nodes 54 54 +0.0% ⚪
qwen2 model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 num_nodes 60 60 +0.0% ⚪
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 (static-cache) num_nodes 56 56 +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) num_nodes 265 265 +0.0% ⚪
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0% ⚪
qwen3_5_text (hybrid-text-generation) num_nodes 127 127 +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) num_nodes 450 450 +0.0% ⚪
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0% ⚪
t5 (seq2seq) num_nodes 176 176 +0.0% ⚪
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0% ⚪
whisper (speech-to-text) num_nodes 128 128 +0.0% ⚪

No performance regressions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the GGUF tokenizer evidence system to validate and document a second “alias cohort” by pinning llama.cpp dispatch semantics for 38 identifiers, promoting a subset with artifact-to-official-source parity evidence, and fail-closing the remainder with a concrete blocker category. It also updates the generated tokenizer matrices/docs and adds deterministic, network-free fixtures/tests to keep the evidence and documentation drift-checked.

Changes:

  • Add batch-2 alias dispatch proofs (pinned llama-vocab.cpp line + effective flag overrides) and wire them into the tokenizer census and docs rendering.
  • Introduce a GPT-2 GGUF tokenizer evidence witness and allow sharing evidence across aliases only when pinned dispatch behavior is proven identical.
  • Add a deterministic 38-identifier JSON fixture and tests that verify fixture ↔ census ↔ dispatch-proof consistency; update generated API docs accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/data/gguf_tokenizer_alias_batch2.json Adds deterministic fixture enumerating the 38 batch-2 identifiers and their derived census/evidence fields.
src/mobius/integrations/gguf/_tokenizer.py Relaxes special-token config requirements when the special token is proven via added_tokens content in tokenizer.json.
src/mobius/integrations/gguf/_tokenizer_test.py Adds regression test for the “legacy config omission” special added-token proof path.
src/mobius/integrations/gguf/_tokenizer_evidence.py Adds validated_identifiers to evidence records and introduces GPT-2 evidence; enforces alias-sharing constraints via registry + pinned dispatch proofs.
src/mobius/integrations/gguf/_tokenizer_evidence_test.py Updates expected evidence inventory/status counts and adds tests that fixture/census/proofs stay consistent.
src/mobius/integrations/gguf/_tokenizer_census.py Extends route audit statuses/blockers and incorporates “dispatch proven but artifact parity pending” state.
src/mobius/integrations/gguf/_tokenizer_alias_evidence.py New module: batch-2 pinned llama.cpp dispatch evidence and effective per-group non-default flag overrides.
src/mobius/integrations/gguf/_docs.py Annotates tokenizer matrix rows with pinned dispatch line references when available.
docs/api/build_from_gguf.md Regenerates API docs to reflect new evidence rows, new disposition counts, and dispatch-line annotations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +113 to +115
if set(records) != set(_DISPATCH_LINES):
raise RuntimeError("Tokenizer alias evidence contains duplicate identifiers")
return records
Comment on lines +113 to +114
path = Path(__file__).parents[4] / "tests/data/gguf_tokenizer_alias_batch2.json"
expected = json.loads(path.read_text(encoding="utf-8"))
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.

2 participants