We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6db3cf9 commit b19e3d4Copy full SHA for b19e3d4
vllm/v1/engine/processor.py
@@ -470,6 +470,12 @@ def _validate_model_input(
470
else:
471
tokenizer = self.tokenizer.get_lora_tokenizer(lora_request)
472
max_input_id = max(prompt_ids, default=0)
473
+
474
+ # NOTE: tokenizer.max_token_id is the tokenizer’s vocab size while
475
+ # 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.
479
if max_input_id > max(tokenizer.max_token_id,
480
self.model_config.get_vocab_size() - 1):
481
raise ValueError(
0 commit comments