Files
serverAppConfigs/scripts/serve-frank-small.sh
T
Frank 1cebbf47f6 frank-default-small: swap to nameistoken Quark W8A8 INT8, batch 8192
- Model: nameistoken/Qwen3.6-35B-A3B-Quark-W8A8-INT8 (AMD Quark W8A8,
  vLLM-native expert layout). The Avesed quant emitted malformed Qwen3
  XML tool calls; the Quark model follows the format cleanly.
- max-num-batched-tokens lowered 16384 -> 8192 (user request).
- Chat template: neutral path qwen36-chat_template-tools.jinja (same
  base template; adds a concrete worked tool-call example).
2026-08-17 17:49:27 -07:00

68 lines
2.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Serve Avesed/Qwen3.6-35B-A3B-INT8-W8A8 via vLLM on Dankclaw (Strix Halo).
#
# Runs the ROCm vLLM build in /home/dank/vllm-venv. The model is a
# compressed-tensors INT8 W8A8 quant (MoE, 35B total / 3B active). Full
# 262144 context, unquantized KV cache, 4 concurrent sequences, ngram
# speculative decoding.
#
# Tunables come from frank-default-small.env in this directory unless
# FRANK_SMALL_ENV_FILE 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) -------------------
: "${VLLM_BIN:=/home/dank/vllm-venv/bin/vllm}"
: "${MODEL:=nameistoken/Qwen3.6-35B-A3B-Quark-W8A8-INT8}"
: "${ALIAS:=frank-default-small}"
: "${BIND_ADDR:=0.0.0.0}"
: "${LISTEN_PORT:=52625}"
: "${MAX_MODEL_LEN:=262144}"
: "${KV_CACHE_DTYPE:=auto}"
: "${MAX_NUM_SEQS:=4}"
: "${MAX_NUM_BATCHED_TOKENS:=8192}"
: "${GPU_MEMORY_UTILIZATION:=0.92}"
: "${NGRAM_LOOKUP_MAX:=5}"
: "${NGRAM_LOOKUP_MIN:=1}"
: "${NUM_SPEC_TOKENS:=5}"
: "${ENABLE_AUTO_TOOL_CHOICE:=1}"
: "${TOOL_CALL_PARSER:=qwen3_xml}"
# The Avesed tokenizer_config.json has no chat_template; vLLM would use its
# built-in template which does not render the model's XML tool format. Use
# the repo's chat_template.jinja (ships the <tool_call> instructions).
: "${CHAT_TEMPLATE:=/home/dank/models/qwen36-chat_template-tools.jinja}"
if [[ ! -x "$VLLM_BIN" ]]; then
echo "missing vllm binary: $VLLM_BIN" >&2
exit 1
fi
TOOL_ARGS=()
if [[ "${ENABLE_AUTO_TOOL_CHOICE}" == "1" ]]; then
TOOL_ARGS+=(--enable-auto-tool-choice)
TOOL_ARGS+=(--tool-call-parser "${TOOL_CALL_PARSER}")
fi
exec "$VLLM_BIN" serve "$MODEL" \
--host "$BIND_ADDR" \
--port "$LISTEN_PORT" \
--served-model-name "$ALIAS" \
--max-model-len "$MAX_MODEL_LEN" \
--kv-cache-dtype "$KV_CACHE_DTYPE" \
--max-num-seqs "$MAX_NUM_SEQS" \
--max-num-batched-tokens "$MAX_NUM_BATCHED_TOKENS" \
--gpu-memory-utilization "$GPU_MEMORY_UTILIZATION" \
--speculative-config "{\"method\":\"ngram\",\"prompt_lookup_max\":$NGRAM_LOOKUP_MAX,\"prompt_lookup_min\":$NGRAM_LOOKUP_MIN,\"num_speculative_tokens\":$NUM_SPEC_TOKENS}" \
--reasoning-parser qwen3 \
--trust-remote-code \
--chat-template "$CHAT_TEMPLATE" \
"${TOOL_ARGS[@]}"