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

65 lines
3.1 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: two concurrent 16k prose prompts (high
# prompt-cache reuse) crashed DSpark with 'ROCm error: an illegal memory
# access was encountered' inside per-sequence block sampling
# (ggml_cuda_synchronize in common_speculative_impl_draft_dflash::draft,
# status 6/ABRT, systemd restarted). DSpark multi-slot is NOT safe on this
# box, same class as the DFlash shared-draft-context bug. Pinned to 1 slot
# per user instruction; revisit after an upstream multi-slot DSpark fix.
PARALLEL=1
# Spec: DSpark sidecar draft (magnitudedev/Qwen3.8-27B-DSpark-GGUF Q8_0,
# 1.36B, block_size 7, Markov confidence head). Switched from bundled-MTP
# 2026-08-15 at the user's request. DSpark is the semi-autoregressive
# extension of DFlash (DeepSeek, arXiv 2607.05147): parallel diffusion
# backbone + sequential Markov head + confidence-scheduled verification.
# n_max clamps to the trained block_size 7 (server warning if set higher).
# Parallel safety FAILED on this box (see the PARALLEL=1 note above);
# single-slot only until an upstream multi-slot DSpark fix lands.
# DRAFT_FILE names the sidecar GGUF in MODEL_DIR (downloaded 2026-08-15,
# sha256 b007a76b2ce57c1a3ecf36046543aebf60a763861624647d653f16d336c781d2).
SPEC_TYPE=draft-dspark
DRAFT_FILE=Qwen3.8-27B-DSpark-Q8_0.gguf
SPEC_DRAFT_N_MAX=7
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. ROCm0 is the production backend.
DEVICE=ROCm0
# 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