Files
serverAppConfigs/scripts/frank-default-small.env
T

73 lines
3.4 KiB
Bash

# Tunables for frank-default-small (vLLM, dankclaw, Strix Halo gfx1151).
#
# Runtime: vLLM (ROCm) in /home/dank/vllm-venv serving
# Avesed/Qwen3.6-35B-A3B-INT8-W8A8 (compressed-tensors INT8 W8A8, MoE 35B
# total / 3B active, Qwen3.5-MoE hybrid: 30 of 40 layers are GatedDeltaNet
# linear attention). Alias frank-default-small, port 52625.
#
# The ROCm vLLM install was created with:
# uv venv --python /usr/bin/python3.12 /home/dank/vllm-venv
# uv pip install --python /home/dank/vllm-venv vllm --torch-backend=auto
# The --torch-backend=auto resolver pulls the AMD ROCm wheels (torch +
# amd-torch-device-gfx1151 + vllm rocm variant) from the AMD index.
VLLM_BIN=/home/dank/vllm-venv/bin/vllm
# 2026-08-17 (evening): swapped from Avesed/Qwen3.6-35B-A3B-INT8-W8A8 to
# nameistoken/Qwen3.6-35B-A3B-Quark-W8A8-INT8 (AMD Quark W8A8, same
# architecture, vLLM-native expert layout). The Avesed quant's tool-call
# XML fidelity was poor (malformed <function> tags); the Quark model
# follows the Qwen3 XML tool format cleanly.
MODEL=nameistoken/Qwen3.6-35B-A3B-Quark-W8A8-INT8
ALIAS=frank-default-small
BIND_ADDR=0.0.0.0
LISTEN_PORT=52625
# Full native context. The KV cache stays unquantized (auto = model dtype,
# bf16). Worst-case KV at 262144 x 4 sequences is ~10.7 GiB; weights are
# ~35 GiB; total fits the Strix Halo unified pool with room to spare.
MAX_MODEL_LEN=262144
KV_CACHE_DTYPE=auto
# Concurrency and batching (user request). max-num-batched-tokens lowered
# to 8192 on 2026-08-17 (evening). vLLM has no separate ubatch knob.
MAX_NUM_SEQS=4
MAX_NUM_BATCHED_TOKENS=8192
# vLLM has no separate ubatch knob. The scheduler issues one batch per step
# with up to max-num-batched-tokens tokens; the KV cache is preallocated at
# max-model-len. Set gpu-memory-utilization below 1.0 so the unified pool
# keeps headroom for the host.
GPU_MEMORY_UTILIZATION=0.92
# Prefix caching. This model is hybrid (GatedDeltaNet + full attention); vLLM
# keeps prefix caching OPT-IN by default for hybrid models ("while the feature
# matures"), so it is off unless we ask for it. Turning it on reuses the KV of
# the shared prompt prefix (pi re-sends the same system prompt + tool schema
# every turn), so follow-up requests skip re-prefilling thousands of tokens.
# Big TTFT win for the agent loop. Set 0 to disable.
ENABLE_PREFIX_CACHING=1
# ngram speculative decoding (vLLM ngram proposer).
# prompt_lookup_max = ngram window; num_speculative_tokens = draft depth.
NGRAM_LOOKUP_MAX=5
NGRAM_LOOKUP_MIN=1
NUM_SPEC_TOKENS=5
# Tool calling. Clients (pi, OpenWebUI) send tool_choice=auto; without
# --enable-auto-tool-choice vLLM rejects it with HTTP 400. The Avesed
# chat template renders tools in the Qwen3 XML format, so the qwen3_xml
# parser is the matching one. CHAT_TEMPLATE must point at the repo's
# chat_template.jinja (the tokenizer_config.json ships none; vLLM's
# built-in template does not render the XML tool instructions).
ENABLE_AUTO_TOOL_CHOICE=1
TOOL_CALL_PARSER=qwen3_xml
CHAT_TEMPLATE=/home/dank/models/qwen36-chat_template-tools.jinja
# RDNA flash-attention for the vision encoder (and general FA paths).
# Without this, the mm encoder falls back to torch SDPA and the warmup
# OOMs (256 GiB score matrix at max_model_len; measured 2026-08-17).
# Requires the flash_attn package with flash_attn_triton_amd findable
# (the pure-Python copy from the CIRU package plus a flash_attn_2_cuda
# stub; see docs/frank-redo-2026-08-17.md).
FLASH_ATTENTION_TRITON_AMD_ENABLE=TRUE