evalstate HF Staff commited on
Commit
3e51909
·
verified ·
1 Parent(s): 1b760a9

Upload convert_to_gguf.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. 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
- subprocess.run(
131
- ["make", "-C", "/tmp/llama.cpp", "llama-quantize"],
132
- check=True,
133
- capture_output=True
134
- )
135
- print(" ✅ Quantize tool built")
 
 
 
 
 
 
 
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 = [