Update save.py
This commit is contained in:
parent
b060d7b621
commit
460de24ea2
1 changed files with 12 additions and 1 deletions
|
|
@ -576,6 +576,17 @@ def save_to_gguf(
|
|||
print(line.decode("utf-8"), flush = True, end = "")
|
||||
pass
|
||||
|
||||
# Check if quantization succeeded!
|
||||
if not os.path.isfile(final_location):
|
||||
raise RuntimeError(
|
||||
"Unsloth: Quantization failed! You might have to compile llama.cpp yourself, then run this again.\n"\
|
||||
"You do not need to close this Python program. Run the following commands in a new terminal:\n"\
|
||||
"You must run this in the same folder as you're saving your model.\n"\
|
||||
"git clone https://github.com/ggerganov/llama.cpp\n"\
|
||||
"cd llama.cpp && make clean && LLAMA_CUBLAS=1 make -j\n"\,
|
||||
"Once that's done, redo the quantization."
|
||||
)
|
||||
pass
|
||||
print(f"Unsloth: Conversion completed! Output location: {final_location}")
|
||||
|
||||
if quantization_method != first_conversion:
|
||||
|
|
@ -603,7 +614,7 @@ def save_to_gguf(
|
|||
"Once that's done, redo the quantization."
|
||||
)
|
||||
pass
|
||||
|
||||
|
||||
print(f"Unsloth: Conversion completed! Output location: {final_location}")
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue