Skip to content

Commit

Permalink
[Bugfix] Fix Token IDs Reference for MiniCPM-V When Images are Provid…
Browse files Browse the repository at this point in the history
…ed With No Placeholders (vllm-project#8991)

Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alvant <alvasian@yandex.ru>
  • Loading branch information
alex-jw-brooks authored and Alvant committed Oct 26, 2024
1 parent 15b0d78 commit 0149877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vllm/model_executor/models/minicpmv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "(<image>./</image>)"
Expand Down

0 comments on commit 0149877

Please sign in to comment.