From 690dcbc40ed9cd24c832b267adf271824e090258 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 Signed-off-by: Sumit Dubey --- 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 aaae4397c01d2..0e0e86f2fe503 100644 --- a/vllm/model_executor/models/minicpmv.py +++ b/vllm/model_executor/models/minicpmv.py @@ -274,8 +274,8 @@ def get_placeholder(image_size: Tuple[int, int], num_image: int): 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 = "(./)"