@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 607029e515
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 14:45 UTC

[Bugfix] Revert max_prompt_len validation for decoder-only models. (#16741)

Signed-off-by: David Heineman <david@davidheineman.com>

David Heineman committed Apr 16, 2025 at 21:33 UTC 607029e51513933fff7edabe4691c96a82cfd289
2 files changed +2 -2
vllm/engine/llm_engine.py
+1 -1
@@ -2062,7 +2062,7 @@ class LLMEngine:
2062 raise ValueError(f"The {prompt_type} prompt cannot be empty")
2063
2064 max_prompt_len = self.model_config.max_model_len
2065 - if len(prompt_ids) >= max_prompt_len:
2065 + if len(prompt_ids) > max_prompt_len:
2066 if prompt_type == "encoder" and model_config.is_multimodal_model:
2067 mm_registry = self.input_preprocessor.mm_registry
2068 mm_processor = mm_registry.create_processor(
vllm/v1/engine/processor.py
+1 -1
@@ -354,7 +354,7 @@ class Processor:
354 raise ValueError(f"Token id {max_input_id} is out of vocabulary")
355
356 max_prompt_len = self.model_config.max_model_len
357 - if len(prompt_ids) >= max_prompt_len:
357 + if len(prompt_ids) > max_prompt_len:
358 if prompt_type == "encoder" and model_config.is_multimodal_model:
359 mm_registry = self.input_preprocessor.mm_registry
360 mm_processor = mm_registry.create_processor(