fix(llm): point qwen-classifier at the Q8 GGUF already on disk

The Q4_K_M-class file this originally specced didn't exist yet on
gameserver (classifier crash-looped: "No such file or directory").
A Q8_K_XL GGUF for the same model was already sitting in the models
volume from something earlier — point at that instead of downloading a
new file, and drop the KV cache quant to q4_0/q4_0 to keep total RAM
comfortable now that the weights are the larger Q8 variant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-09 16:37:54 +02:00
co-authored by Claude-Bot
parent b3a64fe4b5
commit 20cc0bcc70
2 changed files with 14 additions and 11 deletions
+2 -4
View File
@@ -45,10 +45,8 @@ LLAMA_PARALLEL=2
# Dedicated CPU-only backend for qwen-code's tool-call harmfulness classifier
# (fastModel in ~/.qwen/settings.json) — see docker-compose.yml's
# qwen-classifier service comment for the why. 131072 ctx / q8_0 KV / Q4_K_M-
# class weights ≈ 12GiB, fits gameserver's ~17GiB free system RAM with room
# to spare.
LLAMA_CLASSIFIER_MODEL_FILE=Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf
# qwen-classifier service comment for the why and the RAM math.
LLAMA_CLASSIFIER_MODEL_FILE=Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf
# --- Lazytainer ---
# Seconds of inactivity before llama-server is stopped. 900 = 15 min.
+12 -7
View File
@@ -55,24 +55,29 @@ services:
# GPU slot. Needs >=131072 ctx (qwen-code requirement); Qwen3-4B-Instruct-2507
# is the smallest Qwen3 that supports that natively (262144) without
# RoPE-scaling — the smaller 0.6B/1.7B/4B (non-2507) models only go to
# 40960. Sized for gameserver's ~17GiB free RAM: q8_0/q8_0 KV at full
# 131072 ctx is ~9.8GiB + ~2.3GiB Q4_K_M-class weights ≈ 12GiB, comfortable
# headroom, and better KV quality than the q4_0 that would've been needed
# to squeeze this onto the GPU's ~6GiB free VRAM instead.
# 40960. Reuses a Q8_K_XL GGUF already sitting in the models volume from
# something earlier (better weight quality than the Q4_K_M-class file
# originally specced here, no download needed). KV cache dropped to
# q4_0/q4_0 to compensate: full-context q8_0/q8_0 (~9.6GiB) on top of the
# larger Q8 weights (~4.7GiB) left too little slack against the rest of
# the stack (omniroute's 10g mem_limit, qdrant, neo4j) on gameserver's
# 31GiB total RAM; q4_0/q4_0 (~5.1GiB) + weights (~4.7GiB) ≈ 9.8GiB leaves
# comfortable headroom instead. Weight precision matters more than KV
# precision for a classification task, so this trade favors the weights.
qwen-classifier:
image: ghcr.io/ggml-org/llama.cpp:server
container_name: qwen-classifier
volumes:
- models:/models
command: >
-m /models/${LLAMA_CLASSIFIER_MODEL_FILE:-Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf}
-m /models/${LLAMA_CLASSIFIER_MODEL_FILE:-Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf}
--host 0.0.0.0
--port 8080
--n-gpu-layers 0
--ctx-size 131072
--parallel 1
--cache-type-k q8_0
--cache-type-v q8_0
--cache-type-k q4_0
--cache-type-v q4_0
--jinja
expose:
- "8080"