CoolFace
Datasetpublic

echodict/llama.cpp

version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes762downloads
sync_vendor.py44 linesDownload Raw Back to scripts
1#!/usr/bin/env python32 3import urllib.request4import os5import sys6import subprocess7 8HTTPLIB_VERSION = "refs/tags/v0.42.0"9 10vendor = {11    "https://github.com/nlohmann/json/releases/latest/download/json.hpp":     "vendor/nlohmann/json.hpp",12    "https://github.com/nlohmann/json/releases/latest/download/json_fwd.hpp": "vendor/nlohmann/json_fwd.hpp",13 14    "https://raw.githubusercontent.com/nothings/stb/refs/heads/master/stb_image.h": "vendor/stb/stb_image.h",15 16    # not using latest tag to avoid this issue: https://github.com/ggml-org/llama.cpp/pull/17179#discussion_r251587792617    # "https://github.com/mackron/miniaudio/raw/refs/tags/0.11.24/miniaudio.h": "vendor/miniaudio/miniaudio.h",18    "https://github.com/mackron/miniaudio/raw/9634bedb5b5a2ca38c1ee7108a9358a4e233f14d/miniaudio.h": "vendor/miniaudio/miniaudio.h",19 20    f"https://raw.githubusercontent.com/yhirose/cpp-httplib/{HTTPLIB_VERSION}/httplib.h": "httplib.h",21    f"https://raw.githubusercontent.com/yhirose/cpp-httplib/{HTTPLIB_VERSION}/split.py":  "split.py",22    f"https://raw.githubusercontent.com/yhirose/cpp-httplib/{HTTPLIB_VERSION}/LICENSE":   "vendor/cpp-httplib/LICENSE",23 24    "https://raw.githubusercontent.com/sheredom/subprocess.h/b49c56e9fe214488493021017bf3954b91c7c1f5/subprocess.h": "vendor/sheredom/subprocess.h",25}26 27for url, filename in vendor.items():28    print(f"downloading {url} to {filename}") # noqa: NP10029    urllib.request.urlretrieve(url, filename)30 31print("Splitting httplib.h...") # noqa: NP10032try:33    subprocess.check_call([34        sys.executable, "split.py",35        "--extension", "cpp",36        "--out", "vendor/cpp-httplib"37    ])38except Exception as e:39    print(f"Error: {e}") # noqa: NP10040    sys.exit(1)41finally:42    os.remove("split.py")43    os.remove("httplib.h")44