From d58fa31e0ccd2e6c68f7a8ebaf81811dcaaf3ac4 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sat, 16 Mar 2024 22:31:02 +1100 Subject: [PATCH] Update save.py --- unsloth/save.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unsloth/save.py b/unsloth/save.py index 317a98dfe0..27b713209a 100644 --- a/unsloth/save.py +++ b/unsloth/save.py @@ -643,7 +643,7 @@ def _fix_gemma_gguf(): gemma_end = text.find("self.gguf_writer.add_tensor(new_name, data)", gemma_start) if gemma_end == -1: return - + gemma_text = text[gemma_start : gemma_end] bad_text = \ """ data = data.astype(np.float32) @@ -768,7 +768,9 @@ def save_to_gguf( f"--outtype {first_conversion} --concurrency {n_cpus}" else: # Need to fix convert-hf-to-gguf.py for some models! + print("Fixing Gemma") _fix_gemma_gguf() + print("Fixed!") command = f"python llama.cpp/convert-hf-to-gguf.py {model_directory} "\ f"--outfile {final_location} "\