63 lines
2.8 KiB
Bash
63 lines
2.8 KiB
Bash
# Tunables for frank-default-large (unsloth Qwen3.8-27B UD-Q8_K_XL, dankclaw)
|
|
# Runtime: llama.cpp llama-server (b10433+, rebuilt 2026-08-14 for bundled-MTP
|
|
# support); AMD Strix Halo (gfx1151) 96GB UMA; Ryzen AI MAX+ 395.
|
|
MODEL_DIR=/home/dank/models
|
|
MODEL_FILE=Qwen3.8-27B-UD-Q8_K_XL.gguf
|
|
ALIAS=frank-default-large
|
|
HOST=0.0.0.0
|
|
PORT=7770
|
|
# Context pool. Qwen3.8 native context = 262144 per sequence.
|
|
# 524288 total / PARALLEL 2 = 262144 per slot, matching the pi client's
|
|
# contextWindow=262144 for frank-default-large. Model is 29GB; ROCm has
|
|
# ~70GB headroom, so 2x262k quantized KV fits. Verify at startup.
|
|
CTX_SIZE=524288
|
|
# Parallel slots. 2026-08-15: DSpark multi-slot crashed the ROCm backend
|
|
# (illegal memory access, status 6/ABRT) under two concurrent 16k prose
|
|
# prompts, so DSpark was retired and --spec-default (ngram-mod) is used.
|
|
# ngram-mod is draftless and passed the strict parallel test historically.
|
|
# PARALLEL=2 is the current trial; pin to 1 if the 2x32k stream test fails.
|
|
PARALLEL=2
|
|
# Spec: llama.cpp --spec-default preset = ngram-mod (n_match 24, n_min 48,
|
|
# n_max 64). No draft model. Switched from DSpark 2026-08-15 after the
|
|
# DSpark multi-slot ROCm crash. MTP=1 prepends the bundled in-model MTP
|
|
# head (draft-mtp) before the ngram-mod fallback. See [[qwen3.8-spec-matrix]].
|
|
SPEC_DEFAULT=1
|
|
MTP=1
|
|
SPEC_TYPE=
|
|
DRAFT_FILE=
|
|
SPEC_DRAFT_N_MAX=
|
|
SPEC_DRAFT_P_MIN=
|
|
SPEC_NGRAM_MOD_N_MIN=48
|
|
SPEC_NGRAM_MOD_N_MAX=64
|
|
SPEC_NGRAM_MOD_N_MATCH=24
|
|
# Backend device from --list-devices. Vulkan0 selected 2026-08-15 for high
|
|
# context: at 262144 ctx (~200k prompt) Vulkan generates ~5.7 t/s vs ROCm
|
|
# ~3.8 t/s (48% faster decode), while ROCm prefills ~12% faster (119 vs 106
|
|
# t/s). Generation is the interactive cost, so Vulkan0 wins at high ctx.
|
|
# See docs/bench-high-ctx results and [[qwen3.8-spec-matrix]].
|
|
DEVICE=Vulkan0
|
|
# Dense model: full offload. (Not MoE.)
|
|
N_GPU_LAYERS=all
|
|
# KV on GPU, quantized (K q8_0, V q8_0). Keep K == V for Flash Attention;
|
|
# mixed types silently disable FA (long-context decode collapses).
|
|
CACHE_TYPE_K=q8_0
|
|
CACHE_TYPE_V=q8_0
|
|
# Batch sizing (verified 2026-08-14 on Qwen3.8 UD-Q8_K_XL):
|
|
# ubatch 128 with batch>=2048 -> premature-EOS under concurrency (unsafe).
|
|
# ubatch 512 -> MTP acceptance collapses (~25%) -> gen ~9 t/s (slow).
|
|
# ubatch 256 -> ~30 t/s gen, concurrent-safe, ~330 t/s prefill. WINNER.
|
|
# batch 8192 keeps single-shot prefill flexibility; ubatch drives the graph.
|
|
BATCH_SIZE=8192
|
|
UBATCH_SIZE=256
|
|
# Sampling settings — per Qwen3.8-27B model card thinking mode.
|
|
# Thinking: temp=1.0, top_p=0.95, top_k=20, min_p=0. Clients may override.
|
|
# WARNING: do not name this variable TEMP. The ROCm HIP runtime reads the
|
|
# TEMP environment variable (JIT kernel-cache dir); TEMP=1.0 made the HIP
|
|
# runtime SEGV during model load on Aug 13 2026.
|
|
TEMPERATURE=1.0
|
|
TOP_K=20
|
|
TOP_P=0.95
|
|
MIN_P=0.0
|
|
THREADS=12
|
|
THREADS_HTTP=1
|