Download m2pro-gpu-q1_0/deploy.sh from nnopt-dev/Bonsai-27B-llama.cpp: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/nnopt-dev/Bonsai-27B-llama.cpp/resolve/main/m2pro-gpu-q1_0/deploy.sh
- Command line
-
hf download hf://nnopt-dev/Bonsai-27B-llama.cpp/m2pro-gpu-q1_0/deploy.sh
-
curl -L -o deploy.sh https://huggingface.co/nnopt-dev/Bonsai-27B-llama.cpp/resolve/main/m2pro-gpu-q1_0/deploy.sh
1.03 kB
| # Installs the runner, run.sh, port.json and the GGUF weights into DEST (this Mac is the device). | |
| set -euo pipefail | |
| cd "$(dirname "$0")" | |
| DEST="${1:?usage: deploy.sh DEST}" | |
| [ -x bin/nnopt_runner ] || { echo "run build.sh first" >&2; exit 1; } | |
| MODEL_SRC="$(cat bin/model_path.txt)" | |
| [ -f "$MODEL_SRC" ] || { echo "weights not found: $MODEL_SRC" >&2; exit 1; } | |
| mkdir -p "$DEST" | |
| cp bin/nnopt_runner "$DEST/nnopt_runner" | |
| cp src/run.sh "$DEST/run.sh" | |
| # APFS clone when possible (instant, no extra space); plain copy otherwise. | |
| if ! cmp -s "$MODEL_SRC" "$DEST/Bonsai-27B-Q1_0.gguf" 2>/dev/null; then | |
| rm -f "$DEST/Bonsai-27B-Q1_0.gguf" | |
| cp -c "$MODEL_SRC" "$DEST/Bonsai-27B-Q1_0.gguf" 2>/dev/null || cp "$MODEL_SRC" "$DEST/Bonsai-27B-Q1_0.gguf" | |
| fi | |
| cat > "$DEST/port.json" <<JSON | |
| {"contract": 1, "model_type": "text_to_text", | |
| "runtime": "PrismML llama.cpp fork $(cut -c1-8 bin/llama_commit.txt), Metal (all layers on GPU)", | |
| "precision": "Q1_0_g128 weights (as published), f16 KV cache"} | |
| JSON | |
| echo "deployed to $DEST" | |