mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-29 10:42:03 +00:00
Launch: Make exllamav2 requirement more friendly
Add the ability to use an unsafe config flag if needed and migrate the exl2 check to a different file within the exl2 backend code. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
31
backends/exllamav2/utils.py
Normal file
31
backends/exllamav2/utils.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from packaging import version
|
||||
from importlib.metadata import version as package_version
|
||||
|
||||
from common.logger import init_logger
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
|
||||
def check_exllama_version():
|
||||
"""Verifies the exllama version"""
|
||||
|
||||
required_version = "0.0.12"
|
||||
current_version = package_version("exllamav2").split("+")[0]
|
||||
|
||||
if version.parse(current_version) < version.parse(required_version):
|
||||
raise SystemExit(
|
||||
f"ERROR: TabbyAPI requires ExLlamaV2 {required_version} "
|
||||
f"or greater. Your current version is {current_version}.\n"
|
||||
"Please upgrade your environment by running a start script "
|
||||
"(start.bat or start.sh)\n\n"
|
||||
"Or you can manually run a requirements update "
|
||||
"using the following command:\n\n"
|
||||
"For CUDA 12.1:\n"
|
||||
"pip install --upgrade -r requirements.txt\n\n"
|
||||
"For CUDA 11.8:\n"
|
||||
"pip install --upgrade -r requirements-cu118.txt\n\n"
|
||||
"For ROCm:\n"
|
||||
"pip install --upgrade -r requirements-amd.txt\n\n"
|
||||
)
|
||||
else:
|
||||
logger.info(f"ExllamaV2 version: {current_version}")
|
||||
Reference in New Issue
Block a user