[Bug] Fix pooling model benchmark script (#36300)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -795,6 +795,17 @@ ASYNC_REQUEST_FUNCS: dict[str, RequestFunc] = {
|
|||||||
"vllm-rerank": async_request_vllm_rerank,
|
"vllm-rerank": async_request_vllm_rerank,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
POOLING_BACKENDS = {
|
||||||
|
"openai-embeddings",
|
||||||
|
"openai-embeddings-chat",
|
||||||
|
"openai-embeddings-clip",
|
||||||
|
"openai-embeddings-vlm2vec",
|
||||||
|
"infinity-embeddings",
|
||||||
|
"infinity-embeddings-clip",
|
||||||
|
"vllm-pooling",
|
||||||
|
"vllm-rerank",
|
||||||
|
}
|
||||||
|
|
||||||
OPENAI_COMPATIBLE_BACKENDS = [
|
OPENAI_COMPATIBLE_BACKENDS = [
|
||||||
k
|
k
|
||||||
for k, v in ASYNC_REQUEST_FUNCS.items()
|
for k, v in ASYNC_REQUEST_FUNCS.items()
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ from vllm.benchmarks.datasets import SampleRequest, add_dataset_parser, get_samp
|
|||||||
from vllm.benchmarks.lib.endpoint_request_func import (
|
from vllm.benchmarks.lib.endpoint_request_func import (
|
||||||
ASYNC_REQUEST_FUNCS,
|
ASYNC_REQUEST_FUNCS,
|
||||||
OPENAI_COMPATIBLE_BACKENDS,
|
OPENAI_COMPATIBLE_BACKENDS,
|
||||||
|
POOLING_BACKENDS,
|
||||||
RequestFuncInput,
|
RequestFuncInput,
|
||||||
RequestFuncOutput,
|
RequestFuncOutput,
|
||||||
)
|
)
|
||||||
@@ -1721,11 +1722,7 @@ async def main_async(args: argparse.Namespace) -> dict[str, Any]:
|
|||||||
goodput_config_dict = check_goodput_args(args)
|
goodput_config_dict = check_goodput_args(args)
|
||||||
|
|
||||||
backend = args.backend
|
backend = args.backend
|
||||||
task_type = (
|
task_type = TaskType.POOLING if backend in POOLING_BACKENDS else TaskType.GENERATION
|
||||||
TaskType.POOLING
|
|
||||||
if "embeddings" in backend or "rerank" in backend
|
|
||||||
else TaskType.GENERATION
|
|
||||||
)
|
|
||||||
|
|
||||||
# Collect the sampling parameters.
|
# Collect the sampling parameters.
|
||||||
if task_type == TaskType.GENERATION:
|
if task_type == TaskType.GENERATION:
|
||||||
|
|||||||
Reference in New Issue
Block a user