Switch to CRACK Q8_0 model (37.8 GB, mmproj f16). Servt as a single 160000-ctx slot (PARALLEL=1); speculative decoding stays disabled. KV cache is q6_0 + Hadamard. iq5_k is not a valid KV-cache type in ik_llama (cache whitelist excludes iq5_*); q8_KV reproduces the ggml.c:5427 view assert even at PARALLEL=1/no-spec, so q6_0 is the verified working 6-bit choice. Env, serve script, tests, and KB updated. Deployment was left down after the isolation test; this commit redeploys it with the verified Q8_0/160k/q6_0 config.
109 lines
4.7 KiB
Bash
109 lines
4.7 KiB
Bash
# Tunables for frank-default-small (Ornith-1.5-35B-A3B CRACK Q8_0, MTP MoE,
|
|
# Dankserver, RTX 3090).
|
|
#
|
|
# Runtime: ik_llama.cpp llama-server (ikawrakow ik_llama.cpp, built
|
|
# 2026-08-26 from commit b166e269) on RTX 3090 24 GB; Ryzen 7 7700X; 62 GB
|
|
# RAM. Previous runtime was upstream llama.cpp b10121. MoE expert weights
|
|
# pinned to CPU with an explicit --override-tensor regex (not --n-cpu-moe).
|
|
# KV cache quantized to iq5_k with Hadamard transforms on both K and V.
|
|
# Split mode none (single GPU; graph would require 2+ devices).
|
|
#
|
|
# Build flags (IK_FA note, see docs/LLM/ikllama-ornith-dankserver.md) must
|
|
# ALWAYS include: -DGGML_CUDA_FA_ALL_QUANTS=ON and -DGGML_IQK_FA_ALL_QUANTS=ON
|
|
# so the quantized + Hadamard KV cache combos compile into the CUDA/CPU FA
|
|
# kernels. Replacing the HauhauCS Qwen3.6-35B-A3B model on 2026-08-24.
|
|
# Switched to CRACK Q8_0 on 2026-08-26 (was Q6_K).
|
|
#
|
|
# 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 keeps the env portable.
|
|
|
|
# Model files (Q8_0 CRACK GGUF + f16 mmproj vision encoder + MTP head bundled
|
|
# in the GGUF). Dealign2026-08-24.
|
|
MODEL_DIR=/home/dank/models/Ornith-1.5-35B-A3B-CRACK
|
|
MODEL_FILE=Ornith-1.5-35B-A3B-CRACK-Q8_0.gguf
|
|
MMPROJ_FILE=mmproj-Ornith-1.5-35B-A3B-f16.gguf
|
|
# ik_llama.cpp llama-server (built 2026-08-26 from ikawrakow/ik_llama.cpp @
|
|
# b166e269; CUDA 13.2, -DGGML_CUDA_FA_ALL_QUANTS=ON -DGGML_IQK_FA_ALL_QUANTS=ON,
|
|
# arch 86 for the RTX 3090). Uses the staged pip cu13 toolkit at
|
|
# /home/dank/cuda13-stage. Rollback: switch to
|
|
# /home/dank/llama.cpp/build/bin/llama-server (upstream b10121).
|
|
LLAMA_SERVER=/home/dank/ik_llama.cpp/build/bin/llama-server
|
|
|
|
# Qwen-Sharp chat template from peculiar-ragdoll (tracked in the repo,
|
|
# staged on the host).
|
|
# Source: https://huggingface.co/peculiar-ragdoll/Qwen-Sharp-Chat-Templates
|
|
CHAT_TEMPLATE_FILE=/home/dank/serverAppConfigs/scripts/chat-template.jinja
|
|
# Render the Qwen-Sharp template with the true Jinja engine (--jinja). Without
|
|
# it ik_llama falls back to built-in non-Jinja handlers and drops the custom
|
|
# template's thinking/image/tool formatting.
|
|
USE_JINJA=1
|
|
|
|
ALIAS=frank-default-small
|
|
BIND_ADDR=0.0.0.0
|
|
LISTEN_PORT=7770
|
|
|
|
# Single parallel slot with 160000 ctx. Note: with PARALLEL=1 speculative
|
|
# decoding would again be allowed by ik_llama; it stays disabled (SPEC_TYPE
|
|
# =none) unless a user asks to re-enable ngram-mod/MTP.
|
|
CTX_SIZE=160000
|
|
PARALLEL=1
|
|
|
|
# Speculative decoding: DISABLED. Spec is possible at PARALLEL=1 but stays
|
|
# off for the low-parameter MoE (3B active of 35B). MTP is also disabled.
|
|
SPEC_TYPE=none
|
|
|
|
# Expert offload via explicit tensor override (replaces --n-cpu-moe). The Q6_K
|
|
# layer audit found 630 MiB of expert tensors per block. Keep every
|
|
# full-attention block plus every block 35-40 on CUDA. The unique GPU set is
|
|
# 3,7,11,15,19,23,27,31,35,36,37,38,39,40. Move all other expert tensors to
|
|
# CPU. All non-expert tensors stay on the 24 GB card. Buffer type "CPU" is the
|
|
# CPU buft name on this host.
|
|
#
|
|
# 2026-08-26: brought back expert blocks 30,32,33,34 to CUDA (~2.5 GiB) to
|
|
# use the ~5.4 GiB GPU headroom for lower latency; then 28,29 (~1.26 GiB)
|
|
# for the fused-MoE run. Left ~1.6 GiB headroom. The remaining larger-CPU
|
|
# range below those stays on CPU.
|
|
OVERRIDE_EXPERT='blk\.(0|1|2|4|5|6|8|9|10|12|13|14|16|17|18|20|21|22|24|25|26)\.ffn_(up|down|gate|gate_up)_(ch|)exps'
|
|
OVERRIDE_BUFT=CPU
|
|
# ik_llama --gpu-layers/-ngl does NOT accept the literal "all"; use 999 to
|
|
# mean "load as many layers as possible". Expert exps are pinned to CPU by
|
|
# OVERRIDE_EXPERT below.
|
|
N_GPU_LAYERS=999
|
|
|
|
# KV cache on GPU at q6_0 (6-bit k-quant) with Hadamard transforms on both
|
|
# caches. q8_KV was also rejected (ggml.c:5427 view assert, arch+build
|
|
# independent of PARALLEL/speculation); q6_0 + Hadamard is the fallback we
|
|
# verified works. Flash-attention is on by default.
|
|
CACHE_TYPE_K=q6_0
|
|
CACHE_TYPE_V=q6_0
|
|
K_CACHE_HADAMARD=1
|
|
V_CACHE_HADAMARD=1
|
|
|
|
# Split mode: none. Dankserver has a single RTX 3090 and ik_llama requires
|
|
# >= 2 devices for split-mode graph ('It is not possible to use split mode
|
|
# graph with less than 2 devices' is a hard load error). none is correct
|
|
# here and still works with OVERRIDE_EXPERT CPU expert offload.
|
|
SPLIT_MODE=none
|
|
|
|
VERBOSITY=4
|
|
# Store context checkpoints in RAM to hold peak GPU memory down.
|
|
CTX_CHECKPOINTS=16
|
|
|
|
# Prefill batch sizing. ubatch 1024 is selected for reduced compute-memory
|
|
# pressure and predictable latency under the ngram-mod deployment.
|
|
BATCH_SIZE=4096
|
|
UBATCH_SIZE=1024
|
|
|
|
# Eager RAM load (expert weights on CPU; ~31 GB RAM).
|
|
NO_MMAP=1
|
|
|
|
# Sampling (Dealign Ornith model card, thinking-general).
|
|
TEMPERATURE=1.0
|
|
TOP_K=20
|
|
TOP_P=0.95
|
|
MIN_P=0.0
|
|
|
|
# Compute threads lowered to 8 so other processes keep a core.
|
|
THREADS=7
|
|
THREADS_HTTP=8 |