From 844a8f42c74bcd917e9f1456d406ba4f1deebda3 Mon Sep 17 00:00:00 2001 From: Wenxuan Tan Date: Wed, 28 May 2025 18:38:55 -0500 Subject: [PATCH] Fix LoRA bench (#6719) --- benchmark/lora/lora_bench.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/benchmark/lora/lora_bench.py b/benchmark/lora/lora_bench.py index 199b3f3ab..0a1e37a5c 100644 --- a/benchmark/lora/lora_bench.py +++ b/benchmark/lora/lora_bench.py @@ -162,13 +162,13 @@ async def benchmark( raise ValueError(f"Unknown backend: {backend}") print("Starting initial single prompt test run...") - test_prompt, test_prompt_len, test_output_len = input_requests[0] + test_request = input_requests[0] test_input = RequestFuncInput( model=model_id, - prompt=test_prompt, + prompt=test_request.prompt, api_url=api_url, - prompt_len=test_prompt_len, - output_len=test_output_len, + prompt_len=test_request.prompt_len, + output_len=test_request.output_len, lora_name="dummy", # the lora_name argument will not be used image_data=None, extra_request_body=extra_request_body, @@ -187,13 +187,12 @@ async def benchmark( benchmark_start_time = time.perf_counter() tasks: List[asyncio.Task] = [] async for request in get_request(input_requests, request_rate): - prompt, prompt_len, output_len = request request_func_input = RequestFuncInput( model=model_id, - prompt=prompt, + prompt=request.prompt, api_url=api_url, - prompt_len=prompt_len, - output_len=output_len, + prompt_len=request.prompt_len, + output_len=request.output_len, lora_name="dummy", image_data=None, extra_request_body=extra_request_body,