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.
82 lines
3.2 KiB
Bash
82 lines
3.2 KiB
Bash
#!/usr/bin/env bats
|
|
# Seam: frank-default-small model, context, tensor placement, and template.
|
|
# This test covers only the Q6_K deployment contract.
|
|
|
|
load helpers
|
|
|
|
ENV_FILE="$REPO_ROOT/scripts/frank-default-small.env"
|
|
SERVE_FILE="$REPO_ROOT/scripts/serve-frank-small.sh"
|
|
UNIT_FILE="$REPO_ROOT/scripts/frank-default-small.service"
|
|
TEMPLATE_FILE="$REPO_ROOT/scripts/chat-template.jinja"
|
|
|
|
@test "frank-default-small selects the Ornith Q8_0 model" {
|
|
grep -q '^MODEL_FILE=Ornith-1\.5-35B-A3B-CRACK-Q8_0\.gguf$' "$ENV_FILE"
|
|
grep -q 'Ornith-1\.5-35B-A3B-CRACK-Q8_0\.gguf' "$SERVE_FILE"
|
|
}
|
|
|
|
@test "frank-default-small uses a single 160000 context slot" {
|
|
grep -q '^CTX_SIZE=160000$' "$ENV_FILE"
|
|
grep -q '^PARALLEL=1$' "$ENV_FILE"
|
|
}
|
|
|
|
@test "frank-default-small uses q6_0 KV cache with Hadamard" {
|
|
grep -q '^CACHE_TYPE_K=q6_0$' "$ENV_FILE"
|
|
grep -q '^CACHE_TYPE_V=q6_0$' "$ENV_FILE"
|
|
grep -q '^K_CACHE_HADAMARD=1$' "$ENV_FILE"
|
|
grep -q '^V_CACHE_HADAMARD=1$' "$ENV_FILE"
|
|
}
|
|
|
|
@test "frank-default-small keeps full-attention and final blocks on CUDA" {
|
|
source "$ENV_FILE"
|
|
[[ "$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_EXPERT" != *'|3|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|7|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|11|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|15|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|19|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|23|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|27|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|31|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|35|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|36|'* ]]
|
|
[[ "$OVERRIDE_EXPERT" != *'|40|'* ]]
|
|
[[ "$OVERRIDE_BUFT" == CPU ]]
|
|
# ik_llama --gpu-layers/-ngl requires an integer ("all" is rejected); 999
|
|
# loads as many layers as possible while OVERRIDE_EXPERT pins exps to CPU.
|
|
[[ "$N_GPU_LAYERS" == 999 ]]
|
|
}
|
|
|
|
@test "frank-default-small disables speculative decoding (single slot)" {
|
|
grep -q '^SPEC_TYPE=none$' "$ENV_FILE"
|
|
grep -q '^PARALLEL=1$' "$ENV_FILE"
|
|
! grep -q '^SPEC_NGRAM_MOD_N_MIN=' "$ENV_FILE"
|
|
! grep -q '^SPEC_NGRAM_MOD_N_MAX=' "$ENV_FILE"
|
|
! grep -q '^SPEC_NGRAM_MOD_N_MATCH=' "$ENV_FILE"
|
|
! grep -q -- 'SPEC_DRAFT_' "$ENV_FILE"
|
|
! grep -q -- '--spec-type.*draft-mtp' "$SERVE_FILE"
|
|
grep -q -- '--spec-type' "$SERVE_FILE"
|
|
! grep -q -- 'ngram' "$SERVE_FILE"
|
|
}
|
|
|
|
@test "frank-default-small uses ubatch 1024" {
|
|
grep -q '^BATCH_SIZE=4096$' "$ENV_FILE"
|
|
grep -q '^UBATCH_SIZE=1024$' "$ENV_FILE"
|
|
grep -q ': "${UBATCH_SIZE:=1024}"' "$SERVE_FILE"
|
|
}
|
|
|
|
@test "frank-default-small uses the tracked Qwen-Sharp template" {
|
|
grep -q '^CHAT_TEMPLATE_FILE=' "$ENV_FILE"
|
|
grep -q 'peculiar-ragdoll/Qwen-Sharp-Chat-Templates' "$ENV_FILE"
|
|
grep -q 'chat-template\.jinja' "$SERVE_FILE"
|
|
[ -s "$TEMPLATE_FILE" ]
|
|
grep -q 'qwen3\.8-froggeric-v22\.4\.0' "$TEMPLATE_FILE"
|
|
grep -q 'Qwen-Sharp' "$UNIT_FILE"
|
|
}
|
|
|
|
@test "frank-default-small renders the custom template with --jinja" {
|
|
# Without --jinja, ik_llama only supports built-in non-Jinja handlers and
|
|
# silently drops the custom Qwen-Sharp template formatting.
|
|
grep -q '^USE_JINJA=1$' "$ENV_FILE"
|
|
grep -q -- '--jinja' "$SERVE_FILE"
|
|
}
|