Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

peft issue (#480)

Daniel Han63e175a77d4d
diff --git a/pyproject.toml b/pyproject.toml
index 0398d0df4c4..91654e68a45 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -43,7 +43,7 @@ huggingface = [
"numpy",
"accelerate>=0.26.1",
"trl>=0.7.9",
- "peft>=0.7.1",
+ "peft>=0.7.1,<0.11.0",
"protobuf<4.0.0",
]
cu118only = [
diff --git a/unsloth/save.py b/unsloth/save.py
index 39b18d0dd95..caa5aaa619b 100644
--- a/unsloth/save.py
+++ b/unsloth/save.py
@@ -777,6 +777,8 @@ 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:
+ 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 = "")
pass
pass
@@ -809,6 +811,8 @@ 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:
+ 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 = "")
pass
pass
@@ -984,6 +988,8 @@ 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:
+ 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 = "")
if sp.returncode is not None and sp.returncode != 0:
raise subprocess.CalledProcessError(sp.returncode, sp.args)
@@ -1025,6 +1031,8 @@ 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:
+ 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 = "")
if sp.returncode is not None and sp.returncode != 0:
raise subprocess.CalledProcessError(sp.returncode, sp.args)