File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -473,9 +473,14 @@ def _validate_model_input(
473473
474474 # NOTE: tokenizer.max_token_id is the tokenizer’s vocab size while
475475 # self.model_config.get_vocab_size() is the model’s vocab size.
476- # For some models, certain tokens exist in one but not the other,
477- # so we take the max of the two to decide if a token id is truly
478- # out-of-vocabulary.
476+ # For Qwen3 models, the language model has extra tokens that do
477+ # not exist in the tokenizer, and vice versa for multimodal
478+ # placeholder tokens in some multimodal models.
479+ # See https://github.com/QwenLM/Qwen3/issues/29#issuecomment-1933720399 # noqa: E501
480+ # and https://github.com/vllm-project/vllm/pull/22471#discussion_r2312251421 # noqa: E501
481+
482+ # Here we take the max of the two to determine if a token id is
483+ # truly out-of-vocabulary.
479484 if max_input_id > max (tokenizer .max_token_id ,
480485 self .model_config .get_vocab_size () - 1 ):
481486 raise ValueError (
You can’t perform that action at this time.
0 commit comments