The LLM fleet serve scripts, systemd units, env tunables, and bench harnesses join the deploy scripts. The vllmScripts deploy.sh is removed here; its functionality is folded into the unified scripts/deploy.sh in a follow-up commit. bench-spec-stack.sh gains the executable bit (required by the scripts_syntax test seam).
94 lines
2.8 KiB
Bash
Executable File
94 lines
2.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Serve HauhauCS Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive:Q6_K_P with
|
|
# ngram-mod speculative decoding on Dankserver (RTX 3090, MoE experts on CPU).
|
|
#
|
|
# Runtime: upstream llama.cpp llama-server (b10121). The model is a 35B-total /
|
|
# 3B-active MoE vision-language model; --n-cpu-moe keeps most expert weights on
|
|
# CPU so the non-expert tensors + KV cache fit the 24 GB 3090.
|
|
#
|
|
# Tunables come from frank-default-small.env in this directory unless the
|
|
# FRANK_SMALL_ENV_FILE environment variable overrides that path.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
ENV_FILE="${FRANK_SMALL_ENV_FILE:-$SCRIPT_DIR/frank-default-small.env}"
|
|
if [[ -f "$ENV_FILE" ]]; then
|
|
set -a
|
|
# shellcheck disable=SC1090
|
|
source "$ENV_FILE"
|
|
set +a
|
|
fi
|
|
|
|
# --- defaults (used when the env file does not set them) -----------------
|
|
: "${MODEL_DIR:=/home/dank/models}"
|
|
: "${MODEL_FILE:=Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf}"
|
|
: "${MMPROJ_FILE:=mmproj-Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive-f16.gguf}"
|
|
: "${LLAMA_SERVER:=/home/dank/llama.cpp/build/bin/llama-server}"
|
|
: "${ALIAS:=frank-default-small}"
|
|
: "${BIND_ADDR:=0.0.0.0}"
|
|
: "${LISTEN_PORT:=7770}"
|
|
: "${CTX_SIZE:=786432}"
|
|
: "${PARALLEL:=3}"
|
|
: "${SPEC_TYPE:=ngram-mod}"
|
|
: "${NGRAM_MOD_N_MIN:=48}"
|
|
: "${NGRAM_MOD_N_MAX:=64}"
|
|
: "${NGRAM_MOD_N_MATCH:=24}"
|
|
: "${CACHE_TYPE_K:=f16}"
|
|
: "${CACHE_TYPE_V:=f16}"
|
|
: "${VERBOSITY:=4}"
|
|
: "${N_CPU_MOE:=38}"
|
|
: "${N_GPU_LAYERS:=all}"
|
|
: "${BATCH_SIZE:=4096}"
|
|
: "${UBATCH_SIZE:=2048}"
|
|
: "${CTX_CHECKPOINTS:=16}"
|
|
: "${NO_MMAP:=1}"
|
|
: "${TEMPERATURE:=1.0}"
|
|
: "${TOP_K:=20}"
|
|
: "${TOP_P:=0.95}"
|
|
: "${MIN_P:=0.0}"
|
|
: "${THREADS:=7}"
|
|
: "${THREADS_HTTP:=8}"
|
|
|
|
MODEL="$MODEL_DIR/$MODEL_FILE"
|
|
MMPROJ="$MODEL_DIR/$MMPROJ_FILE"
|
|
|
|
for f in "$MODEL" "$MMPROJ"; do
|
|
if [[ ! -f "$f" ]]; then
|
|
echo "missing required file: $f" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
if [[ ! -x "$LLAMA_SERVER" ]]; then
|
|
echo "missing llama-server binary: $LLAMA_SERVER" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec "$LLAMA_SERVER" \
|
|
--model "$MODEL" \
|
|
--mmproj "$MMPROJ" \
|
|
--jinja \
|
|
--spec-type "$SPEC_TYPE" \
|
|
--spec-ngram-mod-n-min "$NGRAM_MOD_N_MIN" \
|
|
--spec-ngram-mod-n-max "$NGRAM_MOD_N_MAX" \
|
|
--spec-ngram-mod-n-match "$NGRAM_MOD_N_MATCH" \
|
|
--cache-type-k "$CACHE_TYPE_K" \
|
|
--cache-type-v "$CACHE_TYPE_V" \
|
|
--verbosity "$VERBOSITY" \
|
|
--ctx-size "$CTX_SIZE" \
|
|
--parallel "$PARALLEL" \
|
|
--n-cpu-moe "$N_CPU_MOE" \
|
|
--gpu-layers "$N_GPU_LAYERS" \
|
|
--batch-size "$BATCH_SIZE" \
|
|
--ubatch-size "$UBATCH_SIZE" \
|
|
--ctx-checkpoints "$CTX_CHECKPOINTS" \
|
|
$([ "$NO_MMAP" = "1" ] && printf -- "--no-mmap") \
|
|
--temp "$TEMPERATURE" \
|
|
--top-k "$TOP_K" \
|
|
--top-p "$TOP_P" \
|
|
--min-p "$MIN_P" \
|
|
--threads "$THREADS" \
|
|
--threads-http "$THREADS_HTTP" \
|
|
--alias "$ALIAS" \
|
|
--host "$BIND_ADDR" \
|
|
--port "$LISTEN_PORT"
|