From 6fb84c6eb4dd3f90e67ee56a27a8a6315cf925ea Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Fri, 13 Dec 2024 14:44:09 +0100 Subject: [PATCH] fix --- optimum_benchmark/backends/py_txi/config.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/optimum_benchmark/backends/py_txi/config.py b/optimum_benchmark/backends/py_txi/config.py index 2bf6c04c..9cc23a64 100644 --- a/optimum_benchmark/backends/py_txi/config.py +++ b/optimum_benchmark/backends/py_txi/config.py @@ -76,7 +76,9 @@ def __post_init__(self): renderDs = [file for file in os.listdir("/dev/dri") if file.startswith("renderD")] self.devices = ["/dev/kfd"] + [f"/dev/dri/{renderDs[i]}" for i in ids] - # TGI specific - if self.task in TEXT_GENERATION_TASKS: - if self.trust_remote_code is None: - self.trust_remote_code = self.model_kwargs.get("trust_remote_code", False) + # Common options + if self.max_concurrent_requests is None: + if self.task in TEXT_GENERATION_TASKS: + self.max_concurrent_requests = 128 + elif self.task in TEXT_EMBEDDING_TASKS: + self.max_concurrent_requests = 512