Fix tokenizer.json pre-tokenizer regex to match the base Qwen3.5 tokenizer
Fix the pre-tokenizer regex in tokenizer.json
tokenizer.json currently splits with the Qwen2 regex (\p{L}+), while tokenizer_config.json (pretokenize_regex) and the base Qwen3.5-family tokenizer use [\p{L}\p{M}]+. The file was written by save_pretrained under transformers 5.17, where Qwen2Tokenizer rebuilds the pre-tokenizer from its Qwen2 default and ignores pretokenize_regex (huggingface/transformers#49066; Qwen3.5 checkpoints load correctly from transformers 5.18).
With the Qwen2 regex, combining marks (vowel signs, viramas, tone marks) are split off their letters, so text in Indic scripts, Thai, Burmese, Khmer and Lao tokenizes differently from the base model (e.g. "हिन्दी भाषा": 9 tokens instead of 6).
Who is affected: code that loads tokenizer.json directly (tokenizers, many serving stacks) or transformers < 5.18. transformers >= 5.18 already rebuilds the tokenizer with the base regex, so this PR changes nothing for it.
Change: only the Split pattern of the pre-tokenizer (one line). Vocabulary, merges, added/special tokens, normalizer and decoder are unchanged. Latin, CJK, Cyrillic, Greek, Hebrew, Vietnamese and Arabic without diacritics tokenize identically before and after.
Effect (this model, scored under both splits with everything else identical): on rows of SIB-200 / MASSIVE / XNLI (28 languages) whose tokenization differs, accuracy 80.0 -> 84.9 (+4.9); gains on Devanagari, Bengali, Tamil, Telugu, Malayalam, Kannada, Thai, Burmese and Khmer; full-set scores on our multilingual and Decision Index evaluations are unchanged.
🤖 Generated with Claude Code