Squashed commit of the following:
commit9f9f83fb43Author: Daniel Han-Chen <danielhanchen@gmail.com> Date: Fri May 17 14:16:39 2024 +1000 Update save.py commite0103a61a6Author: Daniel Han-Chen <danielhanchen@gmail.com> Date: Fri May 17 04:14:05 2024 +1000 peft issue
This commit is contained in:
parent
8dc0561ec0
commit
e6f63d1d5e
1 changed files with 8 additions and 4 deletions
|
|
@ -777,9 +777,10 @@ def install_llama_cpp_old(version = -10):
|
|||
for command in commands:
|
||||
with subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, bufsize = 1) as sp:
|
||||
for line in sp.stdout:
|
||||
line = line.decode("utf-8", errors = "replace")
|
||||
if "undefined reference" in line:
|
||||
raise RuntimeError("Failed compiling llama.cpp. Please report this ASAP!")
|
||||
print(line.decode("utf-8", errors = "replace"), flush = True, end = "")
|
||||
print(line, flush = True, end = "")
|
||||
pass
|
||||
pass
|
||||
# Check if successful
|
||||
|
|
@ -811,9 +812,10 @@ def install_llama_cpp_blocking(use_cuda = True):
|
|||
for command in commands:
|
||||
with subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, bufsize = 1) as sp:
|
||||
for line in sp.stdout:
|
||||
line = line.decode("utf-8", errors = "replace")
|
||||
if "undefined reference" in line:
|
||||
raise RuntimeError("Failed compiling llama.cpp. Please report this ASAP!")
|
||||
print(line.decode("utf-8", errors = "replace"), flush = True, end = "")
|
||||
print(line, flush = True, end = "")
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
|
|
@ -988,9 +990,10 @@ def save_to_gguf(
|
|||
|
||||
with subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, bufsize = 1) as sp:
|
||||
for line in sp.stdout:
|
||||
line = line.decode("utf-8", errors = "replace")
|
||||
if "undefined reference" in line:
|
||||
raise RuntimeError("Failed compiling llama.cpp. Please report this ASAP!")
|
||||
print(line.decode("utf-8", errors = "replace"), flush = True, end = "")
|
||||
print(line, flush = True, end = "")
|
||||
if sp.returncode is not None and sp.returncode != 0:
|
||||
raise subprocess.CalledProcessError(sp.returncode, sp.args)
|
||||
pass
|
||||
|
|
@ -1031,9 +1034,10 @@ def save_to_gguf(
|
|||
# quantize uses stderr
|
||||
with subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, bufsize = 1) as sp:
|
||||
for line in sp.stdout:
|
||||
line = line.decode("utf-8", errors = "replace")
|
||||
if "undefined reference" in line:
|
||||
raise RuntimeError("Failed compiling llama.cpp. Please report this ASAP!")
|
||||
print(line.decode("utf-8", errors = "replace"), flush = True, end = "")
|
||||
print(line, flush = True, end = "")
|
||||
if sp.returncode is not None and sp.returncode != 0:
|
||||
raise subprocess.CalledProcessError(sp.returncode, sp.args)
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue