Update save.py
This commit is contained in:
parent
f117819f24
commit
8abac6dfa3
1 changed files with 5 additions and 2 deletions
|
|
@ -687,13 +687,16 @@ def install_llama_cpp_old(version = -10):
|
|||
pass
|
||||
|
||||
|
||||
def install_llama_cpp_blocking():
|
||||
def install_llama_cpp_blocking(use_cuda = True):
|
||||
use_cuda = "LLAMA_CUBLAS=1" if use_cuda else ""
|
||||
|
||||
commands = [
|
||||
"git clone https://github.com/ggerganov/llama.cpp",
|
||||
f"cd llama.cpp && make clean && LLAMA_CUBLAS=1 make all -j{psutil.cpu_count()*2}",
|
||||
f"cd llama.cpp && make clean && {use_cuda} make all -j{psutil.cpu_count()*2}",
|
||||
"pip install gguf protobuf",
|
||||
]
|
||||
if os.path.exists("llama.cpp"): return
|
||||
|
||||
for command in commands:
|
||||
with subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, bufsize = 1) as sp:
|
||||
for line in sp.stdout:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue