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 <[email protected]>
  • Loading branch information
alex-jw-brooks authored Oct 1, 2024
1 parent bc4eb65 commit 1fe0a42
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 1fe0a42

Please sign in to comment.