Skip to content

Commit bad5e0a

Browse files
huydhnxuebwang-amd
authored andcommitted
[Bugfix] Incorrect another MM data format in vllm bench throughput (vllm-project#26462)
Signed-off-by: Huy Do <huydhn@gmail.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
1 parent 4dedd3b commit bad5e0a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

vllm/benchmarks/throughput.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ def run_vllm(
5959
prompts: list[Union[TextPrompt, TokensPrompt]] = []
6060
sampling_params: list[SamplingParams] = []
6161
for request in requests:
62-
prompts.append(
63-
TokensPrompt(
64-
prompt_token_ids=request.prompt["prompt_token_ids"],
65-
multi_modal_data=request.multi_modal_data,
66-
)
62+
prompt = (
63+
TokensPrompt(prompt_token_ids=request.prompt["prompt_token_ids"])
6764
if "prompt_token_ids" in request.prompt
68-
else TextPrompt(
69-
prompt=request.prompt, multi_modal_data=request.multi_modal_data
70-
)
65+
else TextPrompt(prompt=request.prompt)
7166
)
67+
if request.multi_modal_data:
68+
assert isinstance(request.multi_modal_data, dict)
69+
prompt["multi_modal_data"] = request.multi_modal_data
70+
prompts.append(prompt)
71+
7272
sampling_params.append(
7373
SamplingParams(
7474
n=n,

0 commit comments

Comments
 (0)