Commit
·
6486f13
1
Parent(s):
eef4f3c
move stuff around
Browse files
auto-exl2-upload/auto-exl2-upload.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e1d1f6d79a23ab700df6c9c19654f7eabc0a88fe8dbf8beef6e153124bc9e2d
|
3 |
+
size 7802
|
auto-exl2-upload/exl2-quant.py
CHANGED
@@ -5,7 +5,6 @@ import os
|
|
5 |
import sys
|
6 |
import subprocess
|
7 |
import glob
|
8 |
-
import time
|
9 |
|
10 |
#define os differences
|
11 |
oname = os.name
|
@@ -108,6 +107,18 @@ bpwvalue = list(qnum.values())
|
|
108 |
#sort the list from smallest to largest
|
109 |
bpwvalue.sort()
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
#downloading the model
|
112 |
if not os.path.exists(f"models{slsh}{model}{slsh}converted-st"): #check if model was converted to safetensors, skip download if it was
|
113 |
result = subprocess.run(f"{pyt} download-model.py {repo_url}", shell=True) #download model from hf (Credit to oobabooga for this script)
|
@@ -189,27 +200,16 @@ for bpw in bpwvalue:
|
|
189 |
|
190 |
if file_exists(f"{whoami().get('name', None)}/{modelname}-exl2", "measurement.json") == False: #check if measurement.json exists in main
|
191 |
upload_file(path_or_fileobj=f"measurements{slsh}{model}-measure{slsh}measurement.json", path_in_repo="measurement.json", repo_id=f"{whoami().get('name', None)}/{modelname}-exl2", commit_message="Add measurement.json") #upload measurement.json to main
|
192 |
-
|
193 |
-
|
194 |
-
#ask to delete original fp16 weights
|
195 |
-
delmodel = input("Do you want to delete the original model? (y/n): ")
|
196 |
-
while delmodel != 'y' and delmodel != 'n':
|
197 |
-
delmodel = input("Please enter 'y' or 'n': ")
|
198 |
if delmodel == 'y':
|
199 |
subprocess.run(f"{osrmd} models{slsh}{model}", shell=True)
|
200 |
print(f"Deleted models/{model}")
|
201 |
-
time.sleep(2)
|
202 |
-
clear_screen()
|
203 |
|
204 |
-
#
|
205 |
-
priv2pub = input("Do you want to make the repo public? (y/n): ")
|
206 |
-
while priv2pub != 'y' and priv2pub != 'n':
|
207 |
-
priv2pub = input("Please enter 'y' or 'n': ")
|
208 |
if priv2pub == 'y':
|
209 |
update_repo_visibility(f"{whoami().get('name', None)}/{modelname}-exl2", private=False)
|
210 |
print("Repo is now public.")
|
211 |
-
time.sleep(2)
|
212 |
-
clear_screen()
|
213 |
|
214 |
#if new sign in, tell user
|
215 |
if tfound == 'false':
|
|
|
5 |
import sys
|
6 |
import subprocess
|
7 |
import glob
|
|
|
8 |
|
9 |
#define os differences
|
10 |
oname = os.name
|
|
|
107 |
#sort the list from smallest to largest
|
108 |
bpwvalue.sort()
|
109 |
|
110 |
+
#ask to change repo visibility to public on hf hub
|
111 |
+
priv2pub = input("Do you want to make the repo public after successful quants? (y/n): ")
|
112 |
+
while priv2pub != 'y' and priv2pub != 'n':
|
113 |
+
priv2pub = input("Please enter 'y' or 'n': ")
|
114 |
+
clear_screen()
|
115 |
+
|
116 |
+
#ask to delete original fp16 weights
|
117 |
+
delmodel = input("Do you want to delete the original model? (Won't delete if paused or failed) (y/n): ")
|
118 |
+
while delmodel != 'y' and delmodel != 'n':
|
119 |
+
delmodel = input("Please enter 'y' or 'n': ")
|
120 |
+
clear_screen()
|
121 |
+
|
122 |
#downloading the model
|
123 |
if not os.path.exists(f"models{slsh}{model}{slsh}converted-st"): #check if model was converted to safetensors, skip download if it was
|
124 |
result = subprocess.run(f"{pyt} download-model.py {repo_url}", shell=True) #download model from hf (Credit to oobabooga for this script)
|
|
|
200 |
|
201 |
if file_exists(f"{whoami().get('name', None)}/{modelname}-exl2", "measurement.json") == False: #check if measurement.json exists in main
|
202 |
upload_file(path_or_fileobj=f"measurements{slsh}{model}-measure{slsh}measurement.json", path_in_repo="measurement.json", repo_id=f"{whoami().get('name', None)}/{modelname}-exl2", commit_message="Add measurement.json") #upload measurement.json to main
|
203 |
+
|
204 |
+
# if chose to delete model at the beginning, delete the model
|
|
|
|
|
|
|
|
|
205 |
if delmodel == 'y':
|
206 |
subprocess.run(f"{osrmd} models{slsh}{model}", shell=True)
|
207 |
print(f"Deleted models/{model}")
|
|
|
|
|
208 |
|
209 |
+
#update repo visibility if user chose to
|
|
|
|
|
|
|
210 |
if priv2pub == 'y':
|
211 |
update_repo_visibility(f"{whoami().get('name', None)}/{modelname}-exl2", private=False)
|
212 |
print("Repo is now public.")
|
|
|
|
|
213 |
|
214 |
#if new sign in, tell user
|
215 |
if tfound == 'false':
|
exl2-multi-quant-local/exl2-multi-quant-local.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ce313512d233f42d1fa7454e1620206419cca0a251dce9f74a40f07bc0ebbdb1
|
3 |
+
size 6784
|
exl2-multi-quant-local/exl2-quant.py
CHANGED
@@ -71,15 +71,6 @@ qmount = int(input("Enter the number of quants you want to create: "))
|
|
71 |
qmount += 1
|
72 |
clear_screen()
|
73 |
|
74 |
-
#ask to delete fp16 after done
|
75 |
-
delmodel = input("Do you want to delete the original model after finishing? (Won't delete if canceled or failed) (y/n): ")
|
76 |
-
while delmodel != 'y' and delmodel != 'n':
|
77 |
-
delmodel = input("Please enter 'y' or 'n': ")
|
78 |
-
if delmodel == 'y':
|
79 |
-
print(f"Deleting dir models/{model} after quants are finished.")
|
80 |
-
time.sleep(3)
|
81 |
-
clear_screen()
|
82 |
-
|
83 |
#save bpw values
|
84 |
print(f"Type the BPW for the following {qmount - 1} quants. Recommend staying over 2.4 BPW. Use the vram calculator to find the best BPW values: https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator")
|
85 |
qnum = {}
|
@@ -93,6 +84,15 @@ bpwvalue = list(qnum.values())
|
|
93 |
#sort the list from smallest to largest
|
94 |
bpwvalue.sort()
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
#downloading the model
|
97 |
if not os.path.exists(f"models{slsh}{model}{slsh}converted-st"): #check if model was converted to safetensors, skip download if it was
|
98 |
result = subprocess.run(f"{pyt} download-model.py {repo_url}", shell=True) #download model from hf (Credit to oobabooga for this script)
|
@@ -147,8 +147,6 @@ for bpw in bpwvalue:
|
|
147 |
if delmodel == 'y':
|
148 |
subprocess.run(f"{osrmd} models{slsh}{model}", shell=True)
|
149 |
print(f"Deleted models/{model}")
|
150 |
-
time.sleep(2)
|
151 |
-
clear_screen()
|
152 |
|
153 |
#if new sign in, tell user
|
154 |
if tfound == 'false':
|
|
|
71 |
qmount += 1
|
72 |
clear_screen()
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
#save bpw values
|
75 |
print(f"Type the BPW for the following {qmount - 1} quants. Recommend staying over 2.4 BPW. Use the vram calculator to find the best BPW values: https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator")
|
76 |
qnum = {}
|
|
|
84 |
#sort the list from smallest to largest
|
85 |
bpwvalue.sort()
|
86 |
|
87 |
+
#ask to delete fp16 after done
|
88 |
+
delmodel = input("Do you want to delete the original model after finishing? (Won't delete if paused or failed) (y/n): ")
|
89 |
+
while delmodel != 'y' and delmodel != 'n':
|
90 |
+
delmodel = input("Please enter 'y' or 'n': ")
|
91 |
+
if delmodel == 'y':
|
92 |
+
print(f"Deleting dir models/{model} after quants are finished.")
|
93 |
+
time.sleep(3)
|
94 |
+
clear_screen()
|
95 |
+
|
96 |
#downloading the model
|
97 |
if not os.path.exists(f"models{slsh}{model}{slsh}converted-st"): #check if model was converted to safetensors, skip download if it was
|
98 |
result = subprocess.run(f"{pyt} download-model.py {repo_url}", shell=True) #download model from hf (Credit to oobabooga for this script)
|
|
|
147 |
if delmodel == 'y':
|
148 |
subprocess.run(f"{osrmd} models{slsh}{model}", shell=True)
|
149 |
print(f"Deleted models/{model}")
|
|
|
|
|
150 |
|
151 |
#if new sign in, tell user
|
152 |
if tfound == 'false':
|