From 1fe0a4264aa94ceeccc7e8d99ac0d72f0560f541 Mon Sep 17 00:00:00 2001 From: Alex Brooks Date: Tue, 1 Oct 2024 03:52:44 -0600 Subject: [PATCH] [Bugfix] Fix Token IDs Reference for MiniCPM-V When Images are Provided With No Placeholders (#8991) Signed-off-by: Alex-Brooks --- vllm/model_executor/models/minicpmv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/model_executor/models/minicpmv.py b/vllm/model_executor/models/minicpmv.py index aaae4397..0e0e86f2 100644 --- a/vllm/model_executor/models/minicpmv.py +++ b/vllm/model_executor/models/minicpmv.py @@ -274,8 +274,8 @@ def input_processor_for_minicpmv(ctx: InputContext, llm_inputs: LLMInputs): get_slice_image_placeholder(image_size, num_image) prompt = llm_inputs.get("prompt") + token_ids = llm_inputs.get("prompt_token_ids") if prompt is None: - token_ids = llm_inputs.get("prompt_token_ids") prompt = tokenizer.decode(token_ids) pattern = "(./)"