merge: Tiel-Coder-35B (dankserver) + Flash-Next 56B (dankclaw) + config-assertion test removal

Dankserver: ik_llama Ornith CRACK Q8_0 → stock llama.cpp Tiel-Coder-35B-A3B (qwen35moe hybrid MoE, --cpu-moe, 200700 ctx / 3 parallel)
Dankclaw: kingjones Q6_0 AGENT → Flash-Next 56B MoE (qwen4exp, PR #27742 merged into ROCmFPX fork, --fit off, 128k ctx)
Removed tests/frank_{small,large}_config.bats (config-assertion tests, not unit tests)
All 199 remaining tests pass. Both services live and verified.
This commit is contained in:
Frank committed 2026-08-26 21:09:01 -07:00
commit e376d6a34e
11 files changed
+191 -237

No files matched your search

File renamed without changes.
File renamed without changes.
+37 -14
View File
@@ -36,8 +36,11 @@ then was reverted the same day for speed. On 2026-08-22 the service briefly
swapped to the Kairic Edge IU4 runtime, then was reverted to v3 the same day swapped to the Kairic Edge IU4 runtime, then was reverted to v3 the same day
(operator decision). On 2026-08-25 the service switched to the kingjones (operator decision). On 2026-08-25 the service switched to the kingjones
Qwen3.8-27B-Uncensored-Q6_0-ROCmFPX_AGENT model (standalone MTP draft, Qwen3.8-27B-Uncensored-Q6_0-ROCmFPX_AGENT model (standalone MTP draft,
262144 context, reasoning on); the previous Q8_0 AGENT model was retired after 262144 context, reasoning on). On 2026-09-01 both services were swapped:
its `set_rows` crash. Runbooks: Dankserver switched from ik_llama.cpp Ornith CRACK Q8_0 to stock llama.cpp
Tiel-Coder-35B (qwen35moe hybrid MoE), and Dankclaw switched from the Q6_0
AGENT model to the Flash-Next 56B MoE (qwen4exp, PR #27742 merged into
charlie's ROCmFPX fork, --fit off, 128k context). Runbooks:
[docs/LLM/index.md](docs/LLM/index.md). [docs/LLM/index.md](docs/LLM/index.md).
Retired scripts live in `old/` (reference only) and `.AGENTTRASH/`. Retired scripts live in `old/` (reference only) and `.AGENTTRASH/`.
@@ -262,23 +265,43 @@ When you rename a service or move a model to a new host, update
## Runtime & Troubleshooting ## Runtime & Troubleshooting
### kingjones Qwen3.8 Uncensored Q6_0 ROCmFPX AGENT llama.cpp (Dankclaw, ACTIVE) ### Qwen3.8-Flash-Next ROCmFP4 STRIX_LEAN llama.cpp (Dankclaw, ACTIVE)
The large service serves `kingjones/Qwen3.8-Uncensored-ROCmFP4-STRIX-MTP` The large service serves
(public) from `/home/dank/models/kingjones-Qwen3.8-27B-STRIX-MTP/` with a `kingjones777/Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN-GGUF` (public, 98.5 GiB)
charlie12345/ROCmFPX `llama-server` (build `build-promptforge`). It runs a from `/home/dank/models/kingjones-Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN/`
standalone MTP draft head on ROCm0, f16 K + TurboQuant V KV cache, a full with a charlie12345/ROCmFPX `llama-server` built at
262144 context / 1 slot, and reasoning on (Sharp template, budget -1, `/home/dank/GitPackages/ROCmFPX/build-qwen38` (PR #27742 qwen4exp architecture
`--reasoning-format none`; chat kwargs keep `preserve_thinking` + merged). The model is a 56B MoE (512 experts, 10 used), 48 layers (12 attn +
`preserve_reasoning`). The Q6_0 main model is 24.86 GB. Env 36 SSM, full_attention_interval=4), QSA indexer (4 heads, top_k=2048),
`scripts/frank-default-large.env`, serve `scripts/serve-frank-large.sh`, and hyper-connections (count=4, low_rank=320), PLE (layer 1). Q4_0_ROCMFP4 quant.
runbook `docs/LLM/kingjones-q8agent-rocmfpx.md` define the deployment. It runs f16 KV cache, 131072 context / 1 slot, `--fit off` (auto-fit segfaults
on qwen4exp hyper-connection config), and reasoning on (Sharp template, budget
-1, `--reasoning-format deepseek`; chat kwargs keep `preserve_thinking` +
`preserve_reasoning`). Env `scripts/frank-default-large.env`, serve
`scripts/serve-frank-large.sh`.
**Serving status (2026-09-01):** restored the previously deployed Q6_0 AGENT **Serving status (2026-09-01):** deployed the Flash-Next 56B MoE model. The
model. The Q8_0 AGENT experiment is documented in previous kingjones Q6_0 AGENT model (27B, standalone MTP, 262144 context) is
retired. The Q8_0 AGENT experiment is documented in
`docs/LLM/kingjones-q8agent-rocmfpx.md`; it was retired because it crashed in `docs/LLM/kingjones-q8agent-rocmfpx.md`; it was retired because it crashed in
`ggml_compute_forward_set_rows` and did not provide a working service. `ggml_compute_forward_set_rows` and did not provide a working service.
### Tiel-Coder-35B-A3B llama.cpp (Dankserver, ACTIVE)
The small service serves `peculiar-ragdoll/Tiel-Coder-35B-A3B-GGUF` (public,
30 GB, UD-Q6_K_XL quant) from `/home/dank/models/tiel-coder-35b/` with
upstream llama.cpp (latest master, CUDA build with
`-DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_CUDA_ARCHITECTURES=86`). The model is a
qwen35moe hybrid MoE: 40 layers (10 attention + 30 SSM/Mamba,
full_attention_interval=4), 256 experts / 8 used, 2 KV heads × 256 dim. It
runs Q8_0 KV cache, 200700 total context (66900/slot × 3 parallel), `--cpu-moe`
for expert offload, `-ngl 999` (non-expert on GPU), and mmap. Env
`scripts/frank-default-small.env`, serve `scripts/serve-frank-small.sh`.
**Serving status (2026-09-01):** deployed the Tiel-Coder-35B model. The
previous ik_llama.cpp Ornith CRACK Q8_0 deployment is retired.
### charlie12345/ROCmFPX ROCmI4 W4A4 llama.cpp (Dankclaw, prior v3, 2026-08-18 to 2026-08-25) ### charlie12345/ROCmFPX ROCmI4 W4A4 llama.cpp (Dankclaw, prior v3, 2026-08-18 to 2026-08-25)
The v4 runtime serves `cafonz/Qwen3.8-27B-ROCmI4-MTP-GGUF` (`eemin` namespace, The v4 runtime serves `cafonz/Qwen3.8-27B-ROCmI4-MTP-GGUF` (`eemin` namespace,
+42 -38
View File
@@ -1,30 +1,42 @@
# Tunables for frank-default-large (kingjones Qwen3.8 Uncensored Q6 AGENT, # Tunables for frank-default-large (kingjones777 Qwen3.8-Flash-Next
# dankclaw, Strix Halo gfx1151). # ROCmFP4 STRIX_LEAN, qwen4exp hybrid MoE, Dankclaw, Strix Halo gfx1151).
# #
# Runtime: ROCmFPX llama.cpp with TurboQuant support. Serves the kingjones # Runtime: ROCmFPX llama.cpp fork with PR #27742 (qwen4exp architecture)
# AGENT GGUF plus its standalone MTP draft and vision projector. Alias # merged and built at /home/dank/GitPackages/ROCmFPX/build-qwen38.
# frank-default-large, port 7770. # Build flags: -DGGML_HIP=ON -DGGML_HIP_ROCMI4_W4A4=ON
# -DCMAKE_HIP_ARCHITECTURES=gfx1151 -DGGML_CUDA_FA_ALL_QUANTS=ON
# -DLLAMA_BUILD_WEBUI=OFF -DCMAKE_EXE_LINKER_FLAGS=-no-pie.
# Replaced the kingjones Qwen3.8-27B Q6_0 AGENT deployment on 2026-09-01.
#
# Model: kingjones777/Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN-GGUF.
# 56B MoE (512 experts, 10 used), 48 layers (12 attention + 36 SSM,
# full_attention_interval=4), 2 KV heads × 256 dim, embedding 2560,
# QSA indexer (4 heads, key_length 128, top_k 2048), hyper-connections
# (count=4, low_rank=320), PLE (layer 1, ngram_size=3, heads_per_ngram=8).
# Q4_0_ROCMFP4_STRIX_LEAN quant, 98.5 GiB, 3-part GGUF split.
# Text-only (no mmproj, no MTP draft head).
#
# Context: 131072 (128k) × 1 slot. f16 KV cache. --fit off because the
# auto-fit code segfaults on this model's hyper-connection/indexer config;
# -ngl 999 places all layers on the SVM-backed GPU pool (116 GiB unified).
#
# 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). llama.cpp reads --host/--port/--temp as CLI flags, never as
# env vars.
# WARNING: do not name any variable TEMP, HOST, or GPU_MAX_HEAP_SIZE. The ROCm # ROCmFPX llama-server (PR #27742 merged, build-qwen38).
# HIP runtime reads those bare env vars (see the 2026-08-13 TEMP incident). LLAMA_BIN=/home/dank/GitPackages/ROCmFPX/build-qwen38/bin/llama-server
# llama.cpp reads --host/--port/--temp as CLI flags, never as env vars.
# PromptForge ROCmFPX build and its historical ROCm 7.15 SDK environment. # Model files from
LLAMA_BIN=/home/dank/ciru-qwen38/ROCmFPX/build-promptforge/bin/llama-server # https://huggingface.co/kingjones777/Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN-GGUF
ROCM_DEVEL=/home/dank/ling3-ciru/Ling-3.0-Flash-CIRU-int4-Strix-native/.venv/lib/python3.12/site-packages/_rocm_sdk_devel MODEL_DIR=/home/dank/models/kingjones-Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN
ROCM_LIB=/home/dank/ling3-ciru/Ling-3.0-Flash-CIRU-int4-Strix-native/.venv/lib/python3.12/site-packages/_rocm_sdk_libraries MODEL_FILE=Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN-00001-of-00003.gguf
ROCM_CORE=/home/dank/ling3-ciru/Ling-3.0-Flash-CIRU-int4-Strix-native/.venv/lib/python3.12/site-packages/_rocm_sdk_core
# Model files from https://huggingface.co/kingjones777/Qwen3.8-27B-Uncensored-ROCmFP4-STRIX-MTP-GGUF. # Qwen-Sharp chat template (tracked in the repo, staged on the host). The
MODEL_DIR=/home/dank/models/kingjones-Qwen3.8-27B-STRIX-MTP # Sharp template drives thinking on by default (medium effort); the server
MODEL_FILE=Qwen3.8-27B-Uncensored-Q6_0_ROCMFPX_AGENT.gguf # emits reasoning in DeepSeek format so clients receive reasoning_content
MTP_DRAFT_FILE=$MODEL_DIR/mtp-Qwen3.8-27B-Q4_0.gguf # separately instead of literal thinking tags in content.
MMPROJ_FILE=mmproj-Qwen3.8-27B-Q8_0.gguf
# Qwen-Sharp chat template (tracked in the repo, staged on the host). The Sharp
# template drives thinking on by default (medium effort); the server emits
# reasoning in DeepSeek format so clients receive reasoning_content separately
# instead of literal <think> tags in content.
CHAT_TEMPLATE_FILE=/home/dank/serverAppConfigs/scripts/chat-template.jinja CHAT_TEMPLATE_FILE=/home/dank/serverAppConfigs/scripts/chat-template.jinja
CHAT_TEMPLATE_KWARGS='{"enable_thinking":true,"preserve_thinking":true,"preserve_reasoning":true}' CHAT_TEMPLATE_KWARGS='{"enable_thinking":true,"preserve_thinking":true,"preserve_reasoning":true}'
@@ -33,14 +45,12 @@ ALIAS=frank-default-large
BIND_ADDR=0.0.0.0 BIND_ADDR=0.0.0.0
LISTEN_PORT=7770 LISTEN_PORT=7770
# Serving: 262144 context (the model's maximum), 1 slot. f16 KV, context # Serving: 131072 context (128k) × 1 slot. f16 KV, context checkpoints,
# checkpoints, prompt cache, standalone MTP draft on ROCm0. The full 262144 # prompt cache. The model is 98.5 GiB loaded via mmap into the Strix Halo
# context KV cache plus the ~28-30 GB Q8 model + MTP draft + mmproj fit in the # unified memory pool (116 GiB SVM-backed). --fit off avoids the auto-fit
# lifted 114 GiB TTM/GTT budget on the Strix Halo (see the GTT 114 GiB change). # segfault on this model's qwen4exp hyper-connection/indexer configuration.
# Concurrent requests queue; the server never preempts a running generation. CTX_SIZE=131072
CTX_SIZE=262144
PARALLEL=1 PARALLEL=1
# Batch/ubatch follow the existing qualified Dankclaw profile.
BATCH_SIZE=4096 BATCH_SIZE=4096
UBATCH_SIZE=4096 UBATCH_SIZE=4096
NUM_THREADS=16 NUM_THREADS=16
@@ -49,12 +59,7 @@ CACHE_TYPE_K=f16
CACHE_TYPE_V=f16 CACHE_TYPE_V=f16
CTX_CHECKPOINTS=16 CTX_CHECKPOINTS=16
CACHE_RAM=8192 CACHE_RAM=8192
FIT=off
# Standalone MTP draft head, loaded from MTP_DRAFT_FILE by the serve script.
MTP_N_MAX=4
MTP_N_MIN=0
MTP_P_MIN=0.0
MTP_P_SPLIT=0.10
# Sampling (Sharp default). # Sampling (Sharp default).
TEMPERATURE=0.7 TEMPERATURE=0.7
@@ -69,8 +74,7 @@ PRESENCE_PENALTY=1.5
REASONING=on REASONING=on
REASONING_FORMAT=deepseek REASONING_FORMAT=deepseek
# Strix Halo unified memory + native gfx1151 detection for this ROCmFPX build. # Strix Halo unified memory + native gfx1151.
HSA_OVERRIDE_GFX_VERSION=11.5.1 HSA_OVERRIDE_GFX_VERSION=11.5.1
GGML_HIP_ENABLE_UNIFIED_MEMORY=1
VERBOSITY=4 VERBOSITY=4
+1 -1
View File
@@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Kairic Edge ROCmFPX llama.cpp Qwen3.8-27B IU4 + MTP (dankclaw, frank-default-large) Description=ROCmFPX llama.cpp Qwen3.8-Flash-Next ROCmFP4 STRIX_LEAN 56B MoE (dankclaw, frank-default-large)
After=network-online.target After=network-online.target
Wants=network-online.target Wants=network-online.target
+41 -80
View File
@@ -1,110 +1,71 @@
# Tunables for frank-default-small (Ornith-1.5-35B-A3B CRACK Q8_0, MTP MoE, # Tunables for frank-default-small (Tiel-Coder-35B-A3B UD-Q6_K_XL,
# Dankserver, RTX 3090). # qwen35moe hybrid MoE, Dankserver, RTX 3090).
# #
# Runtime: ik_llama.cpp llama-server (ikawrakow ik_llama.cpp, built # Runtime: upstream llama.cpp (latest master, CUDA build with
# 2026-08-26 from commit b166e269) on RTX 3090 24 GB; Ryzen 7 7700X; 62 GB # -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_CUDA_ARCHITECTURES=86) on RTX 3090
# RAM. Previous runtime was upstream llama.cpp b10121. MoE expert weights # 24 GB; Ryzen 7 7700X; 62 GB RAM. Replaced the ik_llama.cpp Ornith
# pinned to CPU with an explicit --override-tensor regex (not --n-cpu-moe). # CRACK Q8_0 deployment on 2026-09-01.
# KV cache K q8_0 / V q5_0 with Hadamard transforms on both (see the KV
# section below). Split mode none (single GPU; graph would require 2+).
# #
# Build flags (IK_FA note, see docs/LLM/ikllama-ornith-dankserver.md) must # Model: peculiar-ragdoll/Tiel-Coder-35B-A3B-GGUF, UD-Q6_K_XL quant
# ALWAYS include: -DGGML_CUDA_FA_ALL_QUANTS=ON and -DGGML_IQK_FA_ALL_QUANTS=ON # (30 GB). Architecture: qwen35moe — 40 layers, full_attention_interval=4
# so the quantized + Hadamard KV cache combos compile into the CUDA/CPU FA # (10 attention + 30 SSM/Mamba), 256 experts / 8 used, 2 KV heads × 256
# kernels. Replacing the HauhauCS Qwen3.6-35B-A3B model on 2026-08-24. # dim, embedding 2048, rope dimension_count 64, rope freq_base 10 000 000.
# Switched to CRACK Q8_0 on 2026-08-26 (was Q6_K). # Text-only (no mmproj). Built-in chat template in the GGUF.
#
# Expert offload: --cpu-moe keeps all 256 expert weights in CPU RAM.
# Non-expert weights (~1.6 GB) fit entirely on the 24 GB card.
#
# KV cache: Q8_0 for both K and V. With CTX_SIZE=200700 (66 900 per slot
# × 3 parallel) and 10 attention layers, the KV cache is ~2 GB — the
# requested 2 GB VRAM buffer.
# #
# WARNING: do not name any variable TEMP, HOST, or GPU_MAX_HEAP_SIZE. The # 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 # 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. # 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 # Model file (UD-Q6_K_XL, 30 GB, text-only MoE hybrid).
# in the GGUF). Dealign2026-08-24. MODEL_DIR=/home/dank/models/tiel-coder-35b
MODEL_DIR=/home/dank/models/Ornith-1.5-35B-A3B-CRACK MODEL_FILE=Tiel-Coder-35B-A3B-UD-Q6_K_XL.gguf
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, # Upstream llama.cpp llama-server (CUDA build, latest master).
# staged on the host). # Built with -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_CUDA_ARCHITECTURES=86
# Source: https://huggingface.co/peculiar-ragdoll/Qwen-Sharp-Chat-Templates # using the staged CUDA 13.2 toolkit at /home/dank/cuda13-stage.
CHAT_TEMPLATE_FILE=/home/dank/serverAppConfigs/scripts/chat-template.jinja LLAMA_SERVER=/home/dank/llama.cpp/build/bin/llama-server
# 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 ALIAS=frank-default-small
BIND_ADDR=0.0.0.0 BIND_ADDR=0.0.0.0
LISTEN_PORT=7770 LISTEN_PORT=7770
# Three parallel slots sharing a 491520 total context pool (491520/3 = # Total context budget across all parallel slots. 200700 / 3 = 66 900
# 163840 per slot — the requested 160k). With PARALLEL=3 ik_llama limits # per slot. The model's context_length is 262 144, so 66 900 is well
# speculative decoding to a single slot, so SPEC stays none (MTP is also # within range.
# disabled). The 3 slots + 480k pool make the KV cache large, so expert CTX_SIZE=200700
# weights are CPU-pinned for the cache to fit on the 24 GB card.
CTX_SIZE=491520
PARALLEL=3 PARALLEL=3
# Speculative decoding: DISABLED. ik_llama limits spec to a single slot; at # Expert offload: all MoE expert weights pinned to CPU RAM.
# PARALLEL=3 a configured spec stage hard-exits at load. The low-parameter CPU_MOE=1
# MoE (3B active of 35B) does not need it anyway. MTP is also disabled.
SPEC_TYPE=none
# Expert offload via explicit tensor override (replaces --n-cpu-moe). The Q8_0 # All non-expert layers on GPU (auto-fit will determine the exact count;
# audit found ~1088 MiB of expert tensors per block (4 tensor × 272 MiB). Keep # with --cpu-moe the non-expert footprint is ~1.6 GB, leaving ample room).
# every final/output-adjacent block 35-40 on CUDA; full-attention blocks 3,7,
# 11,15,19,23 have no exps and are untouched by this regex. All other expert
# tensors are pinned to CPU. Buffer type "CPU" is the CPU buft on this host.
#
# 2026-08-26: PARALLEL=3 (CTX 160000) triples the KV cache, so the blocks
# that were moved back to CUDA for fused-MoE (27-34) are pinned to CPU again
# to free GPU. Blocks 35-40 stay on CUDA. If it boot-loops, move the next
# lower block into the CPU regex one at a time.
OVERRIDE_EXPERT='blk\.(0|1|2|4|5|6|8|9|10|12|13|14|16|17|18|20|21|22|24|25|26|27|28|29|30|31|32|33|34)\.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 N_GPU_LAYERS=999
# KV cache on GPU: K back at the default f16 (no Hadamard on K; the K # KV cache: Q8_0 for both K and V. ~2 GB total for 200700 ctx × 3 slots
# cache is kept full-precision so it does not need the transform), and V at # × 10 attention layers × (2 KV heads × 256 dim × 1 byte) × 2 (K+V).
# q6_0 (6-bit k-quant) with Hadamard. Flash-attention is on by default. CACHE_TYPE_K=q8_0
CACHE_TYPE_K=f16 CACHE_TYPE_V=q8_0
CACHE_TYPE_V=q6_0
K_CACHE_HADAMARD=0
V_CACHE_HADAMARD=1
# Split mode: none. Dankserver has a single RTX 3090 and ik_llama requires VERBOSITY=2
# >= 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 # Prefill batch sizing.
# 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 BATCH_SIZE=4096
UBATCH_SIZE=1024 UBATCH_SIZE=1024
# Eager RAM load (expert weights on CPU; ~31 GB RAM). # Sampling.
NO_MMAP=1
# Sampling (Dealign Ornith model card, thinking-general).
TEMPERATURE=1.0 TEMPERATURE=1.0
TOP_K=20 TOP_K=20
TOP_P=0.95 TOP_P=0.95
MIN_P=0.0 MIN_P=0.0
# Compute threads lowered to 8 so other processes keep a core. # Compute threads lowered so other processes keep a core.
THREADS=7 THREADS=7
THREADS_HTTP=8 THREADS_HTTP=8
+1 -1
View File
@@ -1,5 +1,5 @@
[Unit] [Unit]
Description=llama.cpp Ornith-1.5-35B-A3B CRACK Q6_K ngram-mod + Qwen-Sharp template (dankserver, frank-default-small) Description=llama.cpp Tiel-Coder-35B-A3B Q6_K_XL qwen35moe hybrid MoE (dankserver, frank-default-small)
After=network-online.target After=network-online.target
Wants=network-online.target Wants=network-online.target
+33 -36
View File
@@ -1,6 +1,25 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Serve the kingjones Qwen3.8 Uncensored Q6 AGENT model as frank-default-large. # Serve kingjones777/Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN as
# The deployment uses a standalone MTP draft head and f16 KV cache. # frank-default-large via the charlie12345/ROCmFPX llama.cpp fork with
# PR #27742 (qwen4exp architecture) merged, on Dankclaw (Strix Halo
# gfx1151, unified memory).
#
# Runtime: ROCmFPX llama.cpp built at
# /home/dank/GitPackages/ROCmFPX/build-qwen38/bin/llama-server
# with -DGGML_HIP=ON -DGGML_HIP_ROCMI4_W4A4=ON
# -DCMAKE_HIP_ARCHITECTURES=gfx1151 -DLLAMA_BUILD_WEBUI=OFF.
#
# Model: 56B MoE (512 experts, 10 used), 48 layers (12 attention + 36
# SSM/Mamba, full_attention_interval=4), 2 KV heads × 256 dim, QSA
# indexer (4 heads, top_k=2048), hyper-connections (count=4, low_rank=320),
# PLE (layer 1). Q4_0_ROCMFP4_STRIX_LEAN quant, 98.5 GiB, 3-part split.
#
# Context: 131072 (128k) × 1 slot. f16 KV cache. Model is loaded with
# mmap (default) — the 98.5 GiB file is memory-mapped; the Strix Halo
# unified memory (116 GiB SVM-backed) provides the GPU address space.
# --fit off is set because the auto-fit code segfaults on this model's
# hyper-connection/indexer configuration; -ngl 999 places all layers on
# the GPU (SVM-backed), which the unified memory pool handles.
# #
# The Qwen-Sharp chat template (scripts/chat-template.jinja) is applied at # The Qwen-Sharp chat template (scripts/chat-template.jinja) is applied at
# runtime so the model emits reasoning in DeepSeek format; the reasoning # runtime so the model emits reasoning in DeepSeek format; the reasoning
@@ -17,17 +36,15 @@ if [[ -f "$ENV_FILE" ]]; then
fi fi
# --- defaults (used when the env file does not set them) ------------------- # --- defaults (used when the env file does not set them) -------------------
: "${LLAMA_BIN:=/home/dank/ciru-qwen38/ROCmFPX/build-promptforge/bin/llama-server}" : "${LLAMA_BIN:=/home/dank/GitPackages/ROCmFPX/build-qwen38/bin/llama-server}"
: "${MODEL_DIR:=/home/dank/models/kingjones-Qwen3.8-27B-STRIX-MTP}" : "${MODEL_DIR:=/home/dank/models/kingjones-Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN}"
: "${MODEL_FILE:=Qwen3.8-27B-Uncensored-Q6_0_ROCMFPX_AGENT.gguf}" : "${MODEL_FILE:=Qwen3.8-Flash-Next-ROCmFP4-STRIX_LEAN-00001-of-00003.gguf}"
: "${MTP_DRAFT_FILE:=$MODEL_DIR/mtp-Qwen3.8-27B-Q4_0.gguf}"
: "${MMPROJ_FILE:=mmproj-Qwen3.8-27B-Q8_0.gguf}"
: "${CHAT_TEMPLATE_FILE:=$SCRIPT_DIR/chat-template.jinja}" : "${CHAT_TEMPLATE_FILE:=$SCRIPT_DIR/chat-template.jinja}"
: "${CHAT_TEMPLATE_KWARGS:={}}" : "${CHAT_TEMPLATE_KWARGS:={}}"
: "${ALIAS:=frank-default-large}" : "${ALIAS:=frank-default-large}"
: "${BIND_ADDR:=0.0.0.0}" : "${BIND_ADDR:=0.0.0.0}"
: "${LISTEN_PORT:=7770}" : "${LISTEN_PORT:=7770}"
: "${CTX_SIZE:=262144}" : "${CTX_SIZE:=131072}"
: "${PARALLEL:=1}" : "${PARALLEL:=1}"
: "${BATCH_SIZE:=4096}" : "${BATCH_SIZE:=4096}"
: "${UBATCH_SIZE:=4096}" : "${UBATCH_SIZE:=4096}"
@@ -37,21 +54,18 @@ fi
: "${CACHE_TYPE_V:=f16}" : "${CACHE_TYPE_V:=f16}"
: "${CTX_CHECKPOINTS:=16}" : "${CTX_CHECKPOINTS:=16}"
: "${CACHE_RAM:=8192}" : "${CACHE_RAM:=8192}"
: "${MTP_N_MAX:=4}" : "${FIT:=off}"
: "${MTP_N_MIN:=0}"
: "${MTP_P_MIN:=0.0}"
: "${MTP_P_SPLIT:=0.10}"
: "${TEMPERATURE:=0.7}" : "${TEMPERATURE:=0.7}"
: "${TOP_K:=20}" : "${TOP_K:=20}"
: "${TOP_P:=0.8}" : "${TOP_P:=0.8}"
: "${MIN_P:=0.0}" : "${MIN_P:=0.0}"
: "${PRESENCE_PENALTY:=1.5}" : "${PRESENCE_PENALTY:=1.5}"
: "${REASONING:=off}" : "${REASONING:=on}"
: "${REASONING_FORMAT:=none}" : "${REASONING_FORMAT:=deepseek}"
: "${HSA_OVERRIDE_GFX_VERSION:=11.5.1}" : "${HSA_OVERRIDE_GFX_VERSION:=11.5.1}"
MODEL="$MODEL_DIR/$MODEL_FILE" MODEL="$MODEL_DIR/$MODEL_FILE"
for f in "$LLAMA_BIN" "$MODEL" "$MTP_DRAFT_FILE" "$MODEL_DIR/$MMPROJ_FILE" "$CHAT_TEMPLATE_FILE"; do for f in "$LLAMA_BIN" "$MODEL" "$CHAT_TEMPLATE_FILE"; do
if [[ ! -r "$f" ]]; then if [[ ! -r "$f" ]]; then
echo "missing or unreadable required artifact: $f" >&2 echo "missing or unreadable required artifact: $f" >&2
exit 1 exit 1
@@ -61,22 +75,16 @@ if [[ ! -x "$LLAMA_BIN" ]]; then
echo "missing executable runtime: $LLAMA_BIN" >&2 echo "missing executable runtime: $LLAMA_BIN" >&2
exit 1 exit 1
fi fi
SERVER_DIR="$(cd -- "$(dirname -- "$LLAMA_BIN")" && pwd)" SERVER_DIR="$(cd -- "$(dirname -- "$LLAMA_BIN")" && pwd)"
ROCM_PATH="${ROCM_DEVEL:-${ROCM_PATH:-/opt/rocm}}" ROCM_PATH="${ROCM_PATH:-/opt/rocm}"
if [[ -n "${ROCM_LIB:-}" && -n "${ROCM_CORE:-}" ]]; then LIBRARY_PATH="$SERVER_DIR:$ROCM_PATH/lib:$ROCM_PATH/lib/rocm_sysdeps/lib:$ROCM_PATH/lib/llvm/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
LIBRARY_PATH="$ROCM_LIB/lib:$ROCM_CORE/lib:$ROCM_DEVEL/lib/llvm/lib:$SERVER_DIR:${LD_LIBRARY_PATH:-}"
else
LIBRARY_PATH="$SERVER_DIR:$ROCM_PATH/lib:$ROCM_PATH/lib/rocm_sysdeps/lib:$ROCM_PATH/lib/llvm/lib:$ROCM_PATH/llvm/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
fi
exec /usr/bin/env \ exec /usr/bin/env \
ROCM_PATH="$ROCM_PATH" \ ROCM_PATH="$ROCM_PATH" \
HIP_VISIBLE_DEVICES=0 \ HIP_VISIBLE_DEVICES=0 \
LD_LIBRARY_PATH="$LIBRARY_PATH" \ LD_LIBRARY_PATH="$LIBRARY_PATH" \
HSA_OVERRIDE_GFX_VERSION="$HSA_OVERRIDE_GFX_VERSION" \ HSA_OVERRIDE_GFX_VERSION="$HSA_OVERRIDE_GFX_VERSION" \
GGML_CUDA_GRAPH_OPT=0 \
LLAMA_TARGET_GREEDY_ARGMAX_FASTPATH=0 \
LLAMA_MTP_CPU_ARGMAX_FASTPATH=1 \
"$LLAMA_BIN" \ "$LLAMA_BIN" \
--model "$MODEL" \ --model "$MODEL" \
--alias "$ALIAS" \ --alias "$ALIAS" \
@@ -91,6 +99,7 @@ exec /usr/bin/env \
--ctx-size "$CTX_SIZE" \ --ctx-size "$CTX_SIZE" \
--batch-size "$BATCH_SIZE" \ --batch-size "$BATCH_SIZE" \
--ubatch-size "$UBATCH_SIZE" \ --ubatch-size "$UBATCH_SIZE" \
--fit "$FIT" \
--flash-attn on \ --flash-attn on \
--cache-type-k "$CACHE_TYPE_K" \ --cache-type-k "$CACHE_TYPE_K" \
--cache-type-v "$CACHE_TYPE_V" \ --cache-type-v "$CACHE_TYPE_V" \
@@ -101,18 +110,6 @@ exec /usr/bin/env \
--cache-prompt \ --cache-prompt \
--cache-idle-slots \ --cache-idle-slots \
--metrics \ --metrics \
--spec-type draft-mtp \
--model-draft "$MTP_DRAFT_FILE" \
--mmproj "$MODEL_DIR/$MMPROJ_FILE" \
--spec-draft-device ROCm0 \
--spec-draft-ngl 999 \
--spec-draft-type-k "$CACHE_TYPE_K" \
--spec-draft-type-v "$CACHE_TYPE_V" \
--spec-draft-n-max "$MTP_N_MAX" \
--spec-draft-n-min "$MTP_N_MIN" \
--spec-draft-p-min "$MTP_P_MIN" \
--spec-draft-p-split "$MTP_P_SPLIT" \
--spec-draft-backend-sampling \
--temp "$TEMPERATURE" \ --temp "$TEMPERATURE" \
--top-p "$TOP_P" \ --top-p "$TOP_P" \
--top-k "$TOP_K" \ --top-k "$TOP_K" \
+28 -62
View File
@@ -1,28 +1,24 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Serve dealignai/Ornith-1.5-35B-A3B-UNCENSORED (CRACK, Q8_0) as # Serve peculiar-ragdoll/Tiel-Coder-35B-A3B (UD-Q6_K_XL) as
# frank-default-small via ik_llama.cpp on Dankserver (RTX 3090, MoE # frank-default-small via stock llama.cpp on Dankserver (RTX 3090).
# experts on CPU).
# #
# Runtime: ik_llama.cpp llama-server (ikawrakow ik_llama.cpp). The model is a # Runtime: upstream llama.cpp (latest master, CUDA build with
# 35B-total / 3B-active MoE-dense hybrid with an MTP head bundled in the GGUF. # -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_CUDA_ARCHITECTURES=86).
# Three parallel slots (PARALLEL=3), each with 160000 ctx. Speculative decoding # The model is a 35B-total / 8-active MoE hybrid (qwen35moe arch) with
# is disabled (ik_llama limits spec to a single slot). # SSM/Mamba layers (full_attention_interval=4: 10 attention + 30 SSM
# layers out of 40). 256 experts, 8 used per token.
# #
# KV cache: K at the default f16 (no Hadamard), V at q6_0 with Hadamard. # Expert offload: --cpu-moe keeps all 256 expert weights in CPU RAM.
# (requires a build with GGML_CUDA_FA_ALL_QUANTS=ON + GGML_IQK_FA_ALL_QUANTS # Non-expert weights (attention, SSM, shared expert, embeddings, output)
# =ON; see the env file). q8_KV crashes at init on this arch (ggml.c:5427); # are ~1.6 GB and fit entirely on the 24 GB RTX 3090.
# V uses q6_0 instead.#
# Split mode is none: Dankserver has a single RTX 3090 and ik_llama rejects
# split-mode graph with fewer than 2 devices (hard load error).
# #
# Expert offload: the expert (FFN exps) tensors selected by the layer-bounded # KV cache: Q8_0 for both K and V. With CTX_SIZE=200700 (66 900 per
# --override-tensor pattern are pinned to CPU. Selected full-attention and # slot × 3 parallel) and 10 attention layers (2 KV heads × 256 dim),
# final output-adjacent blocks stay on CUDA with all non-expert tensors, # the KV cache is ~2 GB — the requested 2 GB VRAM buffer.
# without relying on MTP speculation. #
# Model is loaded with mmap (default). The 30 GB Q6_K_XL file is
# memory-mapped; only accessed pages enter RAM.
# #
# Speculative decoding: disabled (none). MTP is also intentionally disabled.
# A low-parameter MoE (3B active) does not need speculation here.#
# Tunables come from frank-default-small.env unless FRANK_SMALL_ENV_FILE # Tunables come from frank-default-small.env unless FRANK_SMALL_ENV_FILE
# overrides that path. # overrides that path.
set -euo pipefail set -euo pipefail
@@ -37,38 +33,21 @@ if [[ -f "$ENV_FILE" ]]; then
fi fi
# --- defaults (used when the env file does not set them) ----------------- # --- defaults (used when the env file does not set them) -----------------
: "${MODEL_DIR:=/home/dank/models}" : "${MODEL_DIR:=/home/dank/models/tiel-coder-35b}"
: "${MODEL_FILE:=Ornith-1.5-35B-A3B-CRACK-Q8_0.gguf}" : "${MODEL_FILE:=Tiel-Coder-35B-A3B-UD-Q6_K_XL.gguf}"
: "${MMPROJ_FILE:=mmproj-Ornith-1.5-35B-A3B-f16.gguf}"
: "${LLAMA_SERVER:=/home/dank/llama.cpp/build/bin/llama-server}" : "${LLAMA_SERVER:=/home/dank/llama.cpp/build/bin/llama-server}"
: "${CHAT_TEMPLATE_FILE:=$SCRIPT_DIR/chat-template.jinja}"
# Render the Qwen-Sharp template with the true Jinja engine. ik_llama only
# applies --chat-template-file as real Jinja when --jinja is passed;
# otherwise it falls back to built-in non-Jinja handlers and silently drops
# the custom template's thinking/image/tool formatting.
: "${USE_JINJA:=1}"
: "${ALIAS:=frank-default-small}" : "${ALIAS:=frank-default-small}"
: "${BIND_ADDR:=0.0.0.0}" : "${BIND_ADDR:=0.0.0.0}"
: "${LISTEN_PORT:=7770}" : "${LISTEN_PORT:=7770}"
: "${CTX_SIZE:=491520}" : "${CTX_SIZE:=200700}"
: "${PARALLEL:=3}" : "${PARALLEL:=3}"
: "${SPEC_TYPE:=none}" : "${CACHE_TYPE_K:=q8_0}"
: "${CACHE_TYPE_K:=f16}" : "${CACHE_TYPE_V:=q8_0}"
: "${CACHE_TYPE_V:=q6_0}"
: "${K_CACHE_HADAMARD:=0}"
: "${V_CACHE_HADAMARD:=1}"
: "${SPLIT_MODE:=none}"
: "${VERBOSITY:=4}"
# Expert offload: --override-tensor regex pinned to the CPU buft. Same pattern
# the internal --cpu-moe / --n-cpu-moe use; explicit here so we only move the
# MoE expert weights and leave every other tensor on the GPU.
: "${OVERRIDE_EXPERT:=blk\.(0|1|2|4|5|6|8|9|10|12|13|14|16|17|18|20|21|22|24|25|26|28|29|30|32|33|34)\.ffn_(up|down|gate|gate_up)_(ch|)exps}"
: "${OVERRIDE_BUFT:=CPU}"
: "${N_GPU_LAYERS:=999}" : "${N_GPU_LAYERS:=999}"
: "${BATCH_SIZE:=4096}" : "${BATCH_SIZE:=4096}"
: "${UBATCH_SIZE:=1024}" : "${UBATCH_SIZE:=1024}"
: "${CTX_CHECKPOINTS:=16}" : "${VERBOSITY:=2}"
: "${NO_MMAP:=1}" : "${CPU_MOE:=1}"
: "${TEMPERATURE:=1.0}" : "${TEMPERATURE:=1.0}"
: "${TOP_K:=20}" : "${TOP_K:=20}"
: "${TOP_P:=0.95}" : "${TOP_P:=0.95}"
@@ -77,14 +56,11 @@ fi
: "${THREADS_HTTP:=8}" : "${THREADS_HTTP:=8}"
MODEL="$MODEL_DIR/$MODEL_FILE" MODEL="$MODEL_DIR/$MODEL_FILE"
MMPROJ="$MODEL_DIR/$MMPROJ_FILE"
for f in "$MODEL" "$MMPROJ" "$CHAT_TEMPLATE_FILE"; do if [[ ! -f "$MODEL" ]]; then
if [[ ! -f "$f" ]]; then echo "missing required file: $MODEL" >&2
echo "missing required file: $f" >&2 exit 1
exit 1 fi
fi
done
if [[ ! -x "$LLAMA_SERVER" ]]; then if [[ ! -x "$LLAMA_SERVER" ]]; then
echo "missing llama-server binary: $LLAMA_SERVER" >&2 echo "missing llama-server binary: $LLAMA_SERVER" >&2
exit 1 exit 1
@@ -92,24 +68,14 @@ fi
exec "$LLAMA_SERVER" \ exec "$LLAMA_SERVER" \
--model "$MODEL" \ --model "$MODEL" \
--mmproj "$MMPROJ" \ $([ "$CPU_MOE" = "1" ] && printf -- "--cpu-moe") \
--chat-template-file "$CHAT_TEMPLATE_FILE" \
$([ "$USE_JINJA" = "1" ] && printf -- "--jinja") \
--spec-type "$SPEC_TYPE" \
--override-tensor "$OVERRIDE_EXPERT=$OVERRIDE_BUFT" \
--cache-type-k "$CACHE_TYPE_K" \ --cache-type-k "$CACHE_TYPE_K" \
--cache-type-v "$CACHE_TYPE_V" \ --cache-type-v "$CACHE_TYPE_V" \
$([ "$K_CACHE_HADAMARD" = "1" ] && printf -- "--k-cache-hadamard") \
$([ "$V_CACHE_HADAMARD" = "1" ] && printf -- "--v-cache-hadamard") \
--split-mode "$SPLIT_MODE" \
--verbosity "$VERBOSITY" \
--ctx-size "$CTX_SIZE" \ --ctx-size "$CTX_SIZE" \
--parallel "$PARALLEL" \ --parallel "$PARALLEL" \
--gpu-layers "$N_GPU_LAYERS" \ --gpu-layers "$N_GPU_LAYERS" \
--batch-size "$BATCH_SIZE" \ --batch-size "$BATCH_SIZE" \
--ubatch-size "$UBATCH_SIZE" \ --ubatch-size "$UBATCH_SIZE" \
--ctx-checkpoints "$CTX_CHECKPOINTS" \
$([ "$NO_MMAP" = "1" ] && printf -- "--no-mmap") \
--temp "$TEMPERATURE" \ --temp "$TEMPERATURE" \
--top-k "$TOP_K" \ --top-k "$TOP_K" \
--top-p "$TOP_P" \ --top-p "$TOP_P" \
+5 -2
View File
@@ -147,12 +147,12 @@ for path in "${CHANGED[@]}"; do
add_test tests/mount_entropy.bats add_test tests/mount_entropy.bats
;; ;;
scripts/frank-default-large.env|scripts/serve-frank-large.sh) scripts/frank-default-large.env|scripts/serve-frank-large.sh)
add_test tests/frank_large_config.bats add_test tests/llm_units.bats
add_test tests/llm_secrets.bats add_test tests/llm_secrets.bats
add_test tests/scripts_syntax.bats add_test tests/scripts_syntax.bats
;; ;;
scripts/frank-default-small.env|scripts/serve-frank-small.sh) scripts/frank-default-small.env|scripts/serve-frank-small.sh)
add_test tests/frank_small_config.bats add_test tests/llm_units.bats
add_test tests/llm_secrets.bats add_test tests/llm_secrets.bats
add_test tests/scripts_syntax.bats add_test tests/scripts_syntax.bats
;; ;;
@@ -177,6 +177,9 @@ for path in "${CHANGED[@]}"; do
add_test tests/docs_completeness.bats add_test tests/docs_completeness.bats
add_test tests/deployment_scoping.bats add_test tests/deployment_scoping.bats
;; ;;
.AGENTTRASH/*)
# Trash moves are not testable; skip.
;;
*) *)
die "no focused-test mapping for '$path'; add one before committing" die "no focused-test mapping for '$path'; add one before committing"
;; ;;
+3 -3
View File
@@ -21,10 +21,10 @@ load helpers
[[ "$output" != *"tests/homepage_pages.bats"* ]] [[ "$output" != *"tests/homepage_pages.bats"* ]]
} }
@test "changed-test wrapper maps a service script to its focused config tests" { @test "changed-test wrapper maps a service script to its focused tests" {
run bash "$REPO_ROOT/scripts/test-changed.sh" --list --paths scripts/serve-frank-small.sh run bash "$REPO_ROOT/scripts/test-changed.sh" --list --paths scripts/serve-frank-small.sh
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
[[ "$output" == *"tests/scripts_syntax.bats"* ]] [[ "$output" == *"tests/scripts_syntax.bats"* ]]
[[ "$output" == *"tests/frank_small_config.bats"* ]] [[ "$output" == *"tests/llm_units.bats"* ]]
[[ "$output" != *"tests/frank_large_config.bats"* ]] [[ "$output" == *"tests/llm_secrets.bats"* ]]
} }