merge: follow-up fix for qwen-classifier model file

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-09 16:38:11 +02:00
co-authored by Claude-Bot
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 # Dedicated CPU-only backend for qwen-code's tool-call harmfulness classifier
# (fastModel in ~/.qwen/settings.json) — see docker-compose.yml's # (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- # qwen-classifier service comment for the why and the RAM math.
# class weights ≈ 12GiB, fits gameserver's ~17GiB free system RAM with room LLAMA_CLASSIFIER_MODEL_FILE=Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf
# to spare.
LLAMA_CLASSIFIER_MODEL_FILE=Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf
# --- Lazytainer --- # --- Lazytainer ---
# Seconds of inactivity before llama-server is stopped. 900 = 15 min. # 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 # GPU slot. Needs >=131072 ctx (qwen-code requirement); Qwen3-4B-Instruct-2507
# is the smallest Qwen3 that supports that natively (262144) without # 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 # 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 # 40960. Reuses a Q8_K_XL GGUF already sitting in the models volume from
# 131072 ctx is ~9.8GiB + ~2.3GiB Q4_K_M-class weights ≈ 12GiB, comfortable # something earlier (better weight quality than the Q4_K_M-class file
# headroom, and better KV quality than the q4_0 that would've been needed # originally specced here, no download needed). KV cache dropped to
# to squeeze this onto the GPU's ~6GiB free VRAM instead. # 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: qwen-classifier:
image: ghcr.io/ggml-org/llama.cpp:server image: ghcr.io/ggml-org/llama.cpp:server
container_name: qwen-classifier container_name: qwen-classifier
volumes: volumes:
- models:/models - models:/models
command: > 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 --host 0.0.0.0
--port 8080 --port 8080
--n-gpu-layers 0 --n-gpu-layers 0
--ctx-size 131072 --ctx-size 131072
--parallel 1 --parallel 1
--cache-type-k q8_0 --cache-type-k q4_0
--cache-type-v q8_0 --cache-type-v q4_0
--jinja --jinja
expose: expose:
- "8080" - "8080"