llm-inference-multimodel: add Qwen2.5-14B shadow instance (port 8002, gated off — VRAM co-residency not yet confirmed)

- New llama-server-qwen systemd unit template, gated by llm_qwen_service_enabled (default false)
- Idempotent GGUF download task (bartowski Qwen2.5-14B-Instruct-Q5_K_M, stat-guarded)
- Launch flags per local-llm-64k-context-recommendation.md: ctx-size 65536, flash-attn, q8_0 KV cache, batch 2048/ubatch 512, jinja, parallel 1
- verify.yml only starts/verifies the qwen unit when llm_qwen_service_enabled=true
- README: documents live VRAM gate finding (nvidia-smi 2026-08-06: Phi-4+Mistral already ~16.6/24GB, ~7.5GB free -- insufficient for Qwen weights concurrently) and options
- Does NOT touch llama-server-aux (8000) or llama-server-toolcall (8001) service state
This commit is contained in:
Hermes Agent service account
2026-08-06 09:08:33 -05:00
parent 79edb8f4e1
commit d10255297c
6 changed files with 181 additions and 8 deletions

View File

@@ -105,15 +105,44 @@ correctness/safety judgment call, not a repeatable infra check. See
`docs/validation-log.md` in this role directory for the procedure reference
and a place to log results once Ryan runs it.
## Known gap: Semaphore is broken (as of 2026-08-05)
## Known gap: Semaphore execution path bypassed for this role (2026-08-05)
The normal execution/audit path (Semaphore) is currently non-functional.
This role was authored to be run via direct `ansible-playbook` as an accepted
interim stopgap, executed personally by Ryan. **This is a known gap, not the
intended long-term operational path** — once Semaphore is repaired, retarget
execution of this role (and future changes to it) through Semaphore so runs
are audited/logged there again. Flag this in any future work that touches
this role.
The normal execution/audit path (Semaphore) was believed non-functional at authoring time, so this role was run via direct `ansible-playbook` instead, executed personally by Ryan.
**Confirmed 2026-08-05 (JARVIS, via Semaphore API — token `vault_semaphore_api_token` in the homelab Ansible vault):** this was a misdiagnosis, not an outage. Semaphore's service, Postgres backend, and API (`/api/ping` returns `pong`) are all healthy on figment (10.1.71.37 — note the documented host `city-hall`/10.1.71.38 is stale; DNS for `imagineering.local.mk-labs.cloud` actually resolves through Traefik on lightning-lane to figment:3000). Queried `/api/project/1/templates` directly: only 6 templates exist project-wide (day0 baseline/root-LV checks, day1 Semaphore self-deploy, Traefik route updates) — **none for this role, nor for the original single-model `llm-inference` role**. Root cause confirmed: no Semaphore project template was ever created for LLM inference deployment, which presents identically to "Semaphore is broken" if you don't check the template list.
**This is still a known gap** — direct `ansible-playbook` execution bypasses the audit trail Semaphore normally provides. Create a project template for this role's playbook and retarget execution through Semaphore so runs are audited/logged there. Flag this in any future work that touches this role.
## Rollback
## Qwen2.5-14B shadow deployment (port 8002) — 2026-08-06
Added a third instance definition (`llama-server-qwen`) per
`/home/hermes/reports/local-llm-64k-context-recommendation.md`, intended to
eventually replace the `llama-server-toolcall` (8001) slot once validated —
runs alongside 8000/8001 during the shadow-test window, does not stop or
replace either.
**VRAM GATE — service NOT started as of this commit.** Live `nvidia-smi` check
on 2026-08-06 showed Phi-4 (8000, ~10.4GB) + Mistral (8001, ~6.2GB) already
consuming ~16.6GB / 24GB, leaving only ~7.5GB free. Qwen2.5-14B-Instruct
Q5_K_M weights alone are ~10-12GB — **does not fit concurrently** with both
existing instances at full GPU offload. The unit is deployed to disk
(`llm_qwen_service_enabled: false` default in `defaults/main.yml`) but will
not start until this is resolved. Options for the shadow-test window,
none applied yet — pick one and flip `llm_qwen_service_enabled: true`:
1. Temporarily stop `llama-server-toolcall` (8001) for the duration of the
shadow test — it's the model being superseded anyway, so this is low-risk
and reversible (`systemctl start llama-server-toolcall` restores it).
2. Reduce Qwen's `--n-gpu-layers` (partial CPU offload) to fit the ~7.5GB
remaining headroom — will materially hurt throughput, not recommended as
first choice.
3. Reduce `--ctx-size` below 65536 — undermines the entire point of this
exercise (Hermes's 64K floor), not recommended.
Recommended: option 1, coordinated with Ryan/JARVIS since it does touch a
live service, even though 8001 was already flagged for retirement.
## Rollback