From e0ffa9086547a418d65e3daf62179c0a5ebdd2a4 Mon Sep 17 00:00:00 2001 From: kingbri Date: Sun, 22 Sep 2024 12:57:28 -0400 Subject: [PATCH] Dependencies: Change handling of exllamav2 checks ExllamaV2 should check for solely exllamav2, otherwise errors don't make sense. Migrate the combined "exl2" computed property to "inference" since those are the required dependencies for minimal inference. Signed-off-by: kingbri --- backends/exllamav2/version.py | 2 +- common/model.py | 2 +- common/optional_dependencies.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/exllamav2/version.py b/backends/exllamav2/version.py index fc4afb1..cdaeaeb 100644 --- a/backends/exllamav2/version.py +++ b/backends/exllamav2/version.py @@ -22,7 +22,7 @@ def check_exllama_version(): "pip install --upgrade .[amd]\n\n" ) - if not dependencies.exl2: + if not dependencies.exllamav2: raise SystemExit(("Exllamav2 is not installed.\n" + install_message)) required_version = version.parse("0.2.2") diff --git a/common/model.py b/common/model.py index 296f684..87b06ad 100644 --- a/common/model.py +++ b/common/model.py @@ -15,7 +15,7 @@ from common.networking import handle_request_error from common.tabby_config import config from common.optional_dependencies import dependencies -if dependencies.exl2: +if dependencies.exllamav2: from backends.exllamav2.model import ExllamaV2Container # Global model container diff --git a/common/optional_dependencies.py b/common/optional_dependencies.py index fd2efe3..e98a668 100644 --- a/common/optional_dependencies.py +++ b/common/optional_dependencies.py @@ -25,7 +25,7 @@ class DependenciesModel(BaseModel): @computed_field @property - def exl2(self) -> bool: + def inference(self) -> bool: return self.torch and self.exllamav2 and self.flash_attn