Skip to content

fix(tokenizer): configure Rust server special tokens at load time#31048

Closed
jthomson04 wants to merge 1 commit into
sgl-project:rainj-me/rust-serverfrom
jthomson04:jthomson04/sglang-add-special-tokenizer
Closed

fix(tokenizer): configure Rust server special tokens at load time#31048
jthomson04 wants to merge 1 commit into
sgl-project:rainj-me/rust-serverfrom
jthomson04:jthomson04/sglang-add-special-tokenizer

Conversation

@jthomson04

@jthomson04 jthomson04 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • upgrade the Rust server to dynamo-tokenizers 1.5.1
  • construct the encode-pool tokenizer once with add_special_tokens=true, which selects the plain HuggingFace backend without a CachedTokenizer wrapper
  • keep the detokenizer on default tokenizer options and leave CachedTokenizer unchanged
  • add offline SGLang coverage for HF backend selection, repeated scalar parity, batch parity, and exactly-once BOS/EOS around multiple chat-boundary tokens

Test Plan

  • cargo test tokenizer::tests::add_special_tokens_encoder_matches_direct_hf --lib
  • cargo test --lib
  • cargo test --doc
  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings

CI States

Latest PR Test (Base): ❌ Run #29266332621
Latest PR Test (Extra): ❌ Run #29266333260

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Jul 13, 2026
@jthomson04 jthomson04 closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant