Skip to content

Commit e3ea354

Browse files
author
Mug
committed
Allow local llama library usage
1 parent 6de2f24 commit e3ea354

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llama_cpp/llama_cpp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ def _load_shared_library(lib_base_name):
1818

1919
# Construct the paths to the possible shared library names
2020
_base_path = pathlib.Path(__file__).parent.resolve()
21+
_local_path = pathlib.Path.cwd()
2122
# Searching for the library in the current directory under the name "libllama" (default name
2223
# for llamacpp) and "llama" (default name for this repo)
2324
_lib_paths = [
25+
_local_path / f"./lib{lib_base_name}{lib_ext}",
26+
_local_path / f"./{lib_base_name}{lib_ext}",
2427
_base_path / f"lib{lib_base_name}{lib_ext}",
2528
_base_path / f"{lib_base_name}{lib_ext}"
2629
]

0 commit comments

Comments
 (0)