Spaces:
Running
Running
Download apply_patch.sh from tokutsu/exllamav2_patch: direct link, hf CLI and curl.
- Browser
- Download file 670 Bytes
-
https://huggingface.co/spaces/tokutsu/exllamav2_patch/resolve/main/apply_patch.sh
- Command line
-
hf download hf://spaces/tokutsu/exllamav2_patch/apply_patch.sh
-
curl -L -o apply_patch.sh https://huggingface.co/spaces/tokutsu/exllamav2_patch/resolve/main/apply_patch.sh
670 Bytes
| THIS_DIR="$(cd $(dirname ${BASH_SOURCE}); pwd)" | |
| EXLLAMAV2_DIR="$1" | |
| PATCH_FILE="${THIS_DIR}/hf.py.patch" | |
| main() { | |
| if [[ -z "${EXLLAMAV2_DIR}" ]]; then | |
| echo "[Usage] $0 EXLLAMAV2_DIR" | |
| exit 1 | |
| fi | |
| if [[ ! -d "${EXLLAMAV2_DIR}" ]]; then | |
| echo "[ERROR] EXLLAMAV2_DIR does not exist. (${EXLLAMAV2_DIR})" >&2 | |
| exit 1 | |
| fi | |
| if [[ ! -e "${PATCH_FILE}" ]]; then | |
| echo "[ERROR] Patch file not found. (${PATCH_FILE})" >&2 | |
| exit 1 | |
| fi | |
| if ! (cd "${EXLLAMAV2_DIR}" && patch -p1 < "${PATCH_FILE}"); then | |
| echo "[ERROR] Failed to apply patch (${PATCH_FILE})" >&2 | |
| exit 1 | |
| fi | |
| } | |
| main "$@" | |