Unverified Commit 1fe0a426 authored by Alex Brooks's avatar Alex Brooks Committed by GitHub
Browse files

[Bugfix] Fix Token IDs Reference for MiniCPM-V When Images are Provided With...


[Bugfix] Fix Token IDs Reference for MiniCPM-V When Images are Provided With No Placeholders (#8991)
Signed-off-by: default avatarAlex-Brooks <Alex.Brooks@ibm.com>
parent bc4eb65b
......@@ -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 = "(<image>./</image>)"
......
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