Merge pull request #2375 from unslothai/revert-2358-patch-1
Revert "fix: improved error handling when llama.cpp build fails"
This commit is contained in:
commit
f1128eea1b
1 changed files with 6 additions and 15 deletions
|
|
@ -887,15 +887,11 @@ def install_llama_cpp_old(version = -10):
|
|||
os.path.exists("llama.cpp/llama-quantize.exe") or
|
||||
os.path.exists("llama.cpp/llama-quantize") or
|
||||
os.path.exists("llama.cpp/quantize.exe") or
|
||||
os.path.exists("llama.cpp/quantize") or
|
||||
os.path.exists("llama.cpp/build/bin/llama-quantize") or
|
||||
os.path.exists("llama.cpp/build/bin/quantize") or
|
||||
os.path.exists()
|
||||
os.path.exists("llama.cpp/quantize")
|
||||
):
|
||||
raise RuntimeError(
|
||||
"Unsloth: The file 'llama.cpp/llama-quantize' or `llama.cpp/quantize` does not exist.\n"\
|
||||
"We've also double checked the building directory under 'llama.cpp/build/bin/'.\n"\
|
||||
"But we expect this file to exist! Check if the file exists under llama.cp and investigate the building process of llama.cpp (make/cmake)"
|
||||
"But we expect this file to exist! Maybe the llama.cpp developers changed the name or check extension of the llama-quantize file."
|
||||
)
|
||||
pass
|
||||
pass
|
||||
|
|
@ -1085,16 +1081,11 @@ def save_to_gguf(
|
|||
quantize_location = "llama.cpp/llama-quantize.exe"
|
||||
elif os.path.exists("llama.cpp/llama-quantize"):
|
||||
quantize_location = "llama.cpp/llama-quantize"
|
||||
elif os.path.exists("llama.cpp/build/bin/llama-quantize"):
|
||||
quantize_location = "llama.cpp/build/bin/llama-quantize"
|
||||
elif os.path.exists("llama.cpp/build/bin/quantize"):
|
||||
quantize_location = "llama.cpp/build/bin/quantize"
|
||||
else:
|
||||
raise RuntimeError(
|
||||
"Unsloth: The file 'llama.cpp/llama-quantize' or `llama.cpp/quantize` does not exist.\n"\
|
||||
"We've also double checked the building directory under 'llama.cpp/build/bin/'.\n"\
|
||||
"But we expect this file to exist! Check if the file exists under llama.cp and investigate the building process of llama.cpp (make/cmake)"
|
||||
)
|
||||
raise RuntimeError(
|
||||
"Unsloth: The file ('llama.cpp/llama-quantize' or 'llama.cpp/llama-quantize.exe' if you are on Windows WSL) or 'llama.cpp/quantize' does not exist.\n"\
|
||||
"But we expect this file to exist! Maybe the llama.cpp developers changed the name or check extension of the llama-quantize file."
|
||||
)
|
||||
pass
|
||||
|
||||
# See https://github.com/unslothai/unsloth/pull/730
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue