# Tunables for frank-default-large (HauhauCS Qwen3.6-27B Q8_K_P, DFlash+ngram-mod, dankclaw) # Runtime: llama.cpp llama-server; AMD Strix Halo (gfx1151) 96GB UMA; Ryzen AI MAX+ 395. MODEL_DIR=/home/dank/models ALIAS=frank-default-large HOST=0.0.0.0 PORT=7770 # 3 parallel slots x 200700 ctx each = 602100 total context pool. CTX_SIZE=602100 PARALLEL=3 # Spec: speculative decoding mode. # draft-dflash - DFlash block-diffusion draft (benchmark winner pre-2026-08-14) # BUT: premature EOS under parallel load when a new task # reuses a cached prompt (shared draft ctx corruption). Retired. # draft-mtp - MTP sidecar draft (a4lg/Qwen3.6-27B-MTP-ONLY-Q8_0.gguf) # ngram-mod - draftless ngram matching (no draft model, no shared ctx) # Benched 2026-08-14: see docs/frank-default-large-benchmark.md for the winner. SPEC_TYPE=draft-mtp # Draft model file (only used when SPEC_TYPE contains 'draft-'). # DFlash: Qwen3.6-27B-DFlash-Q8_0.gguf ; MTP: Qwen3.6-27B-MTP-ONLY-Q8_0.gguf DRAFT_FILE=Qwen3.6-27B-MTP-ONLY-Q8_0.gguf # Draft length per spec type: dflash 8, mtp 2-3. SPEC_DRAFT_N_MAX=3 SPEC_NGRAM_MOD_N_MIN=48 SPEC_NGRAM_MOD_N_MAX=64 SPEC_NGRAM_MOD_N_MATCH=24 # Backend device from --list-devices. ROCm wins on generation; Vulkan renders # DFlash spec unusable (NONE-op abort) and gen is slower on ngram (6.9 t/s). DEVICE=ROCm0 # Dense model (Qwen3.6-27B, not MoE): no MoE CPU offload. Full offload. N_GPU_LAYERS=all # KV on GPU, quantized (K q8_0, V q8_0). V MUST match K: this llama.cpp # build has GGML_CUDA_FA_ALL_QUANTS=OFF, and Flash Attention requires # K type == V type. Mixed q8_0/f16 silently disables FA, collapsing # long-context decode to ~1 t/s at 200k ctx. q8_0 V halves V memory too. CACHE_TYPE_K=q8_0 CACHE_TYPE_V=q8_0 # Batch sizing: empirically verified 2026-08-13 with caches dropped. # batch 8192 / ubatch 2048 loads and serves (61 GiB VRAM peak, ctx 602100). # ubatch is the compute-graph driver; larger ubatch = more VRAM, faster prefill. # Re-verified 2026-08-14 during the spec swap (see benchmark doc). BATCH_SIZE=8192 UBATCH_SIZE=8192 # Sampling settings — per HauhauCS Qwen3.6-27B model card. # Thinking-general: temp=1.0, top_p=0.95, top_k=20, min_p=0. # Clients may override per-request; these are the server-side defaults. # 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 (NULL unref) 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