vllm.tokenizers
¶
Modules:
-
alpamayo2_super–Tokenizer for Alpamayo 2 Super.
-
deepseek_v32– -
deepseek_v4– -
deepseek_v41– -
deepseek_v41_encoding–Text encoding adapted from the DeepSeek V4.1 reference encoder.
-
deepseek_v4_encoding–DeepSeek-V4 Encoding
-
detokenizer_utils– -
fastokens–fastokensbackend patch. -
hf– -
kimi_audio–Tokenizer for Kimi-Audio using TikToken.
-
mistral– -
registry–
Functions:
-
get_tokenizer–Gets a tokenizer for the given model name via HuggingFace or ModelScope.
-
maybe_make_thread_pool–If
tokenizeris aTokenizersBackend, modify the tokenizer
get_tokenizer(tokenizer_name, *args, tokenizer_cls=TokenizerLike, trust_remote_code=False, revision=None, download_dir=None, **kwargs)
¶
Gets a tokenizer for the given model name via HuggingFace or ModelScope.
maybe_make_thread_pool(tokenizer, copies=1)
¶
If tokenizer is a TokenizersBackend, modify the tokenizer
in-place to make the public interface thread-safe by routing calls
through a deep-copied tokenizer pool.
Note that:
- Only TokenizerLike's public interface is thread-safe.
This doesn't include _tokenizer property nor any mutation
methods like add_special_tokens or add_tokens.
- Adjacent method calls could happen on different deep copies.