vllm.config.renderer ¶
TokenizerMode module-attribute ¶
TokenizerMode = Literal[
"auto", "hf", "slow", "mistral", "deepseek_v32"
]
RendererConfig ¶
Configuration for the renderer.
Source code in vllm/config/renderer.py
allowed_local_media_path class-attribute instance-attribute ¶
allowed_local_media_path: str = ''
Allowing API requests to read local images or videos from directories specified by the server file system. This is a security risk. Should only be enabled in trusted environments.
allowed_media_domains class-attribute instance-attribute ¶
If set, only media URLs that belong to this domain can be used for multi-modal inputs.
io_processor_plugin class-attribute instance-attribute ¶
io_processor_plugin: str | None = None
IOProcessor plugin name to load at model startup.
media_io_kwargs class-attribute instance-attribute ¶
Additional args passed to process media inputs, keyed by modalities. For example, to set num_frames for video, set --media-io-kwargs '{"video": {"num_frames": 40} }'
model_config class-attribute instance-attribute ¶
model_config: SkipValidation[ModelConfig] = None
Provides model context to the renderer.
skip_tokenizer_init class-attribute instance-attribute ¶
skip_tokenizer_init: bool = False
Skip initialization of tokenizer and detokenizer. Expects valid prompt_token_ids and None for prompt from the input. The generated output will contain token ids.
tokenizer class-attribute instance-attribute ¶
tokenizer: str = ''
Name or path of the Hugging Face tokenizer to use. If unspecified, model name or path will be used.
tokenizer_mode class-attribute instance-attribute ¶
tokenizer_mode: TokenizerMode | str = 'auto'
Tokenizer mode:
-
"auto" will use the tokenizer from
mistral_commonfor Mistral models if available, otherwise it will use the "hf" tokenizer. -
"hf" will use the fast tokenizer if available.
-
"slow" will always use the slow tokenizer.
-
"mistral" will always use the tokenizer from
mistral_common. -
"deepseek_v32" will always use the tokenizer from
deepseek_v32. -
Other custom values can be supported via plugins.
tokenizer_revision class-attribute instance-attribute ¶
tokenizer_revision: str | None = None
The specific revision to use for the tokenizer on the Hugging Face Hub. It can be a branch name, a tag name, or a commit id. If unspecified, will use the default version.
__post_init__ ¶
Source code in vllm/config/renderer.py
maybe_pull_tokenizer_for_runai ¶
maybe_pull_tokenizer_for_runai(tokenizer: str) -> None
Pull tokenizer from Object Storage to temporary directory when needed.