Files
serverAppConfigs/scripts/frank-default-large.env
T
Frank 57264f7faa record performance fixes: FA_ALL_QUANTS build flag (dankserver), RDNA triton FA env (dankclaw)
- frank-default-large: GGML_CUDA_FA_ALL_QUANTS=ON is mandatory in the
  FastMTP build; without it q8_0 KV + FA falls back to a slow path and
  prefill collapses ~12x (95 -> 1312 t/s at 8K, measured)
- frank-default-small: FLASH_ATTENTION_TRITON_AMD_ENABLE=TRUE + pure-python
  flash_attn (triton_amd) + stub; without it the vision encoder warmup
  OOMs via torch SDPA
2026-08-17 16:30:22 -07:00

63 lines
2.1 KiB
Bash

# Tunables for frank-default-large (llama.cpp, dankserver, RTX 3090).
#
# Runtime: patched llama-server (HauhauCS FastMTP build) serving
# HauhauCS/Qwen3.8-27B-Uncensored-HauhauCS-Aggressive-MTP-GGUF IQ4_XS with
# the FastMTP 32K draft sidecar and the ngram-mod fallback. Single machine,
# no pipeline split. Alias frank-default-large, port 7770.
#
# WARNING: do not name any variable TEMP, HOST, or GPU_MAX_HEAP_SIZE. The ROCm
# HIP runtime reads those bare env vars (see the 2026-08-13 TEMP incident).
# This box is NVIDIA/CUDA, but the rule still applies to keep the env files
# portable.
# Model files (downloaded to this directory from the HF repo).
MODEL_DIR=/home/dank/models/hauhaucs-qwen38
MODEL_FILE=Qwen3.8-27B-Uncensored-HauhauCS-Aggressive-IQ4_XS.gguf
DRAFT_FILE=Qwen3.8-27B-Uncensored-HauhauCS-Aggressive-FastMTP-32K.gguf
# Patched llama.cpp binary. The FastMTP sidecar needs the patch; see AGENTS.md.
# REQUIRED build flags: -DGGML_CUDA_FA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON.
# Without FA_ALL_QUANTS the q8_0 KV + flash attention fall back to a slow
# path and prefill collapses ~12x (95 t/s vs 1300+ t/s at 8K prompt,
# measured 2026-08-17). Do not rebuild without it.
LLAMA_BIN=/home/dank/llama.cpp-fastmtp/build/bin/llama-server
ALIAS=frank-default-large
BIND_ADDR=0.0.0.0
LISTEN_PORT=7770
# Context, single slot. 131072 (128K) leaves ~1.4 GiB VRAM headroom on the
# 3090 with IQ4_XS + FastMTP + K q8_0 / V f16 KV. Lower to 122880 (120K) for
# ~1.8 GiB headroom. KV per token = 16 attention layers x 4 KV heads x 256
# dim: K q8_0 (1088 B/token) + V f16 (2048 B/token) = 3136 B/token/layer.
CTX_SIZE=131072
PARALLEL=1
# Speculative decoding. FastMTP (MTP depth 2) with the ngram-mod fallback.
SPEC_DEFAULT=1
MTP=1
SPEC_DRAFT_N_MAX=2
SPEC_DRAFT_NGL=all
SPEC_DRAFT_P_MIN=0
SPEC_NGRAM_MOD_N_MIN=48
SPEC_NGRAM_MOD_N_MAX=64
SPEC_NGRAM_MOD_N_MATCH=24
# KV quantization on GPU: K q8_0 + V f16 (user request: K=8, V=16).
CACHE_TYPE_K=q8_0
CACHE_TYPE_V=f16
# Batch sizing (user request).
BATCH_SIZE=2048
UBATCH_SIZE=1024
# Sampling - Qwen3.8 thinking-mode defaults.
TEMPERATURE=1.0
TOP_K=20
TOP_P=0.95
MIN_P=0.0
THREADS=8
THREADS_HTTP=1
VERBOSITY=4