Unverified Commit 607029e5 authored by David Heineman's avatar David Heineman Committed by GitHub
Browse files

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


Signed-off-by: default avatarDavid Heineman <david@davidheineman.com>
parent cb072ce9
......@@ -2062,7 +2062,7 @@ class LLMEngine:
raise ValueError(f"The {prompt_type} prompt cannot be empty")
max_prompt_len = self.model_config.max_model_len
if len(prompt_ids) >= max_prompt_len:
if len(prompt_ids) > max_prompt_len:
if prompt_type == "encoder" and model_config.is_multimodal_model:
mm_registry = self.input_preprocessor.mm_registry
mm_processor = mm_registry.create_processor(
......
......@@ -354,7 +354,7 @@ class Processor:
raise ValueError(f"Token id {max_input_id} is out of vocabulary")
max_prompt_len = self.model_config.max_model_len
if len(prompt_ids) >= max_prompt_len:
if len(prompt_ids) > max_prompt_len:
if prompt_type == "encoder" and model_config.is_multimodal_model:
mm_registry = self.input_preprocessor.mm_registry
mm_processor = mm_registry.create_processor(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment