[Bench] Add BFCL dataset for vllm bench serve tool-calling workloads (#42457)
Signed-off-by: Li Zhang <lzhanga@amazon.com> Co-authored-by: Li Zhang <lzhanga@amazon.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
co-authored by
Li Zhang
Claude
Chauncey
parent
7fdfa6441d
commit
89c6a41001
@@ -57,6 +57,14 @@ from vllm.utils.network_utils import join_host_port
|
||||
|
||||
MILLISECONDS_TO_SECONDS_CONVERSION = 1000
|
||||
|
||||
|
||||
def _merge_overrides(base: dict | None, override: dict | None) -> dict | None:
|
||||
"""Shallow merge; per-request wins. Returns None if both are empty."""
|
||||
if not base and not override:
|
||||
return None
|
||||
return {**(base or {}), **(override or {})}
|
||||
|
||||
|
||||
TERM_PLOTLIB_AVAILABLE = (importlib.util.find_spec("termplotlib") is not None) and (
|
||||
shutil.which("gnuplot") is not None
|
||||
)
|
||||
@@ -753,6 +761,8 @@ async def benchmark(
|
||||
input_requests[0].expected_output_len,
|
||||
input_requests[0].multi_modal_data,
|
||||
)
|
||||
test_extra_body = _merge_overrides(extra_body, input_requests[0].request_overrides)
|
||||
test_chat_messages = input_requests[0].chat_messages
|
||||
|
||||
assert (
|
||||
test_mm_content is None
|
||||
@@ -773,7 +783,8 @@ async def benchmark(
|
||||
multi_modal_content=test_mm_content,
|
||||
ignore_eos=ignore_eos,
|
||||
extra_headers=extra_headers,
|
||||
extra_body=extra_body,
|
||||
extra_body=test_extra_body,
|
||||
chat_messages=test_chat_messages,
|
||||
)
|
||||
|
||||
if ready_check_timeout_sec > 0:
|
||||
@@ -850,7 +861,8 @@ async def benchmark(
|
||||
multi_modal_content=test_mm_content,
|
||||
ignore_eos=ignore_eos,
|
||||
extra_headers=extra_headers,
|
||||
extra_body=extra_body,
|
||||
extra_body=test_extra_body,
|
||||
chat_messages=test_chat_messages,
|
||||
)
|
||||
profile_output = await request_func(
|
||||
request_func_input=profile_input, session=session
|
||||
@@ -927,6 +939,7 @@ async def benchmark(
|
||||
request.multi_modal_data,
|
||||
request.request_id,
|
||||
)
|
||||
per_request_extra_body = _merge_overrides(extra_body, request.request_overrides)
|
||||
req_model_id, req_model_name = model_id, model_name
|
||||
if lora_modules:
|
||||
req_lora_module = next(lora_modules)
|
||||
@@ -943,8 +956,9 @@ async def benchmark(
|
||||
multi_modal_content=mm_content,
|
||||
ignore_eos=ignore_eos,
|
||||
extra_headers=extra_headers,
|
||||
extra_body=extra_body,
|
||||
extra_body=per_request_extra_body,
|
||||
request_id=request_id,
|
||||
chat_messages=request.chat_messages,
|
||||
)
|
||||
tasks.append(
|
||||
asyncio.create_task(
|
||||
|
||||
Reference in New Issue
Block a user