From 705cac03576fe2fff3923841c102a8bd6b72a65b Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 21 Jan 2024 04:21:54 +1100 Subject: [PATCH] Update save.py --- unsloth/save.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unsloth/save.py b/unsloth/save.py index 36a61aa5aa..7f2cf88128 100644 --- a/unsloth/save.py +++ b/unsloth/save.py @@ -544,8 +544,9 @@ def save_to_gguf( command = f"./llama.cpp/quantize {old_location} "\ f"{final_location} {quantization_method} {n_cpus}" - with subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, bufsize = 1) as sp: - for line in sp.stdout: + # quantize uses stderr + with subprocess.Popen(command, shell = True, stderr = subprocess.PIPE, bufsize = 1) as sp: + for line in sp.stderr: print(line.decode("utf-8"), flush = True, end = "") pass print(f"Unsloth: Conversion completed! Output location: {final_location}")