Skip to content

Commit 703cccb

Browse files
alex-jw-brooksyangw-dev
authored andcommitted
[Misc] Add warning for multimodal data in LLM.beam_search (vllm-project#16241)
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com> Signed-off-by: Yang Wang <elainewy@meta.com>
1 parent 17dd222 commit 703cccb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vllm/entrypoints/llm.py

+10
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,16 @@ def sort_beams_key(x: BeamSearchSequence) -> float:
536536
tokenizer.eos_token_id,
537537
length_penalty)
538538

539+
# TODO - fix handling of multimodal data for beam search; we pass it
540+
# through in the async version on the abstract EngineClient, but not
541+
# here.
542+
if any("multi_modal_data" in prompt
543+
and prompt["multi_modal_data"] is not None
544+
for prompt in prompts):
545+
logger.warning(
546+
"Multimodal data appears to have been provided, but is not"
547+
" currently being passed through in LLM.beam_search()!")
548+
539549
tokenizer = self.get_tokenizer()
540550
# generate 2 * beam_width candidates at each step
541551
# following the huggingface transformers implementation

0 commit comments

Comments
 (0)