frank-default-small: use q8_0 (not q8_KV) KV cache on ik_llama

The ik_llama fast q8_KV cache type crashes at model init on this
QWEN3MOE/MTP + multimodal arch at commit b166e269 with a ggml_view size
assert (ggml.c:5427) right after the output buffer is created, looping
the service. Empirically isolated by toggling cache type: q8_0 and f16
load and serve (smoke-tested correct output), q8_KV asserts. Switch to
q8_0 + Hadamard (K/V), which still gives the 8-bit cache + Hadamard
quality win. KB updated with the crash lesson.
This commit is contained in:
Frank
2026-08-26 03:23:18 -07:00
parent e2085f1f7d
commit 0e5c37f2f8
5 changed files with 32 additions and 17 deletions
+11 -9
View File
@@ -5,12 +5,12 @@
# 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 q8_KV with Hadamard transforms on both K and V.
# --split-mode graph enabled (single GPU; retained per operator preference).
# KV cache quantized to q8_0 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 q8_KV + Hadamard KV cache combos compile into the CUDA/CPU FA
# 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 from CRACK Q8_0 to Q6_K on 2026-08-25.
#
@@ -67,12 +67,14 @@ OVERRIDE_BUFT=CPU
# OVERRIDE_EXPERT below.
N_GPU_LAYERS=999
# KV cache on GPU, both K and V at q8_KV (fast quant type on ik_llama, PR 208)
# plus Hadamard transforms on both caches to preserve quality at 8-bit.
# For quantized KV below Q6_0 the docs recommend --k-cache-hadamard; we apply
# --v-cache-hadamard to V as well.
CACHE_TYPE_K=q8_KV
CACHE_TYPE_V=q8_KV
# KV cache on GPU, both K and V at q8_0 plus Hadamard transforms on both
# caches to preserve quality at 8-bit. NOTE: ik_llama's fast q8_KV type
# crashes at model init on this MTP/multimodal arch with a ggml_view size
# assert (ggml.c:5427) at commit b166e269; plain q8_0 works. Docs recommend
# --k-cache-hadamard for quantized KV below Q6_0; we apply --v-cache-hadamard
# to V as well. Flash-attention is on by default.
CACHE_TYPE_K=q8_0
CACHE_TYPE_V=q8_0
K_CACHE_HADAMARD=1
V_CACHE_HADAMARD=1
+4 -1
View File
@@ -7,11 +7,14 @@
# 35B-total / 3B-active MoE-dense hybrid with an MTP head bundled in the GGUF;
# this service uses ngram-mod instead of MTP speculation.
#
# KV cache: q8_KV with Hadamard transforms on K and V (requires a build with
# KV cache: q8_0 with Hadamard transforms on K and V (requires a build with
# GGML_CUDA_FA_ALL_QUANTS=ON + GGML_IQK_FA_ALL_QUANTS=ON; see the env file).
# The ik_llama fast q8_KV type crashes at init on this arch (ggml.c:5427);
# q8_0 is used 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
# --override-tensor pattern are pinned to CPU. Selected full-attention and