Skip to content

Commit 0d4f48f

Browse files
[Bugfix] Incorrect MM data format in vllm bench throughput (#26395)
Signed-off-by: DarkLight1337 <[email protected]>
1 parent 127c8b7 commit 0d4f48f

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
@@ -201,16 +201,16 @@ async def run_vllm_async(
201201
sampling_params: list[SamplingParams] = []
202202
lora_requests: list[Optional[LoRARequest]] = []
203203
for request in requests:
204-
prompts.append(
205-
TokensPrompt(
206-
prompt_token_ids=request.prompt["prompt_token_ids"],
207-
multi_modal_data=request.multi_modal_data,
208-
)
204+
prompt = (
205+
TokensPrompt(prompt_token_ids=request.prompt["prompt_token_ids"])
209206
if "prompt_token_ids" in request.prompt
210-
else TextPrompt(
211-
prompt=request.prompt, multi_modal_data=request.multi_modal_data
212-
)
207+
else TextPrompt(prompt=request.prompt)
213208
)
209+
210+
if request.multi_modal_data:
211+
assert isinstance(request.multi_modal_data, dict)
212+
prompt["multi_modal_data"] = request.multi_modal_data
213+
214214
sampling_params.append(
215215
SamplingParams(
216216
n=n,

0 commit comments

Comments
 (0)