Voxtral (Tekken tokenizer) falls back to qwen2 pretokenizer — no `tekken` support in transcribe-tokenizer.cpp
Disclaimer: I am no professional programmer, this issue has been found with the help of Claude Code (Opus 4.8). I am creating a framework in which I incorporated release v0.1.2 and found this issue. All analysis is from CC, and I understand the issue and could create a fix, but don't mind if this is done by professionals only:
The tokenizer has no tekken pretokenizer, so Voxtral is tokenized with the
qwen2 pretokenization rules instead of its native Tekken rules. This affects
the entire Voxtral family, not one model or a bad download.
Environment
- transcribe.cpp 0.1.2 (via the
transcribe-cpp-sys0.1.2 crate; ABI hash86b16dd97ad1cb58) - Built from source via CMake, CPU backend, static link
- Windows 11 (x86_64, MSVC)
- Model:
handy-computer/Voxtral-Mini-3B-2507-Q8_0.gguf(official org quant, byte-verified)tokenizer.ggml.pre = "tekken"(correct metadata)
Steps to reproduce
- Load
Voxtral-Mini-3B-2507-Q8_0.gguf. - Offline transcribe any 16 kHz mono PCM buffer (
transcribe_run,Task::Transcribe). - Observe the warning on stderr; transcription proceeds with the qwen2 fallback.
Actual
pre_ == "tekken" is unhandled and routed to pretokenize_qwen2() with a WARN.
In src/transcribe-tokenizer.cpp (~L500–517) the only pretokenizers implemented
are gpt2, granite, and qwen2; every other non-empty flavor falls back to
qwen2. tekken is referenced only under src/arch/voxtral_realtime/, so the
offline Voxtral path never sets a Tekken pretokenizer.
Expected
A tekken pretokenizer applied for Voxtral, matching the model's training-time
tokenization (as done in llama.cpp — see ggml-org/llama.cpp#8579).
Impact
Tokenization fidelity for the whole Voxtral family is reduced. Because Voxtral is an audio-LLM whose text prompt/template is encoded before generation, wrong pretokenization can degrade output quality — not just prompt handling. (Observed alongside minor word-level garbles in German output, e.g. "Publikum" → "Pubikom"; I have not isolated this as strict causation, but it is consistent with the mismatch.)
Suggested fix
- Add a
tekkenpretokenizer (Mistral's tiktoken-style regex + byte mapping), analogous to llama.cpp#8579, and dispatchpre_ == "tekken"to it. - If out of scope short-term, document the fallback as a known Voxtral limitation so it isn't mistaken for a model/quant problem.
Happy to test a patch against this exact model/audio.
Thank you for this great framework!
Thanks, I think this is an obvious thing we need to fix!