Skip to content

Validate GPT2 add-SEP GGUF tokenizers - #648

Merged
justinchuby merged 1 commit into
mainfrom
justinchuby-verify-jina-tokenizers
Aug 26, 2026
Merged

justinchuby merged 1 commit into
mainfrom
justinchuby-verify-jina-tokenizers

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

  • add exact artifact-scoped tokenizer evidence for jina-v2-code and roberta-bpe
  • validate pinned RobertaProcessing BOS/EOS/SEP semantics and preserve special-token vectors that explicitly end in SEP
  • keep jina-v1-en deferred with an immutable candidate disposition: GGUF token ID 5 is empty while the official tokenizer uses U+0000
  • regenerate the GGUF support documentation with exact artifact, source, hash, vector, and blocker details

Evidence

  • jina-v2-code: ggml-org/jina-embeddings-v2-base-code-Q8_0-GGUF@05e79e9a6c8b99491e92ebb28d753268f8601e3c
  • roberta-bpe: mradermacher/quora-roberta-base-GGUF@7a6d5816bb01c2d917978fb36825d9fec3ce4ff4
  • jina-v1-en blocker: gpustack/jina-reranker-v1-tiny-en-GGUF@34fdafe5a08b64246bcbfdbf0b8a23f818baf8e3 vs jinaai/jina-reranker-v1-tiny-en@aca45de6945b5dc6399abcd2a9c55ded5dc9111f

Validation

  • lintrunner f --output oneline --all-files
  • focused tokenizer evidence tests: 67 passed
  • broad serial suite: 8,338 passed, 57 skipped, 12 deselected

Add exact artifact-scoped tokenizer evidence for jina-v2-code and roberta-bpe, including special-token vectors that exercise SEP insertion. Record the immutable jina-v1-en candidate's ordered-token mismatch instead of leaving a generic blocker, and teach pinned-source validation to prove Roberta post-processing semantics.

Co-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 06:14
@github-actions

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 136cad8 → 929dac4

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 136cad8 → 929dac4

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 tightens GGUF tokenizer validation and evidence for the GPT2_ADD_SEP route by pinning artifact-scoped tokenizer proofs for jina-v2-code and roberta-bpe, and by requiring/validating special-token insertion semantics (notably RoBERTa-style BOS/SEP handling) via explicit representative “add_special_tokens=True” encodings.

Changes:

  • Add new pinned GGUF tokenizer evidence records for jina-v2-code and roberta-bpe, including representative special-token encodings.
  • Extend tokenizer materialization/validation to verify representative encodings both with and without special tokens, and accept proven RoBERTa post-processor insertion semantics when config flags are absent.
  • Add a concrete deferred-candidate disposition entry for jina-v1-en, and regenerate GGUF support docs accordingly.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/data/gguf_tokenizer_alias_batch2.json Updates alias → evidence mapping to use the new artifact-scoped tokenizer evidence IDs for jina-v2-code and roberta-bpe.
src/mobius/integrations/gguf/_tokenizer.py Adds representative special-encoding verification and RoBERTa post-processor proof logic for special-token insertion semantics.
src/mobius/integrations/gguf/_tokenizer_test.py Adds regression tests for special-encoding mismatch cleanup and RoBERTa post-processor acceptance/rejection cases.
src/mobius/integrations/gguf/_tokenizer_evidence.py Introduces new evidence records for jina-v2-code and roberta-bpe, including representative special-token vectors.
src/mobius/integrations/gguf/_tokenizer_evidence_test.py Expands evidence/census assertions to cover new records and GPT2_ADD_SEP special-token witnesses.
src/mobius/integrations/gguf/_tokenizer_census.py Adds a pinned deferred-candidate disposition record for jina-v1-en and a new blocker category to represent the mismatch.
src/mobius/integrations/gguf/_docs.py Extends generated docs output to include candidate disposition details and special-token encodings in the evidence table.
docs/api/build_from_gguf.md Regenerates the GGUF support documentation tables to reflect the new evidence and dispositions.

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

@justinchuby
justinchuby merged commit c49d422 into main Aug 26, 2026
17 of 26 checks passed
@justinchuby
justinchuby deleted the justinchuby-verify-jina-tokenizers branch August 26, 2026 06:20
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