From 6a44f4aec687085c3378c3dc89b889ac6f582e6b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 31 Mar 2023 17:33:10 -0300 Subject: [PATCH] Add support for downloading ggml files --- download-model.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/download-model.py b/download-model.py index 7e5f61b2..93329725 100644 --- a/download-model.py +++ b/download-model.py @@ -97,6 +97,7 @@ def get_download_links_from_huggingface(model, branch): classifications = [] has_pytorch = False has_pt = False + has_ggml = False has_safetensors = False is_lora = False while True: @@ -114,6 +115,7 @@ def get_download_links_from_huggingface(model, branch): is_pytorch = re.match("(pytorch|adapter)_model.*\.bin", fname) is_safetensors = re.match(".*\.safetensors", fname) is_pt = re.match(".*\.pt", fname) + is_ggml = re.match(".*\.bin", fname) is_tokenizer = re.match("tokenizer.*\.model", fname) is_text = re.match(".*\.(txt|json|py|md)", fname) or is_tokenizer @@ -135,6 +137,9 @@ def get_download_links_from_huggingface(model, branch): elif is_pt: has_pt = True classifications.append('pt') + elif is_ggml: + has_ggml = True + classifications.append('ggml') cursor = base64.b64encode(f'{{"file_name":"{dict[-1]["path"]}"}}'.encode()) + b':50' cursor = base64.b64encode(cursor)