Upload convert_to_gguf.py with huggingface_hub
Browse files- convert_to_gguf.py +13 -6
convert_to_gguf.py
CHANGED
|
@@ -127,12 +127,19 @@ quantize_bin = "/tmp/llama.cpp/llama-quantize"
|
|
| 127 |
|
| 128 |
# Build quantize tool first
|
| 129 |
print(" Building quantize tool...")
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
|
| 137 |
# Common quantization formats
|
| 138 |
quant_formats = [
|
|
|
|
| 127 |
|
| 128 |
# Build quantize tool first
|
| 129 |
print(" Building quantize tool...")
|
| 130 |
+
try:
|
| 131 |
+
result = subprocess.run(
|
| 132 |
+
["make", "-C", "/tmp/llama.cpp", "llama-quantize"],
|
| 133 |
+
check=True,
|
| 134 |
+
capture_output=True,
|
| 135 |
+
text=True
|
| 136 |
+
)
|
| 137 |
+
print(" ✅ Quantize tool built")
|
| 138 |
+
except subprocess.CalledProcessError as e:
|
| 139 |
+
print(f" ❌ Build failed!")
|
| 140 |
+
print("STDOUT:", e.stdout)
|
| 141 |
+
print("STDERR:", e.stderr)
|
| 142 |
+
raise
|
| 143 |
|
| 144 |
# Common quantization formats
|
| 145 |
quant_formats = [
|