Spaces:
Paused
Paused
File size: 1,076 Bytes
3873197 23aaac8 3873197 23aaac8 3873197 23aaac8 3873197 9b5011b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #!/usr/bin/env bash
set -euo pipefail
export PATH="$HOME/.local/bin:${PATH}"
MODEL_REPO="empero-ai/Qwythos-9B-Claude-Mythos-5-1M-GGUF"
MODEL_FILE="Qwythos-9B-Claude-Mythos-5-1M-MTP-Q4_K_M.gguf"
MODEL_DIR="${MODEL_DIR:-/tmp/models}"
MODEL_PATH="${MODEL_DIR}/${MODEL_FILE}"
# Install the prebuilt llama.cpp binary. On this free CPU tier the installer
# probes the hardware and downloads the optimized CPU build.
if ! command -v llama >/dev/null 2>&1; then
echo "==> Installing prebuilt llama.cpp via llama.app ..."
curl -LsSf https://llama.app/install.sh | sh
fi
# Fetch the GGUF model at runtime (no token needed, the model is public).
mkdir -p "${MODEL_DIR}"
if [ ! -s "${MODEL_PATH}" ]; then
echo "==> Downloading ${MODEL_FILE} ..."
curl -fL --retry 3 --retry-delay 5 \
-o "${MODEL_PATH}" \
"https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_FILE}"
fi
echo "==> Launching llama serve (web UI on :8080) ..."
exec llama serve \
-m "${MODEL_PATH}" \
--spec-type draft-mtp \
--spec-draft-n-max 6 \
-c 16384 \
--host 0.0.0.0 \
--port 8080
|