Downloads · 30 days
25
2% of all-time downloads
ardge-hf/whisper-large-v3-turbo-tokenizer-prevfix
whisper-large-v3-turbo-tokenizer-prevfix is a automatic speech recognition model from ardge-hf. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
A drop-in tokenizer-only workaround for vllm-project/vllm53206: passing the OpenAI-compatible prompt field to vLLM's /v1/audio/transcriptions on a Whisper model corrupts decoding — degraded output on short audio, and…
Downloads · 30 days
25
2% of all-time downloads
All-time downloads
1.3K
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json3.2 MB · 86%
From the Hugging Face model README
<|startofprev|> renamed to <|prev|>A drop-in tokenizer-only workaround for
vllm-project/vllm#53206:
passing the OpenAI-compatible prompt field to vLLM's
/v1/audio/transcriptions on a Whisper model corrupts decoding — degraded
output on short audio, and on audio longer than 30 s the response silently
collapses to only the final chunk's text.
No model weights here. These are the official
openai/whisper-large-v3-turbo
tokenizer files with exactly one change: the string form of token id 50362
is renamed from <|startofprev|> to <|prev|> (applied consistently in
tokenizer.json, tokenizer_config.json, added_tokens.json and
special_tokens_map.json). Vocabulary size and every id are unchanged.
The repo also carries the unmodified official config.json: vLLM
resolves a remote --tokenizer repo through AutoConfig and refuses to
start when the repo lacks a config.json with a model_type key (local
directory mounts skip that check). No weights are read from this repo.
vLLM builds the Whisper decoder prompt as:
decoder_text = (
f"<|prev|>{request_prompt}" if request_prompt else ""
) + f"<|startoftranscript|><|{language}|><|{task_type}|><|notimestamps|>"
<|prev|> is not in the Whisper vocabulary, so the stock tokenizer splits
it into six ordinary text tokens (<, |, pre, v, |, >) placed in
front of <|startoftranscript|>, which corrupts decoder conditioning. The
real prompt-conditioning token is <|startofprev|> (id 50362).
With this tokenizer mounted, the same <|prev|> string tokenizes straight to
id 50362 — the genuine sot_prev embedding — so the prompt field behaves
as intended again, with zero code changes to vLLM. Requests without a
prompt are byte-for-byte unaffected.
vllm serve openai/whisper-large-v3-turbo \
--tokenizer ardge-hf/whisper-large-v3-turbo-tokenizer-prevfix
Then the standard OpenAI prompt field works:
curl http://localhost:8000/v1/audio/transcriptions \
-F [email protected] \
-F response_format=verbose_json \
--form-string 'prompt=這是繁體中文的語音轉錄。'
Measured on vllm/vllm-openai:nightly (v0.26.1rc1, 2026-08): without the fix
the request above returns a single hallucinated segment; with it, the full
transcript comes back and the prompt bias takes effect (e.g. Mandarin output
switches from Simplified to Traditional script with punctuation).
from transformers import AutoTokenizer
t = AutoTokenizer.from_pretrained("ardge-hf/whisper-large-v3-turbo-tokenizer-prevfix")
assert t.encode("<|prev|>", add_special_tokens=False) == [50362]
assert len(t) == 51866 # no phantom tokens added
The proper fix — vLLM emitting <|startofprev|> in the first place — is
vllm-project/vllm#53207.
Once your vLLM build contains it, drop the --tokenizer flag and go back to
the stock tokenizer.
sot_prev is id 50362. The v2 family (large-v2, small, …) uses
id 50361 — regenerate per checkpoint rather than reusing this one.<|prev|>
text tokens are prepended server-side before any client-controlled content,
and even embedding a literal <|startofprev|> inside the prompt value
still collapses (measured). The tokenizer has to be swapped server-side.<|prev|>; with skip_special_tokens=True
(the transcription default) this is never visible.Tokenizer files come from
openai/whisper-large-v3-turbo
(Apache-2.0), modified as described above. The rename was verified against
the official added_tokens_decoder tables of
whisper-large-v3-turbo
and
whisper-large-v3,
and the reference specials list in
openai/whisper tokenizer.py.