Skip to content

Replace unmaintained tokenizer benchmark dependencies - #180

Merged
gorzell merged 3 commits into
mainfrom
gorzell/vigilant-garbanzo
Nov 10, 2026
Merged

gorzell merged 3 commits into
mainfrom
gorzell/vigilant-garbanzo

Conversation

@gorzell

@gorzell gorzell commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate the benchmark-only Hugging Face tokenizer dependency to tokenizers 1.0.0-rc.4, removing paste and number_prefix from the lockfile.
  • Adapt the benchmark loader and encoding helpers to the read-only pipeline API.
  • Add an offline unit test for removing the pre-tokenizer while preserving encoding.

Validation

  • cargo check -p bpe-benchmarks
  • cargo test -p bpe-benchmarks --lib
  • cargo test -p bpe-benchmarks --test equivalence --no-run
  • The Hugging Face equivalence tests and benchmarks need model downloads; this environment could not resolve huggingface.co, so please run the benchmarks locally.

@gorzell
gorzell requested a review from a team as a code owner November 10, 2026 10:47
Copilot AI auto review requested due to automatic review settings November 10, 2026 10:47

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.

🟡 Changes recommended

The performance benchmarks still call the removed encode_fast API, preventing the benchmark target and CI’s all-target build from compiling.

2 open issues
What changed in this PR

Updates the benchmark-only Hugging Face tokenizer dependency to remove unmaintained transitive dependencies, without changing the core BPE library.

Changes:

  • Pins tokenizers to 1.0.0-rc.4, removing paste and number_prefix from the lockfile.
  • Adapts tokenizer loading and shared encoding helpers to the read-only pipeline API.
  • Adds an offline regression test for pre-tokenizer removal.
File Description
crates/​bpe/​benchmarks/​performance.rs Migrates an encoding benchmark to the shared helper.
crates/​bpe/​benchmarks/​lib.rs Adds pipeline loading, encoding helpers, and an offline test.
crates/​bpe/​benchmarks/​equivalence.rs Uses the shared helper for equivalence checks.
crates/​bpe/​benchmarks/​Cargo.toml Updates tokenizer dependencies and feature selection.
Cargo.lock Records the updated dependency graph.

Review effort: Balanced (auto)

Comment thread crates/bpe/benchmarks/performance.rs Resolved
Comment thread crates/bpe/benchmarks/lib.rs Resolved
@gorzell
gorzell merged commit 598b4a1 into main Nov 10, 2026
9 checks passed
@gorzell
gorzell deleted the gorzell/vigilant-garbanzo branch November 10, 2026 11:27
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.

4 participants