The managed-skill library was regenerated: 94 narrow per-incident skills
replaced by 25 broader ones (radiance-*, llamacpp-*, homepage-*, fleet/
endpoint ops). Git renders this as mass delete + mass add because whole
directories changed name; old content stays in history at 12c5e88.
Surface check: the 25 on disk are exactly the skills the harness advertises
this session.
5.0 KiB
5.0 KiB
name, description
| name | description |
|---|---|
| llamacpp-endpoint-model-swap | Swap the model on a dank-fleet llama.cpp endpoint (frank-secondary pattern): fetch, env edit, spec flags, deploy through git, rewrite the bats seam, verify VRAM with the engine's own numbers. |
llama.cpp endpoint model swap (dank fleet)
Use when replacing the model/shape on a llama.cpp endpoint (e.g. frank-secondary on the RTX 3090). The engine's boot numbers are the verdict — do NOT commit to a feasibility verdict from head math; boot it and read nvidia-smi.
Sequence
- Geometry first, from the loaded model's own log (
--log-verbosity 4, or the HFconfig.jsonundertext_configfor multimodal): layers,n_head_kv(an ARRAY — per-layer, e.g. gemma4 has 8 on sliding layers, 2 on full-attention), head_dim,sliding_window_pattern,n_swa,attention_k_eq_v. KV scales only with full-attention layers; sliding layers cost a fixed window-size ring. Single-value HF fields lie about per-layer heterogeneity. - Fit the KV rate law to the engine, not to arithmetic. Run once with
--log-verbosity 4and read thellama_kv_cache/sched_reservebuffer MiB lines. Known law for master 5fc4f3c: bytes/elem = (K bytes + V bytes) x2 when the file declaresattention_k_eq_v(6.125 at f16 K + q8_0 V, 2.125 at q8_0/q8_0) — k_eq_v is a compute-graph mapping and does NOT shrink the cache. Full cache = n_full x n_head_kv x head_dim x rate x ctx; SWA cache = n_swa x window x n_head_kv_swa x head_dim x rate. Both reproduce the printed MiB exactly; if your formula does not, your law is wrong, not the engine. - Probe the binary's real capabilities before promising flags:
--help | grep -A2 cache-type-k(this fleet's build has NO fp8; q8_0 is the "FP8 class"),--help | grep -A2 verbosity(-lv, --log-verbosity N; shipVERBOSITYas an env tunable +--log-verbosity "$VERBOSITY"so VRAM forensics land in the journal),--help | grep model-draftfor separate drafters. NEVERgrep -c <archname>on the packed binary to check arch support — it returns 0 for every arch; check the source tree at the build's commit. - Fetch with
-f+ byte-count check into/home/dank/models/<name>/. - Edit the repo trio (
scripts/serve-<svc>.sh,scripts/<svc>.env,~/.omp/agent/models.yml): spec flags move as a SET (SPEC_TYPE=nonestrips--spec-typeAND--spec-draft-model/--spec-draft-*); a drafter with its own arch file (gemma4-assistant) needsSPEC_DRAFT_FILE, and its draft KV is built against the TARGET's full window — price it from a boot pair.models.ymlcontextWindow= per-slot window (CTX_SIZE/PARALLEL); recomputemaxTokensfor the compaction clampmin(maxTokens, ctx - estimate - 4096). - Rewrite the bats seam in the same commit (
tests/<svc>_unit.bats): payload path, slot geometry, KV pair, spec state, batch pair, verbosity, mmproj opt-out, reasoning flags — all argv-asserted against the stub engine; where the contract is a repo value (batch pair, verbosity) assert argv == env value so a retune moves one file. - Deploy through git (no direct remote edits). If the remote tree is dirty:
git stash push <files>on the host,git pull --ff-only, land the change as a commit. A pull that aborts leaves the host at the OLD revision while the service runs the NEW edits — verifygit log -1on the host. - Verify the engine, not your math:
/proc/<pid>/cmdline(argv is the contract),/v1/models(n_ctx,ftype,n_ctx_train),nvidia-smi --query-gpu=memory.used,memory.free,/health200, a vision probe (solid color >=256 px viaimage_url, expect the exact word), and one generation probe readingtimings.predicted_per_second. Record the numbers in the env comment + runbook, then push and ff-pull the host. - Cutover AGENTS.md in the same commit: fleet-topology table row, the
### <svc>section, theModel ConfigcontextWindow/vision note, the runbook index ACTIVE row, a RETIRED row for the superseded era. The new docs page must be linked from the TOP-LEVELserverAppConfigs-docs/index.md.
Gotchas
- A systemd restart reporting
inactivein the first seconds is usually model-load time; checkjournalctl -u <svc>formodel done/server is listeningbefore declaring failure. - Rollback = the previous payload stays on disk; one
MODEL_FILE+ shape edit back. - A thinking model can consume the whole token budget in
reasoning_content(emptycontent,finish_reason: length) — probe with a budget that clears thinking. - Bats vacuity trap:
serve_argvREWRITES$STAGE/test.envfrom the shipped env, so a test that mutates the file (sed -i, append) then callsserve_argvasserts on regenerated content — a tautology. Tests that mutate must exec via arun_stagehelper running the file as-is. Symptom: the assertion fails only after you fix the vacuity, and the env dump shows the mutation gone. env NAME=value cmdneeds valid identifiers; a flag-like token (nvidia-modprobe=true) is only legal as anenvARGUMENT, not as a shell assignment prefix.