#!/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 Q6_K model" { grep -q '^MODEL_FILE=Ornith-1\.5-35B-A3B-CRACK-Q6_K\.gguf$' "$ENV_FILE" grep -q 'Ornith-1\.5-35B-A3B-CRACK-Q6_K\.gguf' "$SERVE_FILE" } @test "frank-default-small uses 163840 context per slot across three slots" { grep -q '^CTX_SIZE=491520$' "$ENV_FILE" grep -q '163840 ctx each' "$ENV_FILE" grep -q '^PARALLEL=3$' "$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|28|29|30|32|33|34)\.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 ]] [[ "$N_GPU_LAYERS" == all ]] } @test "frank-default-small uses ngram-mod without MTP" { grep -q '^SPEC_TYPE=ngram-mod$' "$ENV_FILE" grep -q '^SPEC_NGRAM_MOD_N_MIN=48$' "$ENV_FILE" grep -q '^SPEC_NGRAM_MOD_N_MAX=64$' "$ENV_FILE" grep -q '^SPEC_NGRAM_MOD_N_MATCH=24$' "$ENV_FILE" ! grep -q -- 'SPEC_DRAFT_' "$ENV_FILE" ! grep -q -- '--spec-type.*draft-mtp' "$SERVE_FILE" grep -q -- '--spec-ngram-mod-n-max' "$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" }