Skip to content

vllm.transformers_utils.chat_templates

Modules:

Functions:

get_chat_template_override_path(model_type, tokenizer_name_or_path)

Return the predefined template that replaces the tokenizer's own.

Only for model types whose Hub tokenizers ship a wrong chat template. Also for "shieldgemma2": its Hub template is right for Transformers, which adds when tokenizing, but vLLM's chat path does not. Remove "siglip" from _MODEL_TYPES_OVERRIDING_TOKENIZER_CHAT_TEMPLATE once the SigLIP2 checkpoints drop the Gemma template upstream: https://huggingface.co/google/siglip2-base-patch16-224/discussions/23