Skip to content

Commit

Permalink
Update llama.cpp quantize path
Browse files Browse the repository at this point in the history
  • Loading branch information
gfvvz committed Jan 5, 2025
1 parent 87f5bff commit 47ff0c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion unsloth/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,8 @@ def install_llama_cpp_old(version = -10):
pass

# Check if successful
if not os.path.exists("llama.cpp/quantize") and not os.path.exists("llama.cpp/llama-quantize"):
if not os.path.exists("llama.cpp/quantize") and not os.path.exists("llama.cpp/llama-quantize") \
and not os.path.exist("llama.cpp/examples/quantize"):
raise RuntimeError(
"Unsloth: The file 'llama.cpp/llama-quantize' or `llama.cpp/quantize` does not exist.\n"\
"But we expect this file to exist! Maybe the llama.cpp developers changed the name?"
Expand Down Expand Up @@ -1066,6 +1067,8 @@ def save_to_gguf(
quantize_location = "llama.cpp/quantize"
elif os.path.exists("llama.cpp/llama-quantize"):
quantize_location = "llama.cpp/llama-quantize"
elif os.path.exists("llama.cpp/examples/quantize"):
quantize_location = "llama.cpp/examples/quantize"
else:
raise RuntimeError(
"Unsloth: The file 'llama.cpp/llama-quantize' or 'llama.cpp/quantize' does not exist.\n"\
Expand Down

0 comments on commit 47ff0c8

Please sign in to comment.