fix non-AVX CPU detection (#2141)

* chat: fix non-AVX CPU detection on Windows
* bindings: throw exception instead of logging to console

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel
2024-03-19 10:56:14 -04:00
committed by GitHub
parent 6c2542e540
commit 699410014a
6 changed files with 79 additions and 84 deletions

View File

@@ -185,7 +185,7 @@ class LLModel:
model = llmodel.llmodel_model_create2(self.model_path, b"auto", ctypes.byref(err))
if model is None:
s = err.value
raise ValueError(f"Unable to instantiate model: {'null' if s is None else s.decode()}")
raise RuntimeError(f"Unable to instantiate model: {'null' if s is None else s.decode()}")
self.model = model
def __del__(self):