test(embed): end-to-end tokenizer parity through embedding service (P0-E1)#111
Closed
ohdearquant wants to merge 1 commit into
Closed
test(embed): end-to-end tokenizer parity through embedding service (P0-E1)#111ohdearquant wants to merge 1 commit into
ohdearquant wants to merge 1 commit into
Conversation
…0-E1) Confirms the tokenizer fixes from impl-tokenizer-fixes (SentencePiece BOS/EOS, Qwen BPE EOS, AddedToken longest-match) flow through the load_tokenizer path that NativeEmbeddingService uses. Three tests cover BGE/WordPiece, E5/SentencePiece, and Qwen/BPE at the token-ID level so no model weights are needed; tests skip when the HF snapshot is absent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 25, 2026
Owner
Author
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.
Layer
L2 — test addition (PR7 of 11)
What
Adds
crates/embed/tests/tokenizer_parity_e2e.rswith 3 tests (BGE/WordPiece, E5/SentencePiece, Qwen/BPE). Each test callsload_tokenizer()directly — the same code pathNativeEmbeddingServiceuses — with the same model configs, asserting token IDs match HF reference values.Why
Confirms the tokenizer fixes from PR2-PR6 flow through the embed service without model weights being required. Tests skip with explicit message when tokenizer JSON is absent; no stubs.
Result
Stack
Base: #110 (PR6 SP trailing-ws)
Umbrella: #104
🤖 Generated with Claude Code