Replace ggml occurences with gguf

This commit is contained in:
oobabooga 2023-08-26 01:06:59 -07:00
parent 1a642c12b5
commit 83640d6f43
5 changed files with 12 additions and 12 deletions

View file

@ -57,7 +57,7 @@ class ModelDownloader:
classifications = []
has_pytorch = False
has_pt = False
# has_ggml = False
# has_gguf = False
has_safetensors = False
is_lora = False
while True:
@ -78,10 +78,10 @@ class ModelDownloader:
is_pytorch = re.match(r"(pytorch|adapter|gptq)_model.*\.bin", fname)
is_safetensors = re.match(r".*\.safetensors", fname)
is_pt = re.match(r".*\.pt", fname)
is_ggml = re.match(r".*ggml.*\.bin", fname)
is_gguf = re.match(r'.*\.gguf', fname)
is_tokenizer = re.match(r"(tokenizer|ice|spiece).*\.model", fname)
is_text = re.match(r".*\.(txt|json|py|md)", fname) or is_tokenizer
if any((is_pytorch, is_safetensors, is_pt, is_ggml, is_tokenizer, is_text)):
if any((is_pytorch, is_safetensors, is_pt, is_gguf, is_tokenizer, is_text)):
if 'lfs' in dict[i]:
sha256.append([fname, dict[i]['lfs']['oid']])
@ -101,9 +101,9 @@ class ModelDownloader:
elif is_pt:
has_pt = True
classifications.append('pt')
elif is_ggml:
# has_ggml = True
classifications.append('ggml')
elif is_gguf:
# has_gguf = True
classifications.append('gguf')
cursor = base64.b64encode(f'{{"file_name":"{dict[-1]["path"]}"}}'.encode()) + b':50'
cursor = base64.b64encode(cursor)