150 KiB
150 KiB
- serverAppConfigs LLM deploy law (verified 2026-10-09): (1) A green deploy.sh does NOT prove the running configuration — systemd drop-ins in /etc/systemd/system/unit.service.d/ are invisible to the planner and can override Environment=FRANK_*_ENV_FILE and ExecStart to a staging worktree. dankserver's frank-primary carried bench.conf (2026-10-08 04:09, left from the w4dn8 campaign) pointing both at /home/dank/serverAppConfigs-swift15, so every frank-primary deploy since then restarted the staging tree behind a healthy gate. After an LLM deploy, verify behaviourally: podman inspect container --format {{json .Config.Cmd}} + systemctl cat unit (drop-ins print at the bottom) + /v1/models. Before removing a drop-in: diff staging vs deploy-checkout serve script/unit/env, and git merge-base --is-ancestor stagingHEAD HEAD. (2) Verify a served-model-id rename on /v1/models, never on a chat response: radiance echoes the REQUESTED model name, so a 200 with the new name proves nothing; llama.cpp and halogen ignore the requested id entirely. (3) OpenWebUI keys a model id in three places — model.id+name, access_grant.resource_id (resource_type='model'), openai.api_configs per-backend model_ids — a stale id fails silently (empty picker: it intersects the backend /v1/models with model_ids). Apply with podman exec -i open-webui python3 - (no sqlite3 binary in the image), then systemctl --user restart open-webui.service. GET /api/v1/models/list returning {"items":[],"total":0} for an account whose picker is plainly populated: the API census is not the acceptance test; the browser snapshot is. (4) Playwright probes: locator.isVisible({timeout}) does NOT wait — it returns immediately; use waitFor({state:'visible'}). OpenWebUI 0.6 composer is a contenteditable div, not a textarea; stable anchors are getByRole('button', {name: /selected model/i}) and the text "How can I help you today?". (5) OPEN ITEMS reported to Frank, not approved: Hermes dankserver-small aux routes still send the retir
- serverAppConfigs secret-scan baseline (2026-10-09, gitleaks 8.24 full history + manual sweeps, 559 files/1167 commits): tree and history CLEAN of real secrets. Known gitleaks false positives to expect on re-runs — (1) Bearer PASTE-YOUR-KEY in shared/homepage/docs.html (placeholder in public API guide); (2) curl -u admin:admin in serverAppConfigs-docs/Operations/Fleet Audit and Posture.md (Grafana default-credential RESIDUAL CHECK, not a leak); (3) FRANK_LARGE__SHA256 checksums in scripts/frank-.env; (4) OAUTH_CLIENT_ID / GF_AUTH_GENERIC_OAUTH_CLIENT_ID in open-webui.container, grafana.container, dankclaw/compose.yaml — OAuth2 client IDs are public identifiers; the client SECRETS live only in git-ignored host .env files. Real-value secret file on disk: tests/e2e/.env.local (gitignored, verified). PENDING POSTURE ITEM reported to Frank, not yet approved for action: Grafana on dankclaw answers admin:admin on loopback 127.0.0.1:3002 (probe: ssh dankclaw curl -u admin:admin http://127.0.0.1:3002/api/org → 200) — rotation recommended, awaiting his go.
- serverAppConfigs authentik user provisioning (five accounts kirby/ry/nic/debo/freya pk 17-21 created 2026-10-09; law now in vault commit 65dec6a): (1) After ak shell provisioning with the human-user template (groups Non-Admin Users + jellyfin_users + openwebui_users), OpenWebUI mints each account on FIRST SSO login with role pending (ui.default_user_role=pending in webui.db config table) — they log in fine, then cannot chat / picker is empty until UPDATE "user" SET role='user' WHERE email=…; the row does not exist before first login, so the flip is a first-login-sighting follow-up, not a provisioning step. No per-user model grant needed — the picker model carries the global access_grant row (model, frank-secondary, user, , read). Written up in serverAppConfigs-docs/Dankclaw/OpenWebUI.md (SSO section). (2) The proxysession claim purge is only due when a group change follows an existing login; users created with their groups already in place have zero rows — verify with a per-user census instead of purging blindly. (3) The authentik-postgres container's DB role/db are authentik/authentik (POSTGRES_USER env), NOT postgres: podman exec authentik-postgres psql -U authentik -d authentik -tAc "select session_data-'claims'-'preferred_username', count() from authentik_providers_proxy_proxysession group by 1". (4) User.app_entitlements() requires the Application argument (Application.objects.get(slug="open-webui")) — bare call raises TypeError. Verification bar for a provision: authenticate(request=None, …) accepts the password and rejects a wrong one (the exact PasswordStage path) plus the open-webui entitlement resolves. (context: serverAppConfigs 2026-10-09: provisioned five authentik human accounts on Dankclaw; vault pages Infrastructure/Authentik.md, Dankclaw/OpenWebUI.md, log.md updated (commit 65dec6a), bats suite 366 green.)
- radiance arch-capability audit (dankserver, pin 1.0.13, verified 2026-10-08): the container ships 6 arch plugins in /opt/radiance/share/radiance/architectures/ — qwen4exp_fp8, qwen35moe_fp8, qwen35_fp8, qwen35_bf16, llama_fp8, llama_dense_fp8. Capability check per plugin: grep -ac RADIANCE_CALIB / grep -ac gram / grep -ac mtp / grep -ac ngram on the .so (qwen35moe_fp8: calib=2 grams=2 mtp=4 ngram=0; gptq=0 in ALL plugins — GPTQ lives in rad-convert, not the plugin). Introspection pitfalls: the digest-pinned name (stilldeadcode/radiance@sha256:4c3f48…) does NOT resolve locally (podman tries a registry pull and fails); use the local tag docker.io/stilldeadcode/radiance:latest — image lives in ROOTLESS storage as dank (frank-primary runs rootless under the root unit; sudo podman ps is empty). Image has no ls/strings; podman exec frank-primary ls fails; correct form: podman run --rm --entrypoint sh docker.io/stilldeadcode/radiance:latest -c '…'. Verdict recorded: Qwen3.6-35B-A3B (qwen3_5_moe_text, 40 layers, 256 experts top-8, MTP×1) is plugin-supported; w4dn8 recipe maps minus PLE/HC terms; ~20 GiB w4+i8 = fully VRAM-resident on ONE 32 GiB R9700 (no TP=2/host-pool/disk-tier/MNBT-2048 law); convert ~1–1.5 h. Full audit in serverAppConfigs-docs/LLM/Quantization Production.md. (context: serverAppConfigs 2026-10-08: feasibility audit of porting the frank-archon w4dn8 radiance recipe to Qwen3.6-35B-A3B; KB page Quantization Production.md carries the full write-up.)
- Quantization production research (2026-10-08, full detail in repo page serverAppConfigs-docs/LLM/Quantization Production.md, linked from both vault indexes): (1) Law — production is hardware-agnostic (imatrix/GPTQ/ablation/pruning are torch-CPU work); the card only picks what it can DECODE. (2) Frank's framing: the 3090 is the ONLY unlocked fleet device — llama.cpp there is a choice; sm_86 decodes GGUF K/I, GPTQ/AWQ-Marlin INT4, SmoothQuant INT8, weight-only FP8 (FP8 W8A8 compute is Ada/Hopper SM≥89 only; NVFP4 Blackwell; 3090 has NO FP8/FP4 silicon), EXL3 (ExLlamaV3, convert.py runs on-card). The 3090 is the natural quant R&D bench (produce on host, decode+score vs fleet KLD gates). (3) REAP (Cerebras, arXiv 2510.13999, github CerebrasResearch/reap) expert saliency = router gate-values × activation energy — the INVERSE of our derive-protected-experts.py energy-share law; REAPing Flash-Next experts 25–50% re-enters the radiance pipeline at calibration, zero new tooling. (4) HauhauCS K_P "Perfect" = imatrix on abliterated weights + per-model per-tensor mixed-type profile via llama-quantize --tensor-type (plain GGUF, no fork; Q8_K_P census: Q8_K+F32+F16); reproducible with binaries built by scripts/build-llama-rdna4.sh. (5) Heretic (p-e-w/heretic, AGPLv3) = automated abliteration (refusal-direction ablation + layer dropping, refusals-vs-KL tuned), NOT a quantizer; abliteration (Arditi 2406.11717) is rank-1 fp-editing. Order law: surgery → calibrate → quantize; keep refusal tokens out of calibration. (6) .hgn production door is CLOSED — no public quantizer exists in peonist-ai repos; self-quant on Strix runs through GGUF runtimes. (context: serverAppConfigs research session 2026-10-08; scouts + first-hand verification of REAP/Heretic/abliteration/HauhauCS K_P and per-runtime quant matrices; KB page Quantization Production.md committed to main.)
- serverAppConfigs: (1) The quantization-production research (2026-10-08) lives in serverAppConfigs-docs/LLM/Quantization Production.md — per-card playbooks (3090 imatrix/llama-quantize; R9700 radiance rad-convert pipeline is fully self-owned; Strix .hgn production is CLOSED, no public quantizer) and the verified prior-art families: REAP (Cerebras expert pruning — saliency = our derive-protected-experts.py energy-share statistic, inverse polarity; REAPing Flash-Next's 49,152 experts 25-50% drops the w4 resident set to ~58-87 GiB and kills the disk tier), Heretic (p-e-w/heretic = automated abliteration + layer dropping, NOT a quantizer), abliteration order law ablate→calibrate→quantize, HauhauCS K_P = plain GGUF with imatrix + per-tensor mixed-type profile (llama-quantize --tensor-type), no fork needed. (2) Docs seam law: tests/docs_completeness.bats requires EVERY page under serverAppConfigs-docs/ to be linked from the ROOT index.md (serverAppConfigs-docs/index.md), not just the section index (LLM/index.md) — a new vault page linked only in LLM/index.md fails seam 2. (context: Quantization Production research turn, 2026-10-08; suite caught the root-index link requirement)
- Dankclaw homepage (serverAppConfig shared/homepage) durable facts from 2026-10-08 wave 8: (1) Smoke-server trap escalation: when a localhost http.server smoke check serves stale content, the authoritative diagnostic is for p in $(pgrep -f "http.server 8099"); do readlink /proc/$p/cwd; done — a listener from an OLD staged tree can survive and serve while your new files sit untouched elsewhere; a ss | grep || (start) guard silently skips the restart when the stale listener is found. Kill the exact pid, restart from the fresh tree, re-curl for a new-file marker. (2) Warning UI convention (Frank-approved): all privacy/uncensored warnings are native details disclosure chips ("⚠ privacy note ▸/▾"), collapsed by default, pinned to the box bottom via margin-top:auto in a flex-column panel/card; the clickable-panel open handler MUST return on ev.target.closest('a, .svc-warn') or the chip tap navigates to the app. (3) The docs page is served at path /docs/ — a bare /docs.html URL hits the SPA fallback and renders the homepage shell. (4) frank-archon runs the fleet's OWN payload: homepage card + docs Model bullet link https://huggingface.co/frank8465/Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700 (published on HF, verified via API); spec = in-house GPTQ-w4 quant of Swift1.5-Qwen3.8-Flash-Next, ~114 GiB, three submissions (--max-num-seqs 3). The other two cards' HF links are their publishers' upstreams (accurate — verbatim artifacts). (5) OpenWebUI 0.6 API-key flow for docs/screenshots: avatar (bottom-left) → Settings → Account → API keys → Show → copy icon (⋯ rotates); no "Create new secret key" button exists. (context: serverAppConfig homepage wave 8: bottom-pinned disclosure chips, live OWU api-keys screenshot, archon HF publication link; smoke verification against staged trees on the dev box.)
- HF publication completed 2026-10-08: (1) Model repo frank8465/Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700 — public, 15 files, .rad = qwen4exp-swift15-w4dn8-i8-hc8m.rad 122,071,973,888 B sha256 09dd9306e859… uploaded via hf_xet at ~46 MB/s in ~29 min from dankserver (systemd-run --user --collect transient unit + .rc sentinel). (2) Dataset frank8465/swift15-gptq-w4-calib-corpus — public, CC BY-SA 4.0, anonymized calibration corpus (calib.jsonl 1,294 prompts, kld.jsonl 197, manifest, make-corpus.py, scrub-corpus.py); original unpublished hashes calib edb9b745…, kld 6e7df2f5…; cross-linked with model card (§2/§4 links, 4 refs). Scrub law: fleet slices are agent-session transcripts — scrub substring-class (not word-boundary): dankserver/dankclaw/frankbook/franksdank (bare brand = container image namespace franksdank/*), franksdank.(cloud|casa), /home/dank, emails; corpus carries NO real credentials (92 FRANK_SUDO_PW hits = variable refs; private-key hits = bats template headers; pw-assign hits = upstream test fixtures). HF card validator law: custom licenses must be license: other + license_name + license_link (raw SPDX-unknown value = ValueError at upload_file, AFTER sha gates). hub 1.28 API: upload_file/create_commit kwargs keyword-only; HfApi has no rename_file/hf_hub_url/commit_api attrs; whoami hides canWrite for legacy tokens (probe = create_repo exist_ok=True). Secret storage pattern: ~/.config/secrets/name 600 + .zshrc loader export, token mirrored to ~/.cache/huggingface/token; write token installed on dev box + dankserver.
- Dankclaw homepage/docs (serverAppConfigs, deployed 2026-10-08): (1) Frank's warning doctrine — hover tooltips are DEAD (unreachable on touch); warnings render as native details disclosure chips ("⚠ privacy note ▸") collapsed by default, pinned to the box bottom via margin-top:auto in flex-column .panel/.mi-card; the clickable-panel open handler must ignore .svc-warn taps (chip taps bubble → navigation bug, fixed). Same chips on docs.html (privacy + uncensored-model). (2) Live-verification trap: https://www.franksdank.cloud/docs.html is swallowed by the SPA fallback and serves the homepage shell — the docs page lives at /docs/. (3) Served model ids on the API layer are STILL frank-primary/frank-large/frank-secondary (/v1/models live-verified) — the frank-archon/dragoon/zealot rename is harness+homepage+docs only; a served-model-name flip (needs inference restart + OpenWebUI picker ACL re-arm) is offered to Frank, not yet approved. (4) OWU 0.6 API-keys screenshot flow (headless, SSO profile, QA E2E Bot account): click img[src*="profile/image"] → menu Settings → tab Account → button Show → scroll the settings dialog (largest scrollHeight element) to bottom; the screenshot({path}) option did not write a file — grab the returned omp-sshots webp artifact and ffmpeg-convert to PNG. (context: serverAppConfigs homepage wave-8b: disclosure chips, docs page mobile overhaul, live OWU screenshot, 2026-10-08)
- HF corpus publication staged 2026-10-08 (NOT yet published — needs Frank's explicit go): dataset repo id frank8465/swift15-gptq-w4-calib-corpus, uploader /home/dank/hf-swift15-corpus/upload-corpus.py (dry-run default, --go arms; radcorpus venv), package = README.md datasheet (CC BY-SA 4.0 for the wikitext share-alike; tiny-codes permissive; fleet slice ours), manifest.json (paths replaced with source dataset names), anonymized calib.jsonl (39,236,524 B, sha256 3e79837f…) + kld.jsonl (5,702,825 B, sha256 b5b70ae9…), scripts/make-corpus.py (literals anonymized) + scripts/scrub-corpus.py. The scrub is deterministic (13 rules: LAN→10.x, dankserver/dankclaw/frankbook→server-a/server-b/client-c, franksdank.cloud|.casa + bare brand→example, /home/dank→/home/user, emails→user@example.com, FRANK_SUDO_PW→DEPLOY_SUDO_PW); audited-clean findings: corpus carries NO real credentials (92 FRANK_SUDO_PW hits = variable refs; private-key hits = bats template headers; password hits = upstream fixtures), the September HF-token leak did NOT reach the corpus; residual probes after scrub are self-replacement/encyclopedic-content noise. Originals stay private, receipted in the datasheet: calib sha256 edb9b7456dbeb8d7def21380778988201aead1cf3f073d3266aaa1447c437603, kld 6e7df2f562d712e04a669220a0c76788688aca5548867596b4e070902937b750 — published corpus is method-reproducible, deliberately NOT byte-identical to the shipped .rad's calibration input. Model repo frank8465/Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700 was created public and its 13 small files uploaded; the 113.7 GiB .rad streams via hf-upload.service (log /home/dank/logs/hf-upload.log, rc sentinel /home/dank/logs/hf-upload.rc). Pending after stream: repo census, dataset --go, model-card §4 dataset link, runbook/AGENTS link. Homepage commit c4dca68 (AI guide link) undeployed — Frank's uncommitted docs.html + openwebui-api-keys.png keep the tree dirty and deploy.sh refuses dirty trees. (context: serverAppConfigs 2026-10-08: model+corpus publication campaign state at end of session; dataset upload awaits user go.)
- Dank fleet secret layout (2026-10-08 cutover): all shell secrets live in ~/.config/secrets/ (dir 700, files 600) on BOTH the dev box (blank) and dankserver (dank) — kagi_api_key (dev), hf_token (both; the write-scope fine-grained token is the canonical value, Frank's copy named hf_token_write on dev). The .zshrc files carry ONLY loaders of the form [ -f ~/.config/secrets/X ] && export X="$(cat ~/.config/secrets/X)" — NEVER literal secrets in rc files (the pre-cutover literals on dev .zshrc:3 Kagi and dankserver .zshrc:40 HF were extracted; dankserver keeps .zshrc.bak-20261008). ~/.cache/huggingface/token (600) is kept in sync on dankserver — it is what huggingface_hub and the upload scripts read. Drop-in procedure for a new HF token, on dankserver: read -rs KEY; printf '%s' "$KEY" | tee ~/.config/secrets/hf_token ~/.cache/huggingface/token; chmod 600 both files — value never in chat/argv/history. HF card-metadata law: license: must be a recognized SPDX id — custom licenses need the trio license: other + license_name: + license_link: (the swift-open-license-1.0 upload died on this; the ukisai base card uses the trio). (context: serverAppConfigs 2026-10-08: HF publication campaign; token-scope 403 led to rc-file secret audit and remediation on both hosts.)
- Frank's secret-storage convention (established 2026-10-08, both dev box + dankserver): secrets live in ~/.config/secrets/ (dir 700, files 600; HF write token as hf_token_write, canonical copy as hf_token synced to ~/.cache/huggingface/token); .zshrc carries ONLY loaders like export HF_TOKEN="$(cat ~/.config/secrets/hf_token 2/dev/null)" — never literal secrets in rc files (a literal HF token sat in dankserver .zshrc:40 since 2026-08-18 and a literal Kagi key in dev .zshrc:3; both defused this day, .zshrc.bak-20261008 kept). New tokens are dropped in by Frank himself with read -rs — value never touches chat, argv, or history. Hub API facts: huggingface_hub 1.28 whoami is uninformative for fine-grained tokens (type access_token, canWrite/scopes absent) — the decisive write-scope probe is create_repo(real-target, exist_ok=True) (403 = no write; success proves scope and pre-creates); create_repo returns bare RepoUrl with no .private attr. Corpus audit (swift15 calib, /home/dank/corpora/out): calib.jsonl 1,294 prompts 39.5 MB = tiny-codes 45% (permissive/MIT) + wikitext-103 30% (CC BY-SA 4.0 share-alike on derived data, attribution; does not reach model weights) + fleet 25%; fleet+KLD slices are agent session transcripts with pervasive infra fingerprints (47,969 LAN-IP hits, 663 franksdank, 13,644 /home/dank; zero credential VALUES incl. FRANK_SUDO_PW) — scrub vs byte-faithful is Frank's pending ruling; recommended route: scrubbed corpus + scrub script + original's sha256 receipt.
- Dank fleet secret convention (est. 2026-10-08): literal API keys/tokens never live in rc files. Canonical storage = ~/.config/secrets/name (dir 700, file 600) on each host; .zshrc lines are loaders (export KEY="$(cat ~/.config/secrets/key)"). Fixed on 2026-10-08: dev box .zshrc:3 KAGI_API_KEY literal and dankserver .zshrc:40 HF_TOKEN literal (agent-added 2026-08-18) extracted to secret files + loaders; dankserver kept ~/.zshrc.bak-20261008. HF token canonical file ~/.cache/huggingface/token (600) is kept in sync from the secret file and is what the upload scripts read. HF token state 2026-10-08: frank8465's cached token is a legacy read-scoped access_token — repo create fails with 403 "don't have the rights to create a model under the namespace"; Frank is minting a fine-grained WRITE token (needs repos:write + datasets:write); drop-in = read -rs KEY; printf '%s' "$KEY" | tee ~/.config/secrets/hf_token ~/.cache/huggingface/token; chmod 600 … run by Frank himself on dankserver (token must never enter chat/argv/history). Payload corpus audit 2026-10-08: calib/kld corpora contain ZERO literal secrets (all 92 FRANK_SUDO_PW hits are variable references); fingerprints present are /home/dank paths, dankclaw/dankserver names, LAN IPs (publishing the corpus needs a scrub pass). HF model-card payload (README/scripts/artifacts) verified clean: no credentials, no IPs/hostnames.
- Swift1.5 GPTQ-w4 campaign corpus (dankserver /home/dank/corpora/out/, manifest.json seed 20261006): calib.jsonl = 1,294 prompts, mix 45 % code from nampdn-ai/tiny-codes (permissive, attribution) / 30 % prose from Salesforce/wikitext-103 (CC BY-SA 4.0 — any published derivative dataset must be CC BY-SA + attribution) / 25 % tools harvested from serverAppConfigs (own content); kld.jsonl = 197 prompts from local repo material only, pools disjoint from calib. Frank approved publishing the corpus as an HF dataset (45 MB; verdict: closes the reproducibility loop StillDeadcode left open — their card ships the recipe with $CALIB unpublished). Gates before publishing: scrub fleet infra fingerprints from harvested slices; license manifest per slice; fine-grained token must carry dataset-write. Token law (measured 2026-10-08): the cached dankserver token is READ-scoped — hf whoami succeeds but create_repo 403s "no rights to create under frank8465"; an unauthenticated API 404 on a repo path is indistinguishable from private (HF returns 401 "Invalid username or password" for both); authed 404 = repo truly absent. Frank must mint the write token himself (write via read -rs on dankserver, never chat/argv). HF upload campaign staging: frank8465/Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700, payload 122,071,973,888 B sha256 09dd9306…, staging /home/dank/hf-swift15-upload, uploader upload-to-hf.py (dry-run default, --go), launch as transient unit hf-upload.service.
- On the Dank fleet hosts (systemd-logind, KillMode=control-group), setsid nohup CMD & launched from ssh host '…' is SIGKILLed silently ~seconds after the ssh command returns — logind deactivates session-N.scope and kills the whole cgroup; setsid/nohup do not escape the cgroup, and there is NO journal/OOM trace of the death. The reliable detached-launch pattern is ssh host 'export XDG_RUNTIME_DIR=/run/user/$(id -u); systemd-run --user --collect --unit=NAME -p SendSIGKILL=no -p StandardOutput=append:/path.log -p StandardError=append:/path.log sh -c "CMD; echo $? /path.rc"' — a transient user unit outside the session scope (works because Linger=yes), with the rc sentinel written by the unit itself. Diagnose by: ps -p PID (gone), log file 0 bytes (buffered stdout lost on SIGKILL; python needs -u), and journalctl --since … | grep "session-.*Deactivated" timestamps matching the death window. Hit 2026-10-08 launching the HF 113.7 GiB upload from dankserver.
- Radiance Swift1.5 quant baselines (verified 2026-10-08 from StillDeadcode/swift1.5-qwen3.8-next-flash-fp8-iq4r-moe card + HF API): engine author's file = 122,013,646,848 B; recipe core identical to frank's (gptq table=w4nl group=64 scale=fp8_e4m3 scale2_value=2^-13 transform=fwht128 cd=3; int8 trunk; fp8 HC; PLE fixed scale 1.99317932128906e-4) — differences: 1M vs 10M calibration, 16 protected experts total vs 24/layer (1,152). THEIR FILE WAS NEVER MEASURED against own bf16; card quotes base-model recipe numbers: mean KL 0.0789 all-tokens / 0.0239 text-only, top-1 92.85/94.57 %, and the two-bf16-implementations reference floor is 0.0399. Frank's measured file: KL 0.01314 / top-1 97.92 % — beats the bf16-implementation noise floor ~3x; 97.9 % top-1 ≈ Q6_K-band agreement on the GGUF ladder (no public GGUF ladder exists for this arch, KL is the honest yardstick). Use these as standing comparison baselines for future Swift1.5 quant campaigns. Model-card doctrine Frank approved for HF publications: hard-first ordering (technical content leads, a bold "In plain English:" paragraph CLOSES each section); Randall-Munroe voice (dry concrete humor, no marketing, no AI-isms); include a "Relationship to the engine author's release" section with the measured table; state receipts as exact bytes. (context: HF publication of frank8465/Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700 (upload launched 2026-10-08); comparison research against the radiance author's own quant of the same checkpoint.)
- Comparison facts vs StillDeadcode/swift1.5-qwen3.8-next-flash-fp8-iq4r-moe (the radiance author's own quant of our base checkpoint ukisai/Swift1.5, fetched 2026-10-08 via HF API): their .rad = 122,013,646,848 B (ours 122,071,973,888 → +55.6 MiB / +0.048 %). Expert GPTQ rule is byte-identical to our staged recipe (gptq table=w4nl group=64 scale=fp8_e4m3 scale2_value=0.0001220703125 transform=fwht128 rule=search cd=3), as are int8 trunk group-128, fp8 e4m3 HC, PLE fp8 fixed scale 1.99317932128906e-4, and the inert u2 mtp.draft_head rule. Differences: their calibration 1M tokens (ours 10M); their protected set = 16 experts TOTAL (base-model rule transplanted; card example layer4/expert108 = 15.8 % energy from 0.18 % routing) vs our 24/layer = 1,152 (energy ≥3 % AND ≥3× routing, parity-padded). Their card states the file "was not measured against its own bf16 weights" — quoted KL 0.0789 all-tokens / 0.0239 text-only, top-1 92.85/94.57 % are the recipe-on-base numbers, with their two-bf16-implementations reference row at 0.0399 mean KL. Ours measured on-file: 0.01314 / 97.92 % → ~3× better than their bf16-implementation noise floor. Frank's framing (adopted in card §2 "Relationship to the engine author's release"): 93–94 % top-1 ≈ Q4-class, 97.9 % ≈ Q6_K band; "the recipe is theirs, the extra numbers are ours."
- Frank's homepage doctrine updates (2026-10-08, eighth wave — supersedes the octagon-cut corner rule): (1) NO clip-path chamfers on bordered boxes — clip-path slices the 1px border and the corners "feel like gaps"; use border-radius (panels/mi-card 6px, model-info 8px, badge 3px, buttons/callouts 4px). (2) Section-title diamond must be a fixed-width inline glyph (inline-block, width 18px, margin-left -24px to eat the 24px padding), never absolutely positioned (drifts/wraps). (3) No hover-only content: privacy notes (.svc-warn/.mi-warn) render FULL text inline — title-attribute tooltips are unreachable on touch; the "hover to read" pattern is retired. (4) Closed WIP items grey out via :has(.badge.wip-closed) — dim #5d87a8 name/desc, muted border, art grayscale(0.75) brightness(0.7); WIP: DOWN keeps the red fault treatment (down=fault, closed=status). (5) Homepage data facts: services.json "wip" is a STRING ("down"/"closed"), not boolean — wip badges come from services.json, status.json only drives non-wip probes; the Dragoon tagline is ONE spliced file sfx/dragoon-tagline.ogg (loudnorm -16 LUFS/TP -1.5 per track, silence-trimmed, 350 ms beat, limiter; the two SC2 source oggs trashed). Voice playback proves via tab.requests() 206 + mi-speaking class (detached new Audio, never in DOM).
- Frank's doctrine for public-facing docs (model cards, READMEs): every section must open with a bold-lead "In plain English:" paragraph aimed at a non-technical-but-educated reader, and the overall voice must read like Randall Munroe — short declaratives, concrete analogies (cartridge vs DVD, laminating the pages you touch daily), jokes only in the margins, no AI cadence (no delve/seamless/moreover, no bullet-spam, no bold-everything). Technical facts, numbers, and verbatim receipts stay untouched under the plain layer. Applied to the HF card staged at ~/Projects/hf-swift15-upload/README.md (final, synced to dankserver /home/dank/hf-swift15-upload/, gates green: sha256 MATCH on the 122,071,973,888 B .rad = 09dd9306e859f5343d9cb77ee6736636ab9df50f3ed2153350dfbb35be5e6948; publication awaits Frank's --go of upload-to-hf.py). Card prose deliberately omits the w4dn8 relic lore and the mnbt-3072 gate; staged scripts keep their verbatim fleet names as provenance receipts — renaming staged copies would falsify the chain.
- HF publication-card laws (frank8465 Swift1.5 w4 campaign, 2026-10-08): (1) The published .rad filename is a creation-time choice (Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700.rad) — no re-convert needed to rename for readers; the old internal name survives only in the .rad's baked storage.filename metadata (engine ignores it; visible in rad-info artifacts) and in staged toolchain scripts, which stay verbatim fleet receipts — renaming staged copies would forge provenance. Final card carries ZERO relic-name prose except the convert script filename; Frank's doctrine: reader-facing files get clean names, provenance receipts stay untouched. (2) Card style preference (Frank, final review): drop engine-shape bookkeeping readers won't care about (dual-gate MNBT comparison rows), EXPAND the interesting engineering (protected-bf16-expert law: energy-share ≥3% AND energy/routing ≥3×, even parity padding per rank half, lands 24/512 per layer = 1,152 experts = 2.72 GiB). (3) Preview trap: Frank screenshots Chrome with DevTools device-emulation ON — the "fullPage" badge clips tall pages at the emulated viewport height and looks like truncated content; check the served HTML tail first, then say Ctrl+Shift+M. (4) Line-numbered PUT edits on a script shifted by earlier inserts silently CLOBBER the line at the old number (killed two module constants in upload-to-hf.py; caught by dry-run, NameError after the sha gate) — re-view the region in the returned anchored view after every multi-edit sequence, and grep-verify constants before shipping. (context: Swift1.5 GPTQ-w4 HF publication staging, 2026-10-08: card finalized, dry-run gates green, awaiting Frank's --go)
- dankserver deployed payload receipt: /home/dank/models/rad/qwen4exp-swift15-w4dn8-i8-hc8m.rad is 122,071,973,888 B with sha256 09dd9306e859f5343d9cb77ee6736636ab9df50f3ed2153350dfbb35be5e6948 (computed 2026-10-08 with sha256sum on the host, verified twice by the upload script's gate). scripts/frank-primary.env's FRANK_PRIMARY_SHA256 pins only the fp8-native rollback file, not this w4dn8 one — this is the only recorded receipt for the active payload. HF publication staged as frank8465/Swift-1.5-Qwen3.8-Flash-Next-GPTQ-W4A8-Radiance-AMD-R9700 via /home/dank/hf-swift15-upload/upload-to-hf.py (dry-run default, --go arms it). (context: serverAppConfigs 2026-10-08: HF publication staging for the deployed frank-primary w4dn8 payload; upload pending Frank's --go. Staging at ~/Projects/hf-swift15-upload (dev) + /home/dank/hf-swift15-upload (dankserver).)
- HF Hub facts for frank8465 (free plan), verified 2026-10-08 via whoami API + hub docs: (1) Free private repos are hard-capped at 100 GB total file storage (all private repos combined); exceeding it disables private repos at renewal, public repos unaffected. (2) Public repo storage on the free tier is best-effort with NO published limit — precedent: a public model repo with a 121.97 GiB single file lives on the free tier. (3) hf auth whoami --output-format json on dankserver's token shows name/fullname/orgs[]/plan (plan None = free) — and access tokens CANNOT list/write datasets (write op → 403 "Invalid credentials in Authorization header"; read → 401), so create_repo must use repo_type="model". (4) NEVER pass a Bearer token in a curl command line — argv is world-readable in /proc/pid/cmdline (ps/pgrep leak it); use curl -K mode-600 file with header = "Authorization: Bearer …". (5) Gated bases (ukisai/Swift1.5) are gated at the CONVERSATIONAL layer only: base weights, tokenizer, AND the MTP tensors ship openly; the ablation variant Quat3rnion/halogen-…-v2-abliterated is ungated. (6) The fleet radiance w4 payload: /home/dank/models/rad/qwen4exp-swift15-w4dn8-i8-hc8m.rad, 122,071,973,888 B, sha256 09dd9306e859f5343d9cb77ee6736636ab9df50f3ed2153350dfbb35be5e6948, KLD mean 0.01314 / top-1 97.92 % / ppl ratio 1.0052 vs BF16. Upload staging: /home/dank/hf-swift15-upload/ + upload-to-hf.py (dry-run default, --go arms, radcorpus venv with hf_xet). (context: Swift1.5 GPTQ-w4 .rad publication campaign on frank8465, October 2026)
- radiance container introspection: the image entrypoint is radiance, so podman run ... image /opt/radiance/bin/rad-info FILE fails with "E unknown option" — the path is parsed as a radiance flag. Correct form: podman run --rm --entrypoint /opt/radiance/bin/rad-info -v /home/dank/models:/models:ro image /models/rad/FILE.rad. rad-info prints: RAD2 header (bytes, tensor/plane counts), a 181-key metadata block (n_layers, n_expert, full_attention_interval, n_ctx_train...), and an encoding census with per-encoding tensor counts, sizes, and % share — the authoritative receipt for a .rad (gptq params incl. calib path, group, table, transform; rtn scale values; cast bf16 lines). No strings(1) in the image; dump to a temp file and grep it — zsh over ssh mangles sed -n "X,Yp" with $( ) substitutions. (context: serverAppConfigs 2026-10-08: model stat sheet for frank-primary's qwen4exp-swift15-w4dn8-i8-hc8m.rad came from rad-info census (gptq w4 59.17 GiB/52.1%, PLE fp8 47.68 GiB/41.9%, i8 trunk 3.41 GiB, bf16 2.72 GiB).)
- radiance swift15 w4 cutover laws (Dankserver frank-primary, live 2026-10-08, main a30ac94): (1) w4 expert tables stream from the file tier IN PLACE only at --max-num-batched-tokens ≤ 2048; at MNBT 32768 the engine demands a widened form and the disk tier refuses ("DID NOT FIT ... stored form is not the container's") — a KLD/eval gate must run at an MNBT the w4 file can serve, and chunk size is softmax-invariant (two PASSes 0.0146 vs 0.0131 mean-KL at MNBT 3072/2048 bound the float-noise band at ~0.0015). (2) The radiance harness contract survives model swaps via --served-model-name "$FRANK_PRIMARY_SERVED_NAME" (=frank-primary): /v1/models id is independent of the .rad filename — models.yml needs no edit on payload swaps. (3) frank-primary prod shape at cutover: fp8 KV + spec depth 2 + seqs 3 + vram pair 26071/3543 (KLD gate scored at fp8 KV, gate and boot agree); decode ~190 t/s live (512-token streamed probe, 30.8 gate). The int8+spec3 campaign arm (136 t/s @44.5k) is NOT what shipped — verify env against the deployed container argv (podman inspect ... --format {{join .Config.Cmd " "}}, rootless as dank) before writing docs. (4) radiance /v1/completions SSE: guard payload=="[DONE]" before json.loads; there is no bare /completion (404). (5) deploy.sh ff-pull on dankserver fails on untracked campaign files (autoresearch-frank-primary.sh) that the merge wants to track — move to ~/.AGENTTRASH first. (6) kld-gate-swift15.sh edits nearly clobbered set -euo pipefail/PIN= by a comment PUT: never place body PUTs over script prologue lines. (context: serverAppConfigs swift15-radiance-w4dn8 campaign completion: final convert → KLD gate (KL 0.0131, top-1 97.92%) → deploy → live verification, 2026-10-08.)
- Dank fleet (serverAppConfigs, 2026-10-08): frank-primary Swift1.5-GPTQ-w4 campaign gates ALL PASS — KLD mean KL 0.0131 / top-1 97.92 % (two shapes: MNBT 3072 → 0.0146, MNBT 2048 → 0.0131; the Δ≈0.0015 is the float-order noise band of chunk size, so KLD verdicts are chunk-size invariant), throughput 136 t/s median @44.5k vs 30.8 bar, fleet probes green, 363 bats green on merged main (02fa1e2+). Radiance laws added: (1) w4 expert tables stream from the file tier IN PLACE only at MNBT ≤ 2048 — at MNBT 32768 the engine demands a widened form and the disk tier refuses ("DID NOT FIT … stored form is not the container's"); any offline mode (KLD scoring, calibration) on a disk-tier w4 model must run MNBT ≤ 2048 with a big host pool (40960). (2) A KLD gate must mirror the reference RECORDING shape (tp, pool, MNBT, kv dtype, deterministic) — shape deltas ride on the KL as noise. Watcher lesson: a log-path watcher racing a log truncation of a relaunched job can match the PREVIOUS run's verdict — anchor patterns (^KLD GATE PASS$) and grep for verdict lines the final writer emits, not substrings the launcher echoes. (context: swift15-radiance-w4dn8 cutover on dankserver; merge to main 02fa1e2, deploy pending at capture time)
- Radiance w4 disk-tier laws (measured on dankserver swift15 campaign, 2026-10-08): (1) GPTQ w4 expert tables stream from the file tier IN PLACE only at --max-num-batched-tokens = 2048; at larger MNBT the engine demands a widened form and the placement step dies with "DID NOT FIT ... stored form is not the container's (a relayout, a widening or a shard)" — production MNBT 2048 is a kernel law, not a tuning choice. (2) A KLD-scoring boot must mirror the reference RECORDING shape (same pin, tp, kv dtype, headroom, pool, MNBT) because chunk size changes float order that rides on the KL floor; the reference recording ran MNBT 32768 (bf16 model, no kernel constraint), so candidate scoring at 2048 accepts float-order noise as documented deviation. (3) host-pool sized for a bf16 model (12 GiB) under-serves the w4 candidate — the w4 gate_up slab needs the production pool (40960). (4) The calibration tap lives in /opt/radiance/share/radiance/architectures/qwen4exp_fp8.so, not the radiance binary — grep -ac the .so before declaring a flag missing (the image has no strings(1)). (context: serverAppConfigs swift15-radiance-w4dn8 cutover: KLD gate boot failed twice (pool 12288 DID NOT FIT at MNBT 32768) before shape was matched to recording + w4 kernel law; scripts/kld-gate-swift15.sh encodes the final shape.)
- Frank's homepage aesthetic doctrine (2026-10-08, after three theme waves): StarCraft Protoss console = flat deep-navy (#050d16) panels with octagon-cut corners on crisp 1px steel borders, warp-blue/psychic-cyan accents used sparingly, Share Tech Mono body + Rajdhani 600 headings (Google Fonts, linked in all three HTML pages: index/admin/docs), colored app icons. His verdict on the maximalist wave: "too busy — clean up and simplify/solidify" — so: no scanlines, no lattice backdrop, no ambient text glows, no inner frame lines, no blinking cursors, no pulsing states; motion is reserved for state only (speaking-voice pulse). Default to minimal on this page; maximal effects get rejected. Docs-page rules from the same session: family docs order = getting-in → troubleshooting → media → AI sections last; the *arr stack is admin-only and never mentioned in family docs; each fleet model carries an HF source link (services.json model.hf + docs Model: bullets). Smoke-test pitfalls on this repo: (1) a python http.server left on port 8099 from an earlier wave serves the OLD tree — pkill -f "http.server 8099" before re-serving a fresh copy; (2) the shared headless browser disk-caches the pages — every verification URL needs a fresh ?v=timestamp query, and style.css/app.js are cached too (the bust propagates via the page URL). Deploy flow unchanged: tests/run.sh (the frank_primary_unit MAX_SEQS failure is Frank's campaign, hands-off) → deploy.sh dankclaw --service homepage → e2e gate.
- Dankclaw homepage (serverAppConfig shared/homepage) aesthetic direction from Frank, 2026-10-08: StarCraft Protoss console — deep space navy #050d16 bg with warp-blue #3fa9ff/psychic-cyan #7fe7ff accents; amber CRT palette explicitly ABANDONED ("abandon amber"). Cornering: MAXIMAL — octagon-cut (all four corners chamfered 18–24px) on panels/cards/badges/buttons with a second inset octagonal frame line (::before double-bevel). Fonts: body "Share Tech Mono", headings "Rajdhani 600" (Google Fonts); VT323 retired ("more legible yet retro-clear terminal font… Think Starcraft"). Tiles must carry pictograms, NOT letter monograms — initials-on-hex icons read as "reverted" and get rejected (app-*.svg: book/GameBoy/folder/crumbling-wall). Two verification gotchas learned this session: (1) a reused python http.server smoke port serves browser disk-cache — always append ?v=epoch cache-bust when re-verifying, and restart the server from the fresh tree (a second python3 -m http.server on a busy port silently fails; the OLD tree keeps serving). (2) deploy.sh homepage runs the Playwright e2e gate ([3/3]); the known pre-existing failure frank_primary_unit.bats MAX_SEQS is Frank's radiance-campaign hands-off zone — never fix it. (context: Waves 4–6 of the homepage theme work on 2026-10-08: Protoss theme, HF links, navy recolor; live census verified at commit 90f6785 with e2e 34/34.)
- Verifying static frontend changes via a scratch python3 -m http.server + headless browser on the Dank fleet has two traps that fake the result: (1) a second python3 -m http.server same-port launch silently fails when the port is occupied — the OLD server keeps serving the OLD tree copy, so the browser census reports stale state and a fresh copy looks broken (observed: fresh docs.html served 0 HF links while curl on the same URL proved the new file was live); (2) the headless browser disk-caches heuristic-cached responses (http.server sends no Cache-Control), so re-navigating to the same URL after re-syncing files returns the cached page. Protocol: kill any prior server on the port (pkill -f "http.server port") before starting the fresh one, verify the server actually serves the new tree with curl | grep -c new-marker, and cache-bust browser navigation with ?v=timestamp. Also: bash tool calls with async + name + timeout can fail with "Service mode does not accept async or timeout"; plain async works. (context: 2026-10-08 serverAppConfig homepage waves: stale smoke5 server on :8099 + browser cache produced two false-negative verification rounds before curl proved the tree was fresh.)
- Dankclaw homepage client-side identity gating: Caddy's post-auth listener (http://:8017, homepage host block) can echo the Authentik outpost's injected identity headers via a templated respond — handle /whoami { templates; header Content-Type application/json; respond "{"user":"{header.X-Authentik-Username}","groups":"{header.X-Authentik-Groups}"}" }. Spoof-proof because the proxy outpost strips client-supplied X-Authentik-* before injecting. app.js shows the admin button only when groups match homepage-admins; the /admin* 403 regex gate stays the real enforcement. Sequencing law learned the hard way: deploy caddy (whoami) BEFORE homepage — a homepage deploy whose e2e gate runs before /whoami exists fails the admin-visibility spec. Homepage card assets: every app card renders art (services.json field, hex-clipped .app-art); brand marks fetched from cdn.simpleicons.org/slug/ffb000 (dataset is lean — many slugs 404: openwebui, seerr, romm, seerr, loki, valkey, *arr beyond sonarr/radarr, tautulli, comfyui), improvised amber-hex monogram SVGs for the rest; official logos: openwebui.com/logo.png, seerr.dev/os_logo_filled.svg. Model cards render in registry order (zealot→dragoon→archon pinned in homepage_config.bats); e2e panel census counts #grid .panel .name, #grid .mi-name because model cards fuse into one panel. (context: serverAppConfig homepage waves 2026-10-08 (commits through the icons/clickable/header wave); e2e gate 33/33 after caddy-before-homepage deploy ordering.)
- Dankclaw homepage admin identity-gate pattern (deployed 2026-10-08, serverAppConfigs): to gate a client-side control to authentik group members, add a Caddy handle /whoami { templates; header Content-Type application/json; respond "{...X-Authentik-Username/X-Authentik-Groups...}" } on the post-auth :8017 listener — the Authentik proxy outpost injects X-Authentik-* headers on its upstream request AND strips client-supplied copies, so echoing them back is spoof-proof. JS fetches /whoami and shows the control only when groups match (homepage-admins). The real gate stays server-side (the /admin* Caddy 403 on the same group header); the echo only controls what is shown. Sequencing law learned the hard way: deploy the caddy change (whoami endpoint) BEFORE the frontend that consumes it — the homepage deploy's e2e gate fired in the window where the new page expected /whoami and caddy didn't serve it yet, failing the admin-visibility spec. Related homepage conventions (all pinned in tests/homepage_config.bats): services.json registry order IS the card render order (model cards zealot→dragoon→archon); every app card carries hex-clipped art via an art field (brand marks from cdn.simpleicons.org/slug/ffb000, amber-tinted SVGs; improvised monogram SVGs = hex polygon + amber initials for apps with no mark — most *arr/wiki brands are absent from the CDN's dataset, check cdn 404s, don't assume slugs); card-level warn field renders as a red hover-label ("⚠ … — hover to read" with title tooltip); the common uncensored legal warning text (adult content, harmful/hateful/illegal, "sensitive offensive cybersecurity topics", "don't ruin this server for everybody") is shared byte-identical between dragoon and zealot. (context: serverAppConfigs homepage wave 2026-10-08 (commit c1e192d): /whoami gate, app icons, warning unification; documented in serverAppConfigs-docs/Infrastructure/Homepage.md wave entries)
- Radiance (StillDeadcode) qwen4exp w4-GPTQ laws, measured 2026-10-07/08 on dankserver (Swift1.5 campaign): (1) ONE ENCODING PER EXPERT TABLE: rad_arch_declare rejects splitting ffn_gate_up_exps (w4) from ffn_down_exps (block-fp8) — "one table of experts takes one encoding, and only a whole expert kept plain bf16 is served beside it"; the PROTECTED section may hold only whole bf16 experts. (2) GPTQ w4 gate_up experts CANNOT be disk-tier streamed — stored form (u4[1x1] codes + fp8/f32 scale planes) is not the served form (dequantized tables); boot fails "DID NOT FIT ... store is not the container's"; they must fit the host pool (measured 11.72 GiB/rank for 48×512 at hidden 2560). (3) The activation arena scales HARD with --max-num-batched-tokens on w4 geometry: MNBT 32768 → 33.3 GiB arena on a 31.86 GiB card (262.5 MiB per 256 tokens); prefill-only jobs (KLD) run fine at MNBT 3072. (4) --kld-ref takes NO --kld-corpus (engine rejects the pair: tokens come from the reference); --kld-out FILE writes the JSON report + FILE.rows. (5) KLD scoring of a TP=2 container can place rank 1 on the host backend when the placement plan lets card 0 absorb the resident set (GPU[1] flat at 241 MiB while GPU[0] holds 25.88 GiB) — mathematically valid (reference-verified host kernels), and at pool 40960 it scored at 22.6 pos/s vs the disk-tier record's 3.3 pos/s. (6) rad-convert GPTQ on this box: ~6 min/layer × 49 layers (~4 h CPU, load 8), fully production-compatible (no GPU). (context: serverAppConfigs swift15-radiance-w4dn8 campaign; candidate qwen4exp-swift15-w4dn8-i8-hc8m.rad 116,416 MiB)
- Dank-fleet family-facing model names (2026-10-08, Frank's StarCraft II Protoss theme): frank-large → frank-dragoon, frank-primary → frank-archon, frank-secondary → frank-zealot. These are DISPLAY names on the homepage and user docs only — endpoint services, OpenWebUI model ids, and API model ids remain frank-large/frank-primary/frank-secondary; agent configs (opencode/Pi) keep using frank-secondary. Supervision tiers (Frank's classification): frank-dragoon and frank-archon are safe for autonomous low-supervision use; frank-zealot (Qwen3.5-9B-Uncensored) requires tight human supervision. frank-zealot is the recommended compaction model for agent harnesses (compaction severely slows the bigger models far longer). Frank's rule: legal-consequence warnings for uncensored/abliterated models render as mouseover hover labels (title tooltips), NOT as always-visible wall text; other descriptive additions display inline. Homepage model cards fused into a single "Model Information" component (app.js renderModelInfo, .mi-* classes) — the e2e user-homepage census counts #grid .panel .name, #grid .mi-name because of this. A wip:"down" state renders the red "WIP: DOWN" badge (Seerr, Calibre-Web, RomM, Jellyfin are WIP: DOWN, Open links removed). (context: serverAppConfig homepage Protoss wave 2026-10-08: /sfx/ ogg voices + unit art added; @data allowlist, deploy_homepage sfx block, caddy bats pin, e2e census fix (fused .mi-name cards) all required for a green deploy.)
- NEVER edit a bash script on disk while bash is executing it: bash reads scripts lazily by byte offset, so mid-run edits shift offsets and corrupt the remaining execution. On the 2026-10-07 Swift15 convert this made the plan "hot-patch the running convert script" impossible — the fix went to git (canonical copy) and the host file was left untouched until the run finished. Related corollary that bit the same night: a scp round-trip during an emergency edit silently dropped cleanup lines from scripts/convert-swift15-w4dn8.sh — after scp'ing a host file back as canonical, diff the whole file, not just the edited lines. (context: serverAppConfigs swift15-radiance campaign: convert running from host copy; kld.jsonl cleanup lines vanished through the scp-back path; verified via grep on the running host copy (landmine disarmed by accident).)
- Radiance qwen4exp_fp8 plugin law (measured at rad-convert declare, 2026-10-07, Swift1.5 campaign): ONE ENCODING PER EXPERT TABLE per layer — "one table of experts takes one encoding, and only a whole expert kept plain bf16 is served beside it" (rad_arch_declare). A recipe may NOT split ffn_gate_up_exps (w4 GPTQ) from ffn_down_exps (block-fp8): the serve kernel is a single w4nl64a8h table for the whole expert set; the only legal beside-table content is whole experts cast dtype=bf16 (the PROTECTED section). Related: the ukisai/Swift1.5-Qwen3.8-Flash-Next "BF16" checkpoint is pure BF16 (1655 BF16 + 3 I64 PLE-index tensors, HF tensor names — no fp8 storage); rad-convert maps HF names to blk.N.ffn_*_exps.M itself. rad-convert's positional input must be the in-container path INCLUDING subdirs (basename-stripping the mount prefix breaks nested checkpoint dirs like /models/ukisai/name). GPTQ receipt line to watch in convert logs: "libquant: GPTQ quantises 'tensor' against N calibration file(s), K=cols". (context: serverAppConfigs swift15-radiance-w4dn8 campaign, dankserver: the designed w4dn8 split tier was vetoed at rad-convert declare; recipe reduced to all-experts GPTQ w4 + 24 whole-bf16 protected experts (commit 73c37f4).)
- Dankclaw homepage family model names (2026-10-08, Frank's StarCraft Protoss theme): frank-large → frank-dragoon, frank-primary → frank-archon, frank-secondary → frank-zealot. Endpoint/API/OpenWebUI ids are UNCHANGED (frank-large/frank-primary/frank-secondary remain the ids agents and API configs must use). Frank's supervision classification: dragoon and archon are safe for autonomous low-supervision use; zealot requires tight human supervision. Compaction model for agent harnesses: frank-zealot (compaction jobs severely slow the bigger models). Frank's presentation preference: legal/uncensored warnings must be mouseover tooltip labels (⚠ hover-to-read), not visible wall text; other descriptive notes stay plainly visible. Media apps Seerr, Calibre-Web, RomM, Jellyfin are WIP: DOWN for family users (a third wip state "down" exists in services.json/badge CSS); Copyparty is the access point for all media apps' content including the WIP ones; Gitea and Plex use logins separate from the Authentik SSO; SearXNG is obfuscated-not-anonymous (upstream API keys tie to Frank's identity). Homepage assets: new top-level files (e.g. sfx/) must be added to the Caddy @data path allowlist AND the deploy_homepage copy list — same law as img/. (context: serverAppConfig homepage Protoss rename wave, commit 203b0be; component = Model Information fused panel in shared/homepage/app.js with /sfx/ voices fetched from starcraft.fandom.com (MediaWiki API: action=parse wikitext, {{sm2|File.ogg}} quotes, imageinfo URLs for unit art).)
- Dankclaw homepage live verification (serverAppConfigs): (1) The post-auth Caddy listener (http://:8017, @home handler) serves files ONLY through the @data path allowlist (@data path /services.json /status.json /app.js /style.css /deployed.js /img/* in dankclaw/Caddyfile); anything unmatched falls to the catch-all and is answered with index.html as 200 text/html — a PNG arriving as text/html passes every status-code and file-listing check, so verify assets by content-type/bytes, never by HTTP status. New top-level homepage assets MUST be added to @data (pinned in tests/homepage_caddy.bats). (2) Live-check guarded pages with the eval browser runtime: browser.open({url, name}) (single options object; same for browser.close({name})); browser.tabs() lists {name,url,title}; tab.evaluate(string) runs JS in the page and returns a string — inside it, escaping: the eval script is built in a JS template literal, so use '\n' (a raw \n interpolates and breaks page-code string literals); tab.url() returns an object, not a string. The shared headless browser keeps the qa-e2e SSO session, so https://www.franksdank.cloud/docs renders through Anubis+Authentik without manual login (the naked domain 308s to www and STRIPS the path — always probe www directly). Fetch-in-page probe: fetch('/img/x.png').then(r=r.status+' '+r.headers.get('content-type')+' '+blob.size) proved the @data bug; [...document.images].map(i=i.complete && i.naturalWidth0) proves rendering. (context: 2026-10-08 homepage amber-theme session: @data allowlist bug (img/* served as index.html), eval-browser live verification of /docs and AI cards through the guard chain)
- Running-bash-script and scp round-trip discipline (serverAppConfigs campaign ops): (1) NEVER edit a bash script on the host while it is executing — bash reads script files lazily by byte offset, so edits shift offsets and corrupt the remaining execution. Fix committed copies, sync after the job ends. (2) After scp-based host edits, the HOST file is the ground truth for any running job (e.g. rad-convert loaded the recipe at launch); before git merges on the host worktree, diff each locally-modified/untracked file against the branch tip and commit the host copy as canonical when it is what the job loaded — a partial/stale copy can silently get committed (a committed recipe lost 10 of 24 protected experts this way; the running convert proved it). (3) The convert-script cleanup section (rm corpus files) was silently lost during a python line-rewrite round-trip: after scripted edits, grep for the intended deletions/markers to prove they survived. (4) A truncated ls | head -N listing caused a false "corpus deleted" alarm — when a critical file is absent from a truncated listing, stat the file directly before declaring loss. (context: swift15-radiance-w4dn8 campaign 2026-10-07/08 on dankserver: KLD gate preparation between rad-convert stages)
- frank-large (Dankclaw halogen-flash-server) 400-zone law (2026-10-07/08): the harness clamps max_tokens = min(maxTokens, contextWindow − chars/4 est − 4096), and the est UNDER-counts the rendered prompt by ~3 % on code/agent traffic (measured twice: est 152,938 → server 157,388; est 158,906 → server 165,301). Compaction fires only at 85 % of the harness contextWindow, so window == engine ceiling made every request in the est ~146k–184k zone a guaranteed 400 ("max_tokens N does not fit: prompt is X tokens and the context is 200192"). Fix contract (deployed via scripts/frank-large.env): HALOGEN_CTX=262144 (native ceiling), HALOGEN_KV_POOL_POSITIONS=524288 (2×ctx, 14.0 GiB), models.yml frank-large contextWindow=217088 (= ceiling − 45k estimate headroom), maxTokens=45056; worst-case request ≈ 219k ≤ 262,144. Compaction input rides on frank-secondary: ≈ 170k ≤ its 200,704 slot. The general rule: a harness contextWindow must sit BELOW the engine ceiling by (maxTokens + reserve + est-error margin), never equal it. A "context is 200192" 400 after the env change means the OLD boot is still serving — deploy is pending, not the fix failing. (context: serverAppConfigs frank-large token-limit fix session 2026-10-08: env+bats+AGENTS.md+runbook edited, frank_large_unit.bats 20/20 green, full suite + deploy dankclaw --service frank-large pending at hand-off. Supersedes the older "clamp max_tokens to 57344" note.)
- Dank fleet + omp harness token-fit law (diagnosed 2026-10-07, frank-large halogen 400s): the engine fit check is prompt_tokens + max_tokens ≤ engine window (halogen HALOGEN_CTX, llama.cpp slot ctx — a 400, never truncation), while the omp harness clamps max_tokens = min(maxTokens, contextWindow − chars/4_est − 4096) and only compacts at compaction.thresholdPercent (85 % in config.yml; reserveTokens-16384/70 % comments in models.yml/AGENTS.md were STALE). chars/4 under-counts the rendered prompt by ~3 % on code/agent traffic (measured: est 152,938 vs server 157,388 = 4,450 the 4,096 margin). Consequence: if harness contextWindow == engine ceiling, every request above ~4096/0.03 ≈ 137-146k est (65-85 % of a 200k window) is a guaranteed 400 — the zone between where the estimate error exceeds 4096 and the 85 % compaction threshold. FIX shape: engine ceiling − harness contextWindow must exceed maxTokens + ~10 % of contextWindow (safety for est error). Deployed fix for frank-large: HALOGEN_CTX 200192→262144 (native), HALOGEN_KV_POOL_POSITIONS=2×ctx=524288 (~28 KiB/pos = 14.0 GiB), models.yml contextWindow 217088 (212×1024) keeping maxTokens 45056 → compaction fires at 85 % = 184,524 est ≈ 190k measured (Frank's 180k target), worst-case request ≈ 219k ≤ 262,144 with 42k slack, and the compaction input (threshold − keepRecentTokens 20,000 ≈ 170k) still fits frank-secondary's 200,704 compaction slot. Frank explicitly demanded reaching 180k tokens on frank-large; he considers prior config "misunderstood" — check these three numbers (CTX, contextWindow, thresholdPercent) together, never one alone. (context: serverAppConfig frank-large halogen-flash-server 400 "max_tokens does not fit" campaign, 2026-10-07; artifacts: scripts/frank-large.env, tests/frank_large_unit.bats fit-law test, models.yml frank-large block)
- OpenWebUI 0.6.x (open-webui on Dankclaw): external OpenAI-connection models are invisible to non-admin users unless a workspace row EXISTS in the model table (singular) with id == upstream model id, base_model_id NULL, is_active 1, PLUS an access_grant row (resource_type='model', resource_id=model id, principal_type='user', principal_id='*', permission='read'). The /api/models aggregation (utils/models.py get_filtered_models) DROPS models with no info for role=user; the workspace row supplies the info; the admin bypasses the filter, so admin UI looks fine while all family users see "No results found". An alias row (id != base_model_id) breaks chat completion ("Model not found") — id must equal the upstream id. API keys for regular users require user.permissions.features.api_keys=true in the config table (default false); the UI path is User menu → Settings → Account → API keys → Show → Create new secret key (0.6 layout, not the old SettingsAPI Keys tab). All three endpoints: DB at /home/dank/Containers/open-webui/data/webui.db (host), mount /app/backend/data; no sqlite3 CLI on host — use host python3; live process caches model lists ~1 s (MODELS_CACHE_TTL). The 2026-10-07 18:35 picker rebuild (frank-secondary swap) dropped the grants — fixed by inserting the row+grant pair.
- Dankclaw Authentik (auth.franksdank.cloud) human roster as of 2026-10-08: akadmin (pk 4, superuser, frank8465@protonmail.com), admin (pk 5, admin@franksdank.cloud, homepage-admins only — legacy setup-era account, deactivation pending Frank's call), alex (pk 15), ridley (pk 13), kassie (pk 14). Non-human: AnonymousUser, qa-e2e, qa-e2e-admin, svc-jellyfin-ldap, ak-outpost-* (path goauthentik.io/outposts). The human-user template (documented in serverAppConfigs-docs/Infrastructure/Authentik.md §User provisioning playbook) = username + user@franksdank.cloud + display name + is_active + set_password + groups {Non-Admin Users, jellyfin_users, openwebui_users}; EXCLUDE authentik Admins / homepage-admins / *admins. Audit a user row BEFORE deleting: MFA device tables (authentik_stages_authenticator_{totp,webauthn,static,email,duo,sms}*device), authentik_core_token, app entitlements, authentik_providers_proxy_proxysession (stale claim cache). Event history survives a user delete (authentik_events_event "user" is denormalized JSONB, filter with "user"-'pk'='N'). Column names in the authentik-postgres DB differ from the ORM: certificatekeypair has no user_id, authentik_core_user has no source_id, events column is quoted "user" (jsonb) — select * / information_schema first, never guess. Passwords travel only on the ak shell stdin (heredoc over ssh), never argv/ps. (context: 2026-10-08 session on Dankclaw: created kassie (pk 14), deleted pk 7 and recreated alex (pk 15) into the template, audited via ak shell + direct psql against authentik-postgres. Roster verified live with User.objects.exclude(path__startswith="goauthentik.io").)
- Dank fleet operational constraint (from Frank, 2026-10-07, verbatim intensity intact): "DO NOT FUCKING TOUCH ANYTHING BELONGING TO FRANK-PRIMARY" while dankserver's radiance box is running a multi-day quantization job (the Swift15-radiance KLD/calibration campaign). Practical meaning for an agent: do not restart, redeploy, benchmark, mask, flag-tune, or commit-and-push changes to scripts/frank-primary.env / frank-primary.service / serve-frank-primary.sh, and do not run the fleet-wide deploy.sh dankserver drain (it walks every service revision marker and would fire the frank-primary restart). Test failures that belong to frank-primary (e.g. tests/frank_primary_unit.bats asserting FRANK_PRIMARY_MAX_SEQS=2 while the env says 3) are NOT yours to fix during the window — commit only the files in your own task's blast radius; a green-suite gate yields to the campaign. Second signal from the same window: when Frank reports an endpoint healthy and says "no need to verify", stop benchmarking — record the evidence you already observed (boot ledger, e2e gate) and name the evidence gap explicitly instead of probing further. (context: serverAppConfigs session 2026-10-07: frank-secondary (Dankclaw) swap work was blocked by a pre-existing frank-primary test failure; asking about resolving it drew the hands-off instruction. Deployed frank-secondary at ec6184d/5278f5b with frank-primary untouched.)
- Dank fleet (serverAppConfigs): every LLM serve script is a DIRECT systemd ExecStart (frank-primary/large/secondary), so rewriting one with a file-writing tool that drops #!/usr/bin/env bash makes the unit boot-loop with status=203/EXEC, Mem peak: ~1.9M, Failed at step EXEC spawning /home/dank/.../serve-svc.sh in the journal, and nvidia-smi flat at 1 MiB (the GPU is never touched). Diagnostic: 203/EXEC + zero GPU use = the script never ran; check head -1 and the exec bit (git ls-files -s shows the tracked mode; git preserves it, so a non-exec mode is committed drift). systemctl status's unit Description shows the LAST-deployed era's text, not the repo's — a stale Description is cosmetic until the next relink_unit (don't restart a serving endpoint for it). Related llama.cpp fact: the log line n_ctx_seq (N) n_ctx_train (M) is informational when N M (context below the trained window is safe); it is only alarming when a drafter runs ABOVE its own n_ctx_train. (context: 2026-10-07 frank-secondary Qwen3.5-9B swap on Dankclaw: my rewrite of scripts/serve-frank-secondary.sh lost the shebang; the unit restart-looped 14 times (10 s apart) before the deploy's health gate; fix commit ec6184d. Boot ledger after the fix: 21,436 MiB used / 2,689 free, KV 12,544 MiB f16 K + f16 V.)
- llama.cpp master (build 5fc4f3c) attention_k_eq_v does NOT shrink the KV cache — the cache bills the K+V pair TWICE: 6.125 B/elem at f16 K + q8_0 V, 2.125 B/elem at q8_0/q8_0. Verified byte-exactly on Gemma4-26B-A4B (frank-secondary, dankclaw 3090, 2026-10-07) against the engine's own verbosity-4 llama_kv_cache lines: full cache = n_full_layers × n_head_kv × head_dim × rate × ctx = 5 × 2 × 256 × 6.125 × 200,704 = 3,001.25 MiB ✓; SWA cache = n_swa_layers × window × n_head_kv_swa × head_dim × rate = 25 × 1024 × 8 × 256 × 6.125 = 306.25 MiB ✓. Vcur = Kcur is a compute-graph mapping only. Also: read n_head_kv per layer (it is an ARRAY — gemma4 has 8 KV heads on sliding layers, 2 on full-attention layers) and sliding_window_pattern from the load log at verbosity ≥3, never from the HF config's single-value fields. Lesson: earlier fleet notes claimed the pool "bills K-only" (2.05 GiB at 200,704) — that figure came from arithmetic, not from the engine; a rate law must be fitted to the engine's own printed buffer sizes (-v/--log-verbosity 4 makes them appear in the journal). (context: serverAppConfigs frank-secondary Gemma4 swap 2026-10-07: the f16-K raise (+2,161 MiB KV) booted at 21,868 used / 2,257 free because the ubatch 2048→1024 cut returned ~616 MiB of compute buffer; decode measured 139.9 t/s temp 0. Runbook: serverAppConfigs-docs/LLM/frank-secondary-llama-gemma4-q4km-200704.md)
- frank-secondary (Dankclaw RTX 3090, :7771) runs Gemma4-26B-A4B QAT Uncensored Q4_K_M (HauhauCS, 16,780,192,888 B) since 2026-10-07, ONE 200,704-token slot (--parallel 1), f16 K + q8_0 V, MTP OFF. Measured VRAM (nvidia-smi at boot, the referee, not arithmetic): MTP OFF = 21,890 MiB used / 2,235 free; MTP ON (separate gemma4-assistant sidecar mtp-gemma-4-26B-A4B-it.gguf, 0.252 GiB, loaded via --spec-draft-model + --spec-type draft-mtp) = 23,806 / 319 free. So the drafter costs ~1.9 GiB. Gemma4 Q8 with 2×200,704 is IMPOSSIBLE on the 24 GB card (weights alone ~26 GiB). Measured engine facts, not estimates: the assistant warns "n_ctx_seq (200704) n_ctx_train (131072)" (draft ctx is built at the target's full window, 53 % past the assistant's trained window) and declares shared-KV layers (main-model layers 0-3 sharing with 28/29); the main model's n_ctx_train is 262,144, so 200,704 is inside its trained window. With MTP off the main boot prints neither warning. Q4_K_M 1×200,704 with the MTP assistant is knife-edge; MTP off leaves ~2.2 GiB margin, which is what funds raising K to f16 (+2.05 GiB: 5 full-attention layers × 200,704 tok × 8 heads × 256 dim × 2 B). All three fleet endpoints (frank-primary, frank-large, frank-secondary) now use frank-secondary as compactionModel; compaction input fits its 200,704 window (~133k worst case) — a single --parallel 1 slot means compaction requests serialize behind live generation. (context: serverAppConfig main branch, 2026-10-07 frank-secondary swap from Swift-1.5-Qwen3.8-27B RCO-IQ3_XXS (2×114,688) to Gemma4-26B-A4B Q4_K_M; VRAM numbers read from live nvidia-smi boots, warnings from journalctl -u frank-secondary.)
- Gemma4-26B-A4B Q4_K_M on the RTX 3090 (frank-secondary, dankclaw), MEASURED boot 2026-10-07 — supersedes the same-morning head-math estimate that said 1×200,704 does NOT fit: Q4_K_M 1×200,704 ctx with q8_0 K+V BOOTS with margin: 21,890 MiB used / 2,235 MiB free. With MTP assistant loaded it is 23,806 / 319 (drafter costs ~1.9 GiB — its KV is built against the target's full window). Key sizing facts: KV scales ONLY with the 5 full-attention layers of 30 (25 sliding-window layers at window 1024 cost a fixed 1024-token ring each), 8 KV heads × 256 dim; attention_k_eq_v=True makes Vcur=Kcur in the compute graph (gemma4.cpp: absent wv → Vcur = Kcur) and in llama.cpp build 5fc4f3c the KV cache honors k_eq_v (pool measured ~2 GiB at 200,704, matching K-only accounting), so bill K-only, not 2×. llama.cpp master build at commit 5fc4f3c accepts cache types: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1 — NO fp8/f8 (user asked for "FP8 KV" → q8_0 is the FP8 class and is what ships). MTP for Gemma4 is a SEPARATE gguf (arch gemma4-assistant) loaded via --spec-draft-model + --spec-type draft-mtp; disabling = SPEC_TYPE=none which must strip BOTH flags (flags move as a set). The endpoint serves ONE 200,704 slot, MTP OFF, vision via publisher mmproj. (context: serverAppConfig frank-secondary swap 2026-10-07: HauhauCS/Gemma4-26B-A4B-QAT-Uncensored-HauhauCS-Balanced-MTP Q4_K_M replaced Swift-1.5-27B at 2×114,688. Verified via llama-server argv, /v1/models (n_ctx 200704, ftype Q4_K_M), nvidia-smi. Corrects the earlier estimate memory entry that claimed 1×200,704 needed ~29 GiB.)
- llama.cpp build (commit 5fc4f3c, 2026-10-01) KV cache types: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1. NO true fp8 KV dtype — q8_0 is the "FP8 class" (1.0625 B/elem, 8.5 effective bits). The grep -ac arch on the llama-server binary returns 0 for ALL arch names (including qwen3_5 which it's actively serving) — the arch strings are stored in a packed/constructed form that grep can't catch; use source registration (llama-arch.cpp) to verify arch support, not binary grep.
- Gemma4-26B-A4B (google/gemma-4-26B-A4B-it) VRAM fit on the RTX 3090 (24,125 MiB), computed 2026-10-07 for the frank-secondary replacement question: Q4_K_M 2×200,704 does NOT fit — estimated ~33 GiB. Breakdown: weights 17,958 MiB (Q4_K_M 16,018 + mmproj-BF16 1,700 with compute buffers + MTP assistant 240) + KV pool 7,864 MiB (401,408 tok × 5 full-attn layers × 8 KV heads × 256 dim × 2 [K+V] × 1 B q8_0) + MTP draft KV ~1,600 MiB + compute/runtime overhead ~5,800 MiB. The swing factor: Gemma4 is MoE hybrid, 30 layers = 25 sliding-window (fixed 1024 ring) + 5 full-attention (layers [5,11,17,23,29]), so KV scales only with the 5 full layers, not 30. CRITICAL non-obvious build fact: in llama.cpp master build 5fc4f3c, attention_k_eq_v: True makes Vcur=Kcur in the compute graph (gemma4.cpp: Vcur = wv ? ... : Kcur), but the KV CACHE still allocates full 2× (K+V) — there is no k_only flag, so k_eq_v does NOT halve the pool. Feasible shapes: Q4_K_M 1×64k (~24.4 GiB, razor-thin) or Q3_K_M 1×128k (~24.1 GiB, needs a Q3_K_M download); dropping MTP saves ~1.6 GiB. Gemma4 MTP is a SEPARATE file (mtp-gemma-4-26B-A4B-it.gguf, arch "gemma4-assistant") loaded via --spec-type draft-mtp, unlike Swift's in-file MTP head. Diagnostic lesson: grep -ac arch llama-server returns 0 for EVERY arch name (including qwen3_5 which it's actively serving) because the packed binary doesn't expose arch names as plain strings — do NOT use grep to check arch support; check the source tree (src/models/gemma4.cpp exists at the build commit) instead. (context: serverAppConfigs, frank-secondary (llama.cpp on RTX 3090, Dankclaw) — evaluating HauhauCS/Gemma4-26B-A4B-QAT-Uncensored-HauhauCS-Balanced-MTP as a replacement; build /home/dank/GitPackages/llama-master/build-cuda/bin/llama-server at commit 5fc4f3c.)
- Two durable lessons from the Swift15 campaign (2026-10-07, dankserver): (1) The script-swap law applies to plain scp too: overwriting a bash script a running process owns shifts its lazy-read byte offset — when the long child (podman run | tee) exits, bash resumes mid-token and dies rc=127 ("--security-opt: command not found") AFTER the real work succeeded. Recovery pattern: gate on the engine's own receipt (e.g. kld.json "rows": 50235 + file count + size) and resume the pipeline with a SKIP flag (kld-then-calib.sh SKIP_KLD=1); never restart the long job over a wrapper death. (2) serverAppConfigs docs seam "docs index links every docs page" (tests/docs_completeness.bats) requires every new page under serverAppConfigs-docs/ to be linked from the TOP-LEVEL serverAppConfigs-docs/index.md — a link in the sub-index (LLM/index.md) is not enough; add the top-level entry in the same commit as the page. (context: serverAppConfig swift15-radiance-w4dn8 branch: KLD recording wrapper killed by mid-run scp of commit 45de2fd (rc=127, record intact); docs seam 135 failed until the new runbook was linked from the top-level index.)
- Overwriting a running bash script (scp/git checkout) shifts bash's lazy-read byte offset: the running script resumes mid-line at the next read boundary and executes garbage — symptom is a bogus "line N: token: command not found" and exit 127 AFTER the real work finished. Recovery pattern: judge the ARTIFACT, not the wrapper — e.g. radiance KLD record was complete (kld.json rows: 50235) despite the wrapper's rc=127; add a resume flag (SKIP_KLD=1) that gates on the artifact receipt (rows count, file count, size floor) and skips straight to the next phase. Prevention: campaign-named script files launched once per phase; never scp a script a running process owns; sync edits BEFORE launch. (serverAppConfigs 2026-10-07: mid-run scp of a perf edit killed the 4-hour KLD wrapper; KLD reference 24 GiB/50,235 rows survived.) (context: Third fleet occurrence of the bash script-swap hazard (after the 2026-10-01 autoresearch collision); this one added the artifact-receipt resume pattern.)
- Radiance (StillDeadcode) VRAM ledger laws on dankserver R9700 (32 GiB card), measured 2026-10-06 bf16 disk-tier boots: the weights slab DERIVES as card − headroom − vram-kv-mib; the engine refuses (DID NOT FIT) and never shrinks for you. The disk tier has a hard weights floor of 9.57 GiB (4.21 GiB of two layer buffers + 5.36 GiB fixed weights) — so on a 32 GiB card with ~18 GiB fixed per-rank claims (QSA/DeltaNet/arena), --vram-kv-mib is capped near 3.5 GiB; 3072 MiB is the safe value, 4608 starves the disk tier. The ratio-derived pool (default EVC split) came up SHORT by 217 MiB at 32×16k fp8-KV slots — for offline (KLD/calib) shapes set --vram-kv-mib explicitly. Disk-tier prefill rate is STEP-SIZE-driven, not slot-count: MNBT 32768 warms to ~1,360 tok/s, MNBT 65536 ≈ 930 (vendor); slot count only queues pushes. Also: a foreground-podman systemd unit (frank-primary pattern) shows systemctl is-active=failed after every intentional stop (main process exits 143 on SIGTERM) — cosmetic, not a crash; check ExecStop status + journal, not is-active. (context: serverAppConfig swift15-radiance-w4dn8 campaign 2026-10-06: three boot failures on the bf16 KLD/calib shape cost two relaunch cycles; the slab formula + disk-tier floor explain all three.)
- Radiance offline-run (KLD record / calibration serve) sizing law on dankserver, measured 2026-10-06 with the bf16 qwen4exp container: the VRAM weights slab DERIVES as card − headroom − KV, and --weights-disk-tier REFUSES under ~9.57 GiB (4.21 GiB layer buffers + 5.36 GiB fixed) — so on a 32 GiB card, explicit --vram-kv-mib must stay ≤ ~3.5 GiB for offline arms (3072 works with --max-num-seqs 4 at 16k fp8); the ratio-derived default came up SHORT by 217 MiB at 32×16k and the engine never shrinks for you. Recording is prefill/disk-bound, so fewer resident slots only queue pushes. Also: the image ENTRYPOINT is already radiance (passing "radiance" as argv → "E unknown option 'radiance'" rc=2), and the image has no ls — exec probes use sh. (context: serverAppConfig swift15-radiance-w4dn8 campaign 2026-10-06: three failed KLD boots (entrypoint arg, KV SHORT, weights-slab starvation) before the offline shape booted; codified in scripts/run-swift15-bf16.sh comments.)
- Radiance (StillDeadcode) engine-feature probes MUST grep the architecture plugins, not just the binaries: model-specific features (calibration tap, KLD, QSA) live in /opt/radiance/share/radiance/architectures/arch.so (e.g. qwen4exp_fp8.so carries RADIANCE_CALIB_DIR/RADIANCE_CALIB_TOKENS on 1.2.0; the 1.0.13 plugin has RADIANCE_CALIB_DIR only) and quantizers in share/radiance/quantizers/libquant.so (gptq has calib=/damp/act_order/cd on BOTH 1.0.13 and 1.2.0). Grepping only bin/radiance produced a false "1.0.13 has no calibration tap" verdict. ALWAYS run a positive control (grep -c a string known present, e.g. kld-record) in the same probe; the image has NO strings(1) — use grep -ac on binaries. The radiance image ENTRYPOINT is already radiance: passing "radiance" as argv to podman run yields "E unknown option 'radiance'" rc=2. (context: serverAppConfig swift15-radiance-w4dn8 campaign 2026-10-06: GPTQ Hessian pipeline version-blocker investigation on dankserver; two false negatives (missing strings tool; grepping the wrong file) cost a pin re-evaluation.)
- omp harness max_tokens clamp (pi-ai simple-options.js): max_tokens = min(models.yml maxTokens, contextWindow - estimateContextTokens - 4096). The 4096 CONTEXT_SAFETY_TOKENS is hardcoded in node_modules. estimateContextTokens = last assistant usage.totalTokens (actual from server) + Math.ceil(chars/4) for trailing messages after the last assistant turn. The chars/4 heuristic underestimates code-heavy content by ~2.8%, so in coding-agent sessions with tool results the estimate can be 4000+ tokens low, exceeding the 4096 safety buffer. Engines differ in how they handle over-cap max_tokens: Halogen (flash-server) returns 400 (max_tokens N does not fit: prompt is P and the context is C, leaving room for R), llama.cpp silently clamps. Fix: lower maxTokens in models.yml so the harness clamp stays under the engine's actual room even with estimation error. Halogen's max_tokens INCLUDES thinking tokens (no separate thinking budget field sent on the OpenAI path — thinkingTokenBudgetField is undefined for Halogen).
- OMP harness max_tokens clamp (pi-ai/dist/api/simple-options.js): max_tokens = min(maxTokens, contextWindow − estimateContextTokens − 4096). estimateContextTokens = last assistant usage.totalTokens + Math.ceil(chars/4) for trailing messages (pi-ai/dist/utils/estimate.js). The chars/4 heuristic underestimates code-heavy content by ~2.8 %; CONTEXT_SAFETY_TOKENS = 4096 is hardcoded in node_modules (cannot be patched via config). Compaction threshold is contextWindow − reserveTokens (default 16,384 in config.yml), NOT the stale thresholdPercent: 70 comment in models.yml. Fix pattern for 400 "max_tokens N does not fit": lower maxTokens in models.yml to ≤ contextWindow − compactionThreshold − worstCaseEstimateError so max_tokens = maxTokens (fixed) rather than available (variable). Applied 2026-10-06: frank-large 57,344→45,056, frank-primary 36,864→16,384. (context: serverAppConfig, 2026-10-06: diagnosed 400 "max_tokens 50013 does not fit" from frank-large; traced through pi-ai simple-options.js clamp + estimate.js chars/4 heuristic; fixed by lowering maxTokens in models.yml)
- Approved design (grilling session 2026-10-06, Frank's answers; execution pending — start with the purge + download + recipe file, service live). Goal: convert ukisai/Swift1.5-Qwen3.8-Flash-Next (335.3 GiB BF16) and serve it on frank-primary (radiance, 2×R9700 TP=2, dankserver:7770). Decisions: in-place swap of frank-primary (FP8-native .rad kept as rollback); engine pinned to the radiance 1.2.0 digest; keep the vendored Froggeric v22.5 template (verified: it handles vision + exposes tool_call_format) and sampler 1.0/0.95/20; base recipe = qwen4exp-w5dn64-i8-hc8m with the expert rules replaced by down = rtn codes=fp8_e4m3 block=128x128 scale=bf16 and gate_up = gptq table=w4nl group=64 … cd=3 calib=$CALIB (Frank's "down w8, rest w4"); everything else verbatim (i8 trunk, hc/mtp fp8 rows, ple_ngram fixed scale 1.99317932128906e-4, u2 draft head, QSA indexer + norms untouched). Expected container ≈130–140 GiB, experts ≈38 GiB/rank. Ten protected bf16 experts recomputed for Swift from per-expert down-Hessian energy + routing share from the engine's expert-selection metrics (even count per rank half). Quality gate: text+assistant mean KL ≤ 0.03 and top-1 ≥ 95 % (KLD corpus 1.8M tokens, source-labelled, rendered with Froggeric, disjoint from calibration); throughput gate decode ≥ 31.72 t/s × 0.97 and prefill ≥ −20 % vs the replicated baseline; on quality failure escalate gate_up w4→w5nl (pre-authorized, Grams reusable). Calibration corpus 10M agent-shaped tokens (45 % code / 30 % prose / 25 % tool JSON). Shape carried over: TP=2, wht6, seqs 3, maxlen 200000, MNBT exactly 2048 (MTP resonance law), KV fp8, spec 2, PLE in RAM, host pool 40960, with an in-window EVC bracket {0.82, 0.90, 0.95} because the smaller expert mass changes the residency optimum. Drain the whole campaign (multi-day, no clock). Disk: purge .AGENTTRASH glm-purge (172 GB) + v4flash-abandoned (42 GB) + models/stage-qwen4exp-fp8 (211 GB) + models/Qwen3.8-Flash-Next-Uncensored-FP8 (173 GB) + models/Qwen/Q (context: serverAppConfig, frank-primary (radiance, dankserver). Grilling session produced a 25-decision design tree; Frank accepted every recommendation except Q4 (kept Froggeric over Swift's own template) and Q9/Q16 (chose the down=fp8/gate_up=w4 hybrid over the recommended all-fp8 experts). Confirmation to execute was pending when the session context ended; nothing on disk had been changed yet (working t)
- radiance (StillDeadcode) precision facts, verified in source at /tmp/rad-src (Codeberg main, 1.2.0): (1) There is NO servable 6-bit tier. codes= accepts fp6_e2m3/fp6_e3m2/u6/i6 and table= = {nf4, iq4nl, w4nl, w5nl, binary, ternary}, but the qwen4exp MoE block serves exactly kServed[8] = {fp8a8, w4a8, w4a8h, bf16, w4nla8h, w4nl64a8h, w4nl32a8h, w5nl64a8h} (arch/common/rad_block_moe_fp8.h:457); dense serves fp8a8/i8a8/fp8a16/mxfp4a8/bf16 + w2 draft head. "A container can hold only what some kernel reads" — rad-convert REFUSES an encoding no kernel reads (docs/TOOLS.md:184), so a q6 recipe fails at convert, not at boot. (2) Published Flash-Next quality ladder (docs/MOE-W4.md:24-32, mean KL / top-1, all tokens): w4nl64a8h served 0.0789/92.85%, w5dn64 0.0717/93.34%, bf16 floor 0.0399/95.13%; text+assistant scope w5dn64 = 0.0204/95.10%. Any KL gate ≤0.05 on the all-token scope is unreachable by every quantized tier. Author's lever (MOE-W4:68): 5 bits on layers 16-31 both projections, ~0.066 expected. Heavier expert tiers cost PREFILL (w5dn64: decode +4%, prefill −19%). (3) Calibration: the ENGINE records — serve with RADIANCE_CALIB_DIR [+ RADIANCE_CALIB_TOKENS, default 65536], drive prefill, it writes gram.rrank.weight stem.bin once. A BF16 Flash-Next (335 GiB) serves on two cards via --weights-disk-tier and records ~930 tok/s (10M in 3 h) — documented verbatim (MOE-W4:244-253, GUIDE:529). down gets a per-expert Hessian; gate_up is pooled per layer. GPTQ adds "tens of minutes" per 48-layer container + 1.3 GB factor cache. (4) Scoring: radiance --model BF16.rad --kld-record DIR --kld-corpus C.jsonl once (exact wire + bf16 KV), then --kld-ref DIR --kld-out REPORT.json per candidate; report is per source, so turn-type scopes come from labelling the corpus's source field; corpus must be disjoint from the calibration corpus; speculation/prefix-cache off in that mode, MNBT ≤ ~8192 (logits buffer 2 GiB/rank per 4096 tokens). (5) ukisai/Swift1.5-Qwen3.8-Flash-Next: 335.3 GiB BF16 (context: Grilling session 2026-10-06 on serverAppConfig: designing a rad-convert recipe for ukisai/Swift1.5-Qwen3.8-Flash-Next on frank-primary (radiance, 2×R9700 TP=2). Facts gathered from a shallow clone of Codeberg StillDeadcode/radiance + HF API/safetensors-header probes; a scout subagent died on frank-secondary's 131k slot overflow (exceed_context_size_error) so the facts were collected inline.)
- radiance (StillDeadcode) serve-side precision surface, verified from source (clone of main, 2026-10-06) — the quantizer can WRITE more widths than any kernel can RUN, and rad-convert enforces it: "A container can hold only what some kernel reads. The converter checks every planned encoding against the layout hooks of the kernels declare resolved and refuses one nothing accepts" (docs/TOOLS.md:184-186). Consequences: (1) NO 6-bit tier exists — codes= accepts fp6_e2m3/fp6_e3m2/u6/i6 (libquant/lq_quant.h:15-17) and RAD_FP6E2M3 is a real ABI dtype (abi/rad_types.h:186), but libr4d has zero fp6 GEMM rows (lq_common.h:105 calls the fp6 grids conversion-only) and table= codebooks stop at five bits: nf4, iq4nl, w4nl, w5nl, binary, ternary (lq_quant.h:19) → a q6/fp6 recipe FAILS at rad-convert, not at boot. (2) The qwen4exp MoE block serves exactly 8 formats, arch/common/rad_block_moe_fp8.h:457: kServed = fp8a8, w4a8, w4a8h, bf16, w4nla8h, w4nl64a8h, w4nl32a8h, w5nl64a8h — anything else is RAD_E_DTYPE (error names the list, :671); dtype is chosen PER PROJECTION PER LAYER (:396), so fp8 down + w5nl gate_up in one container is legal. (3) Dense/trunk GEMMs serve bf16, fp8a8, fp8a16 (m1/mt), i8a8, w4a16/w4a8(+tiled/prefill/asym), w8a16/w8a8, mxfp4a8, and w2a8 for the draft head (libr4d/r4d.h:430-670, r4d_moe.hip:2393-2527). (4) Calibration has no recorder tool: the ENGINE records — serve with RADIANCE_CALIB_DIR (+ RADIANCE_CALIB_TOKENS, default 65536), drive prefill traffic, it writes per-layer Grams and prints "radiance: calibration wrote layer Hessians after N tokens to dir"; calib= is accepted by gptq/awq/autoround/paroquant, unset $CALIB is refused, a weight with no Gram is quantised uncalibrated and says so on stderr (docs/MOE-W4.md:229-271, TOOLS.md:158). (5) A BF16 Qwen3.8-Flash-Next checkpoint (335 GiB) can be SERVED on two gfx1201 cards via --weights-disk-tier (~28 s a step, ~930 tok/s recorded, 10M tokens ≈ 3 h) precisely to record bf16-domain Hessians for a GPTQ recip (context: serverAppConfig, 2026-10-06: grilling session for converting ukisai/Swift1.5-Qwen3.8-Flash-Next to radiance with a qwen4exp recipe; asked to "bump q4/q5 to q6/fp6" and the kernel library proved that impossible. Facts from /tmp/rad-src (clone of Codeberg StillDeadcode/radiance main) corroborated by a scout run.)
- Radiance (StillDeadcode) precision facts — primary-source research 2026-10-06, not yet in local docs. PROJECT MAP: codeberg.org/StillDeadcode/radiance = the standalone C++/HIP engine (what frank-primary runs; latest 1.2.0, 2026-10-06); codeberg.org/StillDeadcode/vllm-radiance = DEPRECATED vLLM wrapper ("I ditched vLLM… it is faster, easier to work on, starts faster and has less cpu overhead"); codeberg.org/StillDeadcode/libr4d = shared kernel library, entry points named for exact geometry and rejecting mismatch (attn_decode_h256_gqa6_fp8kv, gdn_chunk_scan_k128_v128_c64_bf16, ar_oneshot_2rank_exact). PRECISION LADDER: block-FP8 (E4M3 codes + bf16 block scales) is the native tuned path — the "preshuffled block-FP8 dispatcher"; replacing it with generic upstream AITER linear is 9–11 % slower in matched controls, and every upstream-qualified model is FP8 (Qwen3.8-27B-FP8, Qwen3.6-27B-FP8, Qwen3.6-35B-A3B-FP8, Gemma-4-31B-it-FP8). MXFP4/W4A8 (AMD Quark weight path) stores packed OCP group-32 MXFP4 weights "and dynamically quantizes activations to FP8 E4M3 so the kernels use RDNA4's native FP8 WMMA path" — compute is FP8 regardless of weight packing. bf16 = KV (auto), skinny GEMMs, GDN (gdn_chunk_scan_…_bf16). INT4/INT8 = draft head (decoder projections "packed to signed symmetric int4… 4.25 bits per weight", int8 kernel above 16 rows). HARDWARE "WHY": RDNA4 WMMA is integer-biased — "gfx1201's f16 matrix instruction is half the rate of its int8 one and a quarter of its int4 one" ⇒ int4 int8 f16; FP16 saturates the 128-bit memory interface natively while FP8/INT8 need a fused double-K WMMA to reach 128-bit loads (AMD GPUOpen WMMA guide part 2). Sources: codeberg StillDeadcode/radiance + /libr4d + /vllm-radiance READMEs, github.com/magiccodingman/vllm-radiance fork README, gpuopen.com/learn/wmma-guide-amd-rdna-4-gpus-part-2. (context: Online research for the radiance precision question (serverAppConfig, 2026-10-06); findings are pending a docs fold-in and feed the Swift1.5-Qwen3.8-Flash-Next rad-convert recipe design.)
- Radiance (StillDeadcode) tensor-precision picture — verified 2026-10-06 from primary sources. Project map: codeberg.org/StillDeadcode/radiance = the STANDALONE engine (C++/HIP, no Python) that frank-primary runs; codeberg.org/StillDeadcode/vllm-radiance = DEPRECATED vLLM wrapper ("I ditched vLLM… standalone is faster, starts faster, less CPU overhead"); codeberg.org/StillDeadcode/libr4d = shared kernel library, entry points named for exact geometry (e.g. attn_decode_h256_gqa6_fp8kv, gdn_chunk_scan_k128_v128_c64_bf16, ar_oneshot_2rank_exact) and it rejects a shape mismatch rather than running. Precision ladder: (1) block-FP8 (E4M3 codes + bf16 per-block scales) is the NATIVE tuned GEMM path = the "preshuffled block-FP8 dispatcher"; replacing it with generic upstream AITER linear = 9-11% slower in matched controls; all upstream-qualified models are FP8 (Qwen3.8-27B-FP8, Qwen3.6-27B-FP8, Qwen3.6-35B-A3B-FP8, Gemma-4-31B-it-FP8). (2) Compute is FP8 WMMA on RDNA4's native matrix core — even the MXFP4/W4A8 (AMD Quark) weight path DYNAMICALLY quantizes activations to FP8 E4M3 to hit that native FP8 WMMA path (so compute is FP8 regardless of weight packing; MXFP4 = packed OCP group-32 weights). (3) bf16 = KV cache (the auto/bf16 option; fp8 is the qualified mandatory default), skinny GEMMs (split-K for small projections), and GDN (gdn_chunk_scan…_bf16, an fp16 matrix-core WMMA gated-delta-net path). (4) INT4/INT8 = draft head (drafter decoder projections "packed to signed symmetric int4… 4.25 bits per weight", int8 kernel above 16 rows). HARDWARE "why" (RDNA4 WMMA, gpuopen.com/learn/wmma-guide-amd-rdna-4-gpus-part-2): the matrix core is integer-biased — "f16 matrix instruction is HALF the rate of int8 and a QUARTER of int4", so hardware ranking int4 int8 f16; FP16 saturates the 128-bit memory interface natively but FP8/INT8 only do 64-bit loads, so the tuned GEMM kernels FUSE two WMMA instructions (double-K / K-dimension) to enable 128-bit vector loads and hit peak bandwidt (context: serverAppConfigs LLM fleet — answering "what tensor precisions does the radiance runtime like"; online research against StillDeadcode Codeberg repos + AMD GPUOpen WMMA guide.)
- radiance runtime (StillDeadcode C++/HIP engine, libr4d kernels for gfx1201) tensor-precision support: FIRST-CLASS/native = grouped/block-FP8 (E4M3 codes + bf16 per-block scale planes) — the ACTIVE frank-primary serves the official Qwen3.8-Flash-Next-FP8 natively with no requantisation (the qwen4exp_fp8 plugin is built around it). The vllm-radiance wrapper line (frank-medium, frank-primary R9V) extends the same libr4d kernels to a quant ladder: MXFP4/MXFP6 (ParoQuant W4A8, e4m3fn scale, group_size=128, krot=8), Q8_0, IQ4_XS. KV cache: fp8 native (7.32 KiB/token on frank-primary) or bf16 unquantized (--kv-cache-dtype auto). Scales: bf16 (block-FP8 planes, PLE one-element scale). Speculation draft heads: blockfp8 (MTP/DFlash2). TP wire: wht6 = lossy FP8-class fused one-shot all-reduce (vs --tp-wire exact bit-exact). The distinction that matters: "radiance" (pure engine, no Python, native block-FP8) vs "vllm-radiance" (vLLM front end over the same kernels, the quant ladder). Sources: serverAppConfigs-docs/LLM/frank-primary-radiance-qwen38-native-fp8.md, frank-medium-radiance-mxfp4.md, frank-primary-r9v-radiance-qwen38-q8.md, RDNA4 Container Serving.md §1. (context: Answered "what tensor precisions does radiance runtime like?" from the serverAppConfig LLM runbooks.)
- serverAppConfigs shared-checkout diagnostic (proven 2026-10-06): to determine the TRUE position of a dirty shared checkout, do NOT trust the abbreviated git reflog tail — it can show commits (e.g. c80c250) as recent HEAD@{N} that are actually ORPHANED (the branch was reset away from them; they're reachable only via reflog). Verify with three agreeing sources: git rev-parse HEAD, git for-each-ref refs/heads/branch, and git log --oneline (tip). In the 2026-10-06 case, the reflog tail showed ...81e6122 - 95923d3 - df6b5bb - c80c250 commit as the last entry, but HEAD+branch+log all sat at 81e6122 — the three bench commits were orphaned after an autoresearch sweep (final commit c80c250 concluded "KEEPING Frank's config", so the branch was reset back to the harness commit 81e6122). Also: an UNSTAGED, uncommitted deletion of a tracked file that is present on the target branch is LOSSLESS to git restore -- file (it's pure working-tree state, in no commit); confirm with git ls-files --stage file (tracked?) + git ls-tree branch -- file (present on target?). This is the safe "clean up the working tree" move before git checkout branch. (context: Cleaning up the serverAppConfigs shared checkout and returning to main (2026-10-06): resolved an apparent reflog/log discrepancy on the autoresearch/...frank-pri-20261006 branch, restored an unstaged deletion of autoresearch.sh, and switched to main.)
- Ops laws confirmed live 2026-10-06 on dankserver: (1) Fleet containers are ROOTLESS under user dank — sudo podman ps/logs queries the empty ROOT store and shows NOTHING; production appeared "gone" while radiance was serving fine. Always query podman ps / podman logs AS dank without sudo; verify liveness via ss -ltnp (radiance pid on :7770) or /health. (2) frank-primary logging trap CONFIRMED: scripts/serve-frank-primary.sh runs podman run -d ... "$LOG", so /home/dank/logs/frank_primary.log holds 65 bytes (one container-ID hex line) and the boot ledger lives ONLY in podman logs frank-primary (rootless, as dank). Fix = foreground podman run under Type=simple (pattern proven on frank-large, commit ba67ca5); queued as post-segment maintenance commit (serve script is off-limits inside the autoresearch segment). (3) The radiance engine logs NO per-request draft acceptance server-side; timings.draft_n/draft_n_accepted are returned to the CLIENT only — any real-traffic spec-depth A/B needs a client-side collector. (context: 2026-10-06 dankserver: production health checks during the autoresearch segment; root-store vs rootless-store confusion cost several turns; frank_primary.log inspected directly)
- frank-primary (radiance, 2xR9700 TP=2) decode-sweep results 2026-10-06 (21 runs): final config = Frank's original spec=3/seqs=2/maxlen=200k (commit c80c250); baseline 31.72 t/s at 43.6k depth replicated 31.72/31.74. Noise floor ±3% decode (identical config drew 33.06/32.03/30.90 — single-run deltas 3% are noise; NEVER keep on 3%); prefill noise ±2%. MNBT RESONANCE LAW: with MTP on, MNBT=2048 is a sharp resonance point, NOT an interior optimum — 2560 collapses decode to 2.6–7.7 t/s (acceptance stays NORMAL 0.82, verification stalls ~130ms/step, output truncates 213/256; reproduced on clean boot), 1536 truncates 57/256 + prefill −22%, 4096 won't boot at seqs=3. MNBT must stay exactly 2048 at this shape; mechanism unresolved (kernel boundary × 3 slots × MTP verify). HOST_POOL FLOOR LAW: 36864 MiB crashes boot; 40960 is the load-bearing floor of expert page-staging (49152 boots flat — not a slack knob). Real regressions only: spec=4 (−23%, acceptance 0.50), spec=0 no-MTP (−7%, MTP genuinely pays), EVC 0.84 (−8.9%). Flag surface 100% bracket-mapped; spec 1–3 × seqs 2–3 statistically tied; depth 3 kept on acceptance tiebreak (0.831 vs 0.755) — the 256-token greedy probe cannot express it; real-traffic A/B is the only separating instrument. (context: frank-primary radiance autoresearch segment 2026-10-06 (21 bench runs, branch autoresearch/...frank-pri-20261006, final commit c80c250); harness: autoresearch.sh + scripts/autoresearch-frank-primary.sh)
- frank-primary (radiance, dankserver) tuning laws from the 2026-10-06 autoresearch window (branch autoresearch/iteratively-improve-the-performance-of-frank-pri-20261006, final config commit c80c250): (1) MNBT RESONANCE LAW — at MTP-on shapes, --max-num-batched-tokens=2048 is a sharp resonance point, NOT an interior optimum: 2560 collapses decode to 2.6-7.7 t/s (reproduced on a clean boot; draft acceptance stays normal at 0.82 while verify stalls ~130ms/step; generation truncated 213/256), 1536 truncates at 57/256 with prefill -22%, 4096 won't boot at seqs=3. MNBT must stay exactly 2048; re-testing is forbidden, mechanism unresolved (kernel boundary interaction between chunk size, slots, MTP verify budget). (2) HOST_POOL_MIB 40960 is the LOAD-BEARING FLOOR of the expert page-staging reservation — 36864 crashes boot, 49152 boots flat; it is not a slack knob. (3) MEASUREMENT LAW — decode noise floor is ±3% on identical config (33.06/32.03/30.90 on one config), prefill ±2%; single-run deltas 3% are noise, replicate before keeping any change. (4) Decode surface is bracket-complete: spec depth 1-3 statistically tied (0 and 4 are real regressions: 29.57 and 24.57), seqs 2-3 tied, expert-vs-cache 0.82 bracket-confirmed (0.78 crash / 0.84 -8.9%), maxlen 262144 steals resident-weights VRAM (-2.5%), GPU-headroom 48 and host-pool 49152 flat. Tie-break that kept Frank's original spec=3/seqs=2: draft acceptance 0.831 vs 0.755 favors real multi-turn traffic; the 256-token greedy probe cannot express it. The separating instrument for depth 2 vs 3 would be real-traffic per-request draft acceptance from the engine ledger (needs production window at depth 2, Frank's sign-off). (context: serverAppConfigs autoresearch segment 2026-10-06 (frank-primary decode tuning, 21 runs): sweep closed at a tie with Frank's original config kept; MNBT resonance and host-pool floor laws measured; noise-floor law established by identical-config replication.)
- frank-primary radiance tuning window (2026-10-06, 20 autoresearch runs): (1) MNBT RESONANCE LAW — at MTP-on/seqs=3, --max-num-batched-tokens is a sharp resonance point at 2048, NOT a smooth curve: 2560 collapses decode to 2.6-7.7 t/s with normal draft acceptance (0.82) and verify stalling ~130ms/step, generation truncating at 213/256; 1536 truncates at 57/256 and loses 22% prefill; 4096 fails boot at seqs=3 (booted at seqs=2, only -2.6% there). MNBT must stay =2048 at this shape; mechanism unresolved. (2) HOST_POOL_MIB 40960 is the load-bearing FLOOR, not slack: 36864 fails boot, 49152 boots but is decode-flat. (3) Noise floor law: decode is ~±3% run-to-run on IDENTICAL config (33.06/32.03/30.90 measured), prefill ~±2% — single-run deltas under those bounds are not evidence. (4) Viable envelope at seqs=3: EXPERT_VS_CACHE 0.82 (0.78 crash / 0.84 -9%), MNBT 2048, TP_WIRE wht6 (bf16 crashes), HOST_POOL 40960. Spec depth 1-3 statistically tied (0 and 4 real regressions: 29.57 / 24.57). Endpoint was already well-tuned; no flag clears noise. Scratch-bench hazard: if a prior bench is abandoned mid-run, the next scratch boot may race the leftover engine — verify the previous arbench container is gone and prod restored before trusting a collapse measurement (one 92% collapse was initially suspect for this; MNBT=2560 collapse then reproduced clean-boot, confirming it real). (context: Autoresearch segment on serverAppConfig, frank-primary (radiance, Qwen3.8-Flash-Next-FP8, 2xR9700 TP=2, seqs=3, maxlen=200k, spec=2): harness scripts/autoresearch-frank-primary.sh boots a scratch radiance container per run; 20/30 runs consumed, flag surface 100% bracket-mapped, no keep beyond noise. Frank's pending decision: keep spec=2/seqs=3 vs revert to his spec=3/seqs=2.)
- Single-run A/B on the radiance /v1/completions timings (256-token greedy decode, 43.6k-token prompt, fresh scratch container per boot on dankserver) has a true noise floor of ~±3% decode t/s, NOT the ±0.3% one might assume from short-interval probes. Identical config measured 33.06 / 32.03 / 30.90 t/s. Consequence: never keep a tuning change on a 3% single-run delta; re-run promising keeps once before believing them (and flag the first lucky draw as suspect), and bracket both sides of a tuned value before trusting an optimum. Boot-failure arms (health timeout ~720s, ~12 min) are informative walls, not wasted runs. Real, outside-noise effects at frank-primary: SPEC_TOKENS=4 (-23%, acceptance 0.83-0.50), SPEC_TOKENS=0 (-7%, MTP always pays), EXPERT_VS_CACHE=0.84 (-9%), KV shape seqs=4/maxlen=100k (-11%), and three boot crashes that define the seqs=3-viable envelope (EXPERT_VS_CACHE 0.78, MNBT 4096, TP_WIRE bf16 all crash at seqs=3; the wht6/2048/0.82 trio is what makes it fit). (context: Autoresearch session on serverAppConfig (frank-primary radiance decode tuning, 2026-10-06): 16-run ladder over one flag at a time; runs 39/40/49 measured the SAME committed config (spec=2, seqs=3, maxlen=200k) at 33.06 / 32.03 / 30.90 t/s, exposing the true run-to-run spread; run #39 had been kept as "+4.2%" and had to be flagged suspect after the replication run exposed the draw.)
- frank-primary (radiance, TP=2 Qwen3.8-Flash-Next-FP8) decode tuning laws, measured 2026-10-06 on a deterministic 43.6k-token greedy probe (scripts/autoresearch-frank-primary.sh, decode_tps = timings.predicted_per_second, noise ~0.3%): (1) MTP depth is UNIMODAL at 2: depth1 31.89, depth2 32.40, depth3 31.72, depth4 24.57 t/s (acceptance collapses 0.83-0.50 at depth 4). SPEC_TOKENS=2 is the production value. (2) MAX_SEQS 2-3 (+2.0%, co-scheduling headroom; single-stream probe sees it via scheduler shape) wins; 4 regresses (-3.1%). (3) The KV-shape surface is peaked at seqs=3/maxlen=200000: every window mutation regresses depth decode (native 262144: -2.5%; 100000x4: -10.6%) because the KV pool trades against resident-weights VRAM at expert_tiered. (4) EXPERT_VS_CACHE=0.82 is bracket-confirmed optimal: 0.78 fails boot at seqs=3 (KV unallocatable), 0.84 costs -8.9%, 0.87 known collapse. (5) At seqs=3 the VRAM envelope is tight: MNBT 4096 and TP_WIRE bf16 both FAIL BOOT (720s health timeout) — wht6 + MNBT 2048 are what make the seqs=3 shape fit. (6) GPU_HEADROOM 48 and HOST_POOL 49152 are decode-neutral (the pinned-pool streaming is not the single-stream bottleneck). Net kept gain: 31.72 - 33.06 t/s (+4.2%), committed as spec=2 + seqs=3. (context: Autoresearch session frank-primary-decode-perf, runs #35-#48, autoresearch branch, harness stop-prod/boot-scratch-arbench/bench/restore on dankserver)
- serverAppConfigs deployment-completeness policy: a behavior-affecting deploy needs the bats suite (./tests/run.sh) AND the Playwright e2e gate (tests/e2e/run.sh). deploy.sh normally runs the e2e gate as its [3/3] step, but its whole-tree clean-tree gate (scripts/deploy.sh lines ~116-120: git status --porcelain non-empty → FAIL) is blocked by ANY dirty file, including a parallel writer's unrelated WIP. When that happens, run the two gates standalone — ./tests/run.sh for the seams and ./tests/e2e/run.sh for the live-fleet e2e (it needs tests/e2e/.env.local credentials, drives the live fleet, and does NOT require a clean tree). This satisfies the deployment-completeness requirement without deploying; the actual service dispatch can be done manually (git push + remote ff-pull + systemctl start) when it only touches files the writer isn't touching. Proven 2026-10-06 on the frank-primary rad-tune/MNBT window: writer's dirty frank-large WIP blocked deploy.sh, so I ran tests/run.sh (all green) + tests/e2e/run.sh (33 passed) directly and restored frank-primary by manual push+pull+start.
- radiance (StillDeadcode) rad-tune on this fleet: the kernel-selection cache is written to $RADIANCE_HOME/tune/machine.tune, and $RADIANCE_HOME defaults to /opt/radiance — which lives INSIDE the image, so a --rm container's cache dies with the container. To persist it you must mount a host dir over it (-v hostdir:/opt/radiance/share/radiance/tune) in BOTH the rad-tune run AND the serve run, and pre-create the host dir (the engine's create is NOT recursive). Machine key on this box: gfx1201-x3-AMD_Radeon_Graphics (3 devices: 2x gfx1201 R9700 + 1x gfx1036 iGPU). Declare at the shapes you serve: --tp 2 (a world-size-1 declare measures a program a TP=2 serve never runs) and --num-speculative-tokens 3 (puts the drafter's kernels in the measured graph; default is the container's own depth). On this build the two attention kernels (attn_paged, attn_paged_gate_quant) are SKIPPED by rad-tune ("no shape recipe; see tools/opshapes.h") — only the 36 gemm_nt (kernel,shape) pairs get tuned, so the cache covers GEMM tile selection, not attention. rad-tune is ~110-150s for this 173 GiB model at TP=2. The radiance image has NO bash and NO env/ls — only sh; invoke it as podman run --entrypoint sh image -c "cmd" (the ---before-args form breaks). (context: frank-primary radiance cutover bench window 2026-10-06: rad-tune --tp 2 --num-speculative-tokens 3 on qwen4exp-fp8-native.rad; cache path + mount law + attention-skip observed live)
- Bonsai-2-27B swap on frank-small: scouted + smoke-booted 2026-10-06, then rolled back to Swift RCO-IQ3_XXS by Frank's order BEFORE any repo edit (tree stayed at bb3532d). Payload parked on disk for a retry. (1) RUNTIME LOCK: stock llama.cpp CANNOT load PQ2_0/PTQ1_0 ternary files (unknown types; Q2_0 loads silently-garbage — no Hadamard activation runtime). Required runtime = PrismML-Eng/llama.cpp fork (prism branch). Deployed prebuilt: release prism-b10754-2459f68 asset bin-linux-cuda-12.4-x64 (matches Dankclaw nvcc 12.4; CUDA 13.3 builds documented crash-prone; tarball sha256 80185ce29bed2456f099903a41fe20452121af0c2da6be84315c9145e46e3ad2), extracted FLAT — binary at /home/dank/GitPackages/llama-prism/llama-server, NO bin/ sublevel (a bin/llama-server path fails). Post-2026-09-23 releases carry the AVX-512 load-segfault fix #245 (Dankclaw Strix Halo = Zen 5 is the affected class; a pre-b10735 release would segfault). (2) PAYLOAD: dealignai/Bonsai-2-27B-Ternary-CRACK-GGUF Bonsai-2-27B-PQ2_0-CRACK.gguf = 7,206,168,928 B, sha256 5b24ea3eebc3e0bccd05fb474eb88b10c57699d71a5db2f29485e3789a70d55d; PrismML ternary {−1,0,+1} g128 in a Hadamard-rotated basis at 2.13 bpw of Qwen3.8-27B, abliterated at weight level (0/320 HarmBench-320 refusals vs base 299/320; MMLU −0.62 pp); 64-block qwen3_5 hybrid — NO MTP head in the file (draft-mtp refused) and ngram-* spec types have NO effect on this model (fork issue #203) ⇒ spec=none is the only contract; mmproj ships in the BASE repo prism-ml/Ternary-Bonsai-2-27B-gguf (mmproj-Q8_0 629,246,976 B, sha256 6807ede61d570bb86ba34b756a0fa109edc33668604de867c6ea6d8f1d631903; BF16 reference pack 931,145,856 B) at /home/dank/models/Bonsai2-CRACK/. (3) SMOKE MEASUREMENTS (2×131072 q8_0 KV, ubatch 512, SPEC none): boot ~2.5 s, VRAM 17,006 MiB used / 7,570 free (widest fit the endpoint has ever had — a third slot plausibly fits), n_slots=2 confirmed, vision projector loads. (4) FORK QUIRKS for the eventual swap: reasoning_effort "high" → HTTP 50 (context: 2026-10-06 frank-small Bonsai-2-27B session: Hub scouted (both repos), all three artifacts fetched+sha-verified on Dankclaw, smoke boot on :7771 verified 17.0/7.6 GiB, then Frank ordered rollback to the prior Swift endpoint; payloads and fork binary remain on disk with no repo changes.)
- frank-small RCO-IQ3_XXS two-slot MTP-on pricing (2026-10-06): the MTP draft ctx measured ~2.4 GiB, not the ~0.4 GiB estimated from proposal depth — the draft context is built against the target's FULL n_ctx (262,144), per the existing "drafter's KV scales with the target's context" law, so price MTP draft ctx from a boot pair, never from the draft depth. Fit: 23,636 used / 489 MiB free (tightest frank-small fit in history; the 2–3 GiB floor knowingly violated by Frank's explicit order). Two companion facts for this payload/build: (1) the UNCENSORED model thinks more than censored Swift 1.5 — a 64-token vision probe came back all reasoning_content with empty content (finish_reason length); the probe needs a 128-token budget. (2) The current llama.cpp master /completion timings object exposes draft_n, draft_n_accepted, predicted_per_second — NOT n_prompt/n_text/t_prompt/t_text — so decode rates come from predicted_per_second and acceptance from draft_n_accepted/draft_n (measured 49.8–62.4% on this quant). (context: frank-small 2026-10-06 RCO-IQ3_XXS + draft-mtp cutover (commits da36fa3/bb3532d): live probes on the deployed two-slot shape; the pre-boot VRAM estimate was off by 6x on the draft ctx)
- HuggingFace repos on Xet storage (newer repos like ajgazin/Swift-1.5-Qwen3.8-27B-Uncensored-Dynamic-MTP-GGUF) expose NO LFS sha256 in the tree or blob APIs (the blob API returns a 404-ish "Sorry, we can't find the page" JSON for LFS files and resolve headers carry no X-Linked-Entity-Sha256). Verification for such repos must be: byte count against the Hub's declared size + local sha256sum after the first verified fetch, with the computed sha pinned in the download script (state in the script header that the sha was computed locally, not taken from the Hub). Proven on the 2026-10-06 frank-small retarget (both files matched Hub byte counts exactly; shas pinned in scripts/download-frank-small.sh).
- radiance checkpoint reader FILE-SHADOW law: the reader opens every file the safetensors index names, in SORTED file-name order, and emplaces EVERY tensor each file physically holds into one table, first-wins (checkpoint.cpp add_shard, std::unordered_map::emplace never overwrites) — the index only enumerates files, it does NOT scope which tensors count. Consequence: a replacement file whose tensors share a name with tensors physically present in an earlier-sorting file is shadowed (its data never read; the plan reads the older file's tensor under that name). Fix: name the replacement so it sorts FIRST ("00-ple.merged.safetensors" beats "model-00001-of-00131.safetensors"), then patch the index value. Companion engine fact: the radiance engine's directory create is NOT recursive — "cannot create /data/kvcache/..." ENOENT left the SSD prefix tier off until the serve script mkdir -p'd the full path; pre-creating the host dir activated the tier on the running container without a repo deploy (volume exposes it immediately; only the boot-time check is one-shot). (context: frank-primary radiance cutover, 2026-10-06 live bring-up; root-caused from /tmp/radiance-src checkpoint.cpp add_shard + shard_list after the plan-only run read a raw fp8 shard as the PLE codes)
- Fleet serve-script trap: podman run -d ... "$LOG" captures ONLY the container ID — the engine's stdout/stderr go to podman's internal store, so any runbook claiming "the boot ledger lives in $LOG" is reading a one-line hex file. Diagnosis signature: a ledger grep that returns empty, or a log file containing a single 64-hex string. Fix = run podman run FOREGROUND (Type=simple unit keeps the podman client as main process; podman run returns the container's exit code so Restart=always/ExecStop semantics are unchanged, and the client forwards SIGTERM). Before grepping any fleet service's log file, verify it is not this shape — frank-primary is suspect (its serve script uses podman run -d; its memory note claims logs land in /home/dank/logs/frank_primary.log, unverified against the -d trap as of 2026-10-06). (context: frank-large tuning session 2026-10-06: the runbook's "engine stdout goes to /home/dank/logs/frank_large.log" had been false since the 2026-10-05 cutover — podman run -d ... "$LOG" captured only the container ID hash; the boot ledger existed only in podman logs frank-large-halogen. Fixed by foreground podman run (ba67ca5); AGENTS.md and the runbook now document it.)
- frank-large (halogen 0.1.4, Dankclaw iGPU) decode-at-depth laws, measured 2026-10-06 on real traffic + controlled A/B: (1) Decode collapses linearly with context: 30-50 t/s shallow → 5.5 @46k → 3.3-3.8 @80k; round-time slope ~8 µs/token ⇒ KV pool reads ~8 GB/s effective (with verify-position factor ~28 GB/s) vs weights streaming ~180-240 GB/s. Not an FA tile artifact — HALOGEN_FA_TQ=256 A/B'd same-prompt at 80k: decode ±0.3%, prefill −9.5% on this topology (the knob helps only the 64GB-carve crash topology of upstream issue #12). (2) The engine binary advertises 40+ UNDOCUMENTED HALOGEN_* kernel levers (FA_/DN_/MATMUL_*/ATTN_SD family) — enumerable read-only via grep -aoE "HALOGEN_[A-Z0-9_]+" /usr/local/bin/halogen inside the image with --entrypoint sh (no GPU touched; strings is NOT in the image, use grep -a). (3) Same-prompt depth A/B method: stop+mask prod, boot probe containers on 127.0.0.1:17770, prompt cache ON (8192 MB) so the second rep per arm skips the ~178s 80k prefill; force 128-token ESSAY instructions or greedy answers in 2 tokens and the decode measurement is void; read timings.predicted_per_second/draft_n_accepted. (4) Applied mitigation: harness roles slow+advisor (the deep-conversation roles) rerouted from frank-large to frank-primary in ~/.omp/agent/config.yml — frank-primary's fp8 KV is 7.32 KiB/token vs halogen's 64 (8.7x less KV read at depth). frank-primary's depth-decode rate is NOT yet measured on record — first deep session there should record timings. (5) Boot ledger WARNING "HALOGEN_CACHE_MB smaller than ONE full-context entry (18.4 GB at kMaxCtx=262144)" is a FALSE POSITIVE when slot_ctx native: entries size to their prompt (~70 KB/token); at slot 200,700 the deepest possible entry is ~14 GB, inside a 16384 MB pin. (context: frank-large halogen tuning session 2026-10-06: prompt-cache pin (16384 MB) deployed and verified (16x warm prefill); decode-at-depth collapse investigated — FA_TQ A/B in a stop window rejected it (±0.3% decode, −9.5% prefill on Dankclaw); slow/advisor roles rerouted to frank-primary (config.yml, operator home). Commits ba67ca5, d39424f, fadad18.)
- radiance rad-convert from an HF safetensors checkpoint has FOUR non-obvious traps, each costing a full verify+declare cycle: (1) The reader's tensor table is FILE-DERIVED, not index-driven: checkpoint.cpp add_shard opens every index-named file in SORTED order and emplaces EVERY tensor each file physically holds, first-wins (std::unordered_map::emplace never overwrites). An HF checkpoint whose shards physically carry tensors under the SAME name a later replacement file uses will shadow it — e.g. the official Qwen3.8-Flash-Next-FP8 shards carry ...ple.ple_embedding.ngram_embedding.shard_0.weight ([2500012,160] fp8) which shadows a merged table of the identical name. Fix: name the replacement file so it sorts FIRST ("00-ple.merged.safetensors" beats "model-00001-of-00131.safetensors"). (2) scale_name() appends "_scale_inv" to the TENSOR NAME verbatim (checkpoint.cpp:521): a stacked tensor named ...experts.gate_up_proj (no .weight suffix) has its scale at ...experts.gate_up_proj_scale_inv — NOT ...gate_up_proj.weight_scale_inv. (3) Safetensors index.json/config.json in a staging dir are usually RELATIVE SYMLINKS to the raw tree; open(path,"w") writes THROUGH them and corrupts the raw checkpoint (verify then fails 143/144 on size). Always temp+os.replace for atomic swap — it replaces the symlink itself, leaving the target pristine. (4) numpy views over mmap: np.frombuffer keeps an exported pointer; mmap.close() raises "BufferError: cannot close exported pointers exist" (Python 3.14+) unless the view is del'd first. Also: rad-convert --plan-only prices the DATA planes; the written container carries a metadata tail on top (172.76 GiB plan - 177,109 MiB actual), so size floor gates must be set from the real file, not the plan. (context: frank-primary radiance native-FP8 cutover, 2026-10-05/06; four convert blockers root-caused against /tmp/radiance-src (v1.0.7); all fixes landed in scripts/stack-qwen38-official-fp8.py + scripts/build-frank-primary-rad.sh)
- frank-large (halogen 0.1.4, Dankclaw iGPU) runtime facts, measured 2026-10-06 on real traffic + probes: (1) DECODE-AT-DEPTH COLLAPSE IS STRUCTURAL — 30-50 t/s shallow (1k, commit 4-6.3/round) → 5.5 @ 46k → 3.3-3.8 @ 80k; round-time slope ~8 µs/token of context = the KV path (16 full-attention layers, 64 KiB/token d2 KV) reads at ~8 GB/s effective while weights stream 180-240 GB/s; commit also falls to 2.5-3 at depth. No SUPPORTED flag touches decode (docs/FLAGS.md: W4A4/W4A4_EXCL are prefill-only) and 0.1.4 is the latest release; the publisher's tg bench NEVER measured depth (tools/halogen-bench.py tg rows run over the ten SHORT eval prompts), so README's "decode barely degrades at depth" is unexercised. (2) PROMPT CACHE was auto-OFF (engine floor = 2 × full-context entry = 36.9 GB vs 35.7 free); pinned HALOGEN_CACHE_MB=16384 (one full-slot entry ≈ 14 GB at ~70 KB/token); probe-proven cold 27.0 s → warm 1.7 s prefill at 17.3k (cache_n 16,384, prompt_n 946). Boot WARNING "smaller than ONE full-context entry (18.4 GB at kMaxCtx=262144)" is a FALSE POSITIVE vs our 200,700 slot — documented as expected in the runbook checklist. (3) SERVE LOG FIX: podman run -d LOG captures only the container ID — the engine ledger existed nowhere on disk; foreground podman run makes the ledger land in /home/dank/logs/frank_large.log with unchanged exit-code/ExecStop semantics; after a manual stop the unit reads "failed" (cosmetic). (4) UNDOCUMENTED LEVERS: the binary reads 40+ HALOGEN_* kernel-selection vars; enumerate with grep -aoE "HALOGEN_[A-Z0-9_]+" /usr/local/bin/halogen | sort -u (image has NO strings binary). Public issue #12 (64GB-carve box): default k_attn_fa2 crashes at PREFILL, HALOGEN_ATTN_FA=2 + HALOGEN_FA_TQ=256 restores full prefill speed — their decode was FINE, so FA_TQ's decode-at-depth relevance on Dankclaw (healthy prefill, so not in the crash class) is UNPROVEN; A/B window (default vs FA_TQ=256, 80k filler, 2×128-token decode, timings-read) was Frank-approved and i (context: frank-large halogen tuning session 2026-10-06: cache pin shipped (ba67ca5, probe-verified 16x warm prefill), decode-at-depth diagnosed structural, FA_TQ A/B window approved by Frank and launched (arm 0 default vs arm 1 HALOGEN_FA_TQ=256); routing fallback mapped (slow/advisor → frank-primary). Commits: ba67ca5 (cache+foreground log), d39424f (docs+depth law).)
- podman log-capture trap (found 2026-10-06 on frank-large, likely affects frank-primary too): podman run -d ... "$LOG" 2&1 captures ONLY the container ID hash — the engine's stdout/stderr go to podman's internal log store, so the documented "boot ledger lives in /home/dank/logs/svc.log" is false and every runbook grep of that file reads a one-line hex string. Diagnosis: the log file contains exactly one 64-hex-char line. Fix that preserves systemd semantics (container exit code = service exit, ExecStop=podman stop still works, SIGTERM forwarded to the engine): run podman run FOREGROUND (drop -d, drop exec podman wait), keeping the "$LOG" redirect. Do not reach for --log-driver hacks (k8s-file JSON-wraps lines and races the shell redirect). Evidence + fix live in scripts/serve-frank-large.sh (commit ba67ca5); check frank-primary's serve script for the same gap before trusting its log file. (context: frank-large tuning session 2026-10-05/06 (halogen on Dankclaw): runbook claimed engine ledger lands in /home/dank/logs/frank_large.log, but the file held one container-ID line; foreground-run fix shipped and verified (ledger grep now works).)
- Radiance (v1.0.7) convert/payload laws, proven on the frank-primary native-FP8 cutover 2026-10-05/06: (1) READER TABLE SHADOWING: Checkpoint::add_shard emplaces EVERY tensor each opened file physically holds, first-wins (checkpoint.cpp), and shard_list opens index-named files in SORTED name order — so a raw shard whose tensor name collides with a staging-file tensor shadows it if the raw file sorts first. Fix pattern: prefix the staging file so it sorts FIRST ("00-…"), letting its tensor win the emplace race. This bit when the plugin asked for …ple.ple_embedding.ngram_embedding.shard_0.weight and got the raw fp8 shard [2500012,160] instead of the merged bf16 table. (2) scale_name() = tensor name + "_scale_inv" VERBATIM (checkpoint.cpp:521) — stacked tensors (no .weight suffix) take …gate_up_proj_scale_inv, NOT …gate_up_proj.weight_scale_inv. (3) Staging symlinks raw files; ANY non-atomic rewrite of a staged json (open(path,"w")) writes THROUGH the symlink into the raw checkpoint — use temp + os.replace, or copy index/config into the stage instead of symlinking. Measured: raw index.json restamped with the stacked layout, raw verify then failed 143/144. (4) Python 3.14 BufferError "cannot close exported pointers exist": numpy frombuffer views keep mmap exports alive — del the view before mmap.close(). (5) Plan-only measures the .rad at the checkpoint's own fp8 mass (official Qwen FP8 131 shards = 172.76 GiB / 185.5 GB; the ~161 GiB estimate was wrong) — size any floor gate from the plan line, not estimates. (6) The plugin's bf16 branch (table_bf16 = plain-bf16 one-plane encoding) vs fp8 branch (codes + ONE-element scale plane) is decided at declare from the checkpoint form; a bf16 checkpoint + ONE rtn fixed-scale rule reproduces the publisher's dense→fp8 recipe path with exact code round-trip. (7) Debug hygiene: bg watchers that tail a sorted error list clip it — the tail of a sorted list is NOT the failure scope; fetch the full list before counting failures. All of t (context: frank-primary radiance native-FP8 TP=2 cutover on dankserver; four failed convert attempts (BufferError crash, raw-index symlink corruption, stacked scale names, PLE table shadowing) each root-caused in /tmp/radiance-src before the clean plan-only at 172.76 GiB)
- Radiance rad-convert pipeline laws (proven live on dankserver 2026-10-05/06, frank-primary native-FP8 build; all three plan blockers root-caused from source, not guessed): (1) FILE-TABLE SHADOW: Checkpoint::add_shard (core/format/checkpoint.cpp) emplaces EVERY tensor each opened file physically holds into one name-tensor table, FIRST-WINS; shard_list opens files in SORTED name order. A merged/replacement tensor sharing a name with a tensor physically present in another index-named file is shadowed by whichever file sorts first. Symptom: declare sees the checkpoint form of a DIFFERENT tensor (e.g. merged PLE bf16 [320001536,160] vs "codes ... is [2500012,160]" = one raw fp8 shard inside model-000NN). Fix: name the new file so it sorts FIRST ("00-ple.merged.safetensors") — index values + script constants must follow. Corollary: the index's weight_map decides which files OPEN, not which tensors EXIST; 127 raw shard entries removed from the index still shadow via file contents. (2) SCALE-NAME LAW: checkpoint.cpp scale_name() = tensor name + "_scale_inv" VERBATIM. Stacked expert tensors have no .weight segment, so the scale plane is ...experts.gate_up_proj_scale_inv (NOT ...experts.gate_up_proj.weight_scale_inv). Wrong name = "FP8 with no scale plane beside it" on EVERY sliced expert (~100k errors). Also: a tail-N watcher artifact shows only the sorted TAIL of an error list — never size an error set from a tail (21 lines shown were the tail of ~100k). (3) NEVER write a staged file via open(path,"w") when staging uses symlinks: staging symlinks raw files into the stage dir, and the rewrite goes THROUGH the link into the raw tree (mtime proves it; raw verify then fails 143/144). Law: temp file + os.replace (replaces the link itself), and COPY (never symlink) any file the reshape step rewrites. Committed as fb1a4fd. (4) Python 3.14 mmap: np.frombuffer(mm,...) views keep the mmap exported; explicit mm.close() raises "BufferError: cannot close exported pointers exist". Law: d (context: Session 2026-10-06: frank-primary radiance native-FP8 cutover on dankserver; three successive --plan-only failures (100,352 expert scale-name errors; symlink-through raw-index corruption found by the raw verify 143/144; PLE codes shadowed to one raw shard), each root-caused in /tmp/radiance-src source (checkpoint.cpp add_shard/shard_list/scale_name, rad_arch.h map_concat_shards, rad_block_ple.h fp)
- Two durable notes from the 2026-10-06 frank-small two-slot reshape: (1) For ANY llama.cpp what-if ("can we use X flag / drop a knob"), grep the SERVING BINARY's --help over ssh FIRST — verified live on Dankclaw's llama-master build before promising flags: the spec-type enum is draft-simple/draft-eagle3/draft-mtp/draft-dflash/draft-dspark/ngram-simple/ngram-map-k/ngram-map-k4v/ngram-mod (ngram family has its own --spec-ngram-mod-n-match etc.), and there is NO checkpoint knob anywhere — "limit checkpoints" in llama.cpp maps to dropping the draft context (draftless ngram types need no ctx_dft) and the internal recurrent-state rollback checkpoints carry no user flag. Answering from memory of other builds would have invented a knob. (2) omp bash-tool quirk: backgrounding a job with async:true requires timeout=null and name=null — passing a timeout alongside async errors out with "Service mode does not accept async or timeout"; the shape that works is {command, i, cwd, pty:false, async:true, timeout:null, name:null}, result then arrives as bg_N. (context: 2026-10-06 frank-small two-slot no-spec reshape (commits 812d9eb, 5e16654): priced the what-if via the serving binary's --help over ssh before answering, and hit a bash-tool arg rejection when backgrounding the suite)
- Staged-tree rewrites MUST use temp+os.replace, never open(path, "w"): a staging tree that symlinks raw inputs lets a rewrite follow the link and corrupt the pristine source (measured 2026-10-05/06 on frank-primary radiance reshape: stack script rewrote stage's model.safetensors.index.json THROUGH the relative symlink, restamping the raw index with the stacked layout — 605 KB smaller, "ple.merged.safetensors" FileNotFoundError in the raw tree, raw verify failed 143/144). os.replace(tmp, path) swaps the symlink itself for a real file; the raw tree stays untouched. Corollaries: (1) a copy step beats a symlink for any staged file a later step rewrites — copy index.json/config.json, symlink only the big immutable shards; (2) recovery WITHOUT a 217 GB re-stack: safetensors headers can be patched in place — parse hlen u64 + JSON, rename keys, re-serialize, pad with b" " to the EXACT old hlen (json.loads tolerates trailing spaces; data_offsets unchanged), rewrite bytes 8..8+hlen; (3) disk-wall arithmetic: mv-to-trash is a rename and frees NO bytes, so a full re-stage only fits if free space ≥ old payload + new payload; 209 GB free vs ~217 GB stage meant the surgical header patch was the only path without a purge approval; (4) HF index.json sanity checks: total_size lives under metadata, not top-level (KeyError trap), and "listing says" size mismatches on ONE file with 143/144 passing = corruption/restamp, not a Hub revision. (context: frank-primary radiance native-FP8 reshape, 2026-10-05/06: run 3 rewrote the staged index through a relative symlink into the raw checkpoint; overnight verify failed 143/144. Fixed in commits 272acb4/fb1a4fd (scripts/stack-qwen38-official-fp8.py temp+os.replace; scripts/build-frank-primary-rad.sh copies index.json instead of symlinking); recovered without re-stacking by patching 49 stacked headers )
- ComfyUI 0.37 /prompt API requires the node graph wrapped as {"prompt": {...}} — a bare graph body (the pre-0.3.x format) returns {"error": {"type": "no_prompt"}} while curl still reports full Content-Length sent. Verify renders via /history/prompt_id → status.status_str=="success", outputs in /home/dank/comfyui-data/output/. Also note: this repo's parallel sessions run broad git add commits — untracked new files can be swept into a concurrent session's commit (my ComfyUI workflow JSONs landed in frank-small commit baf33d0); after committing, verify git show --stat HEAD actually contains YOUR files before assuming. (context: ComfyUI Qwen-Image workflow goal session 2026-10-05 (Dankclaw, port 8188, ComfyUI 0.37.0): two repair cycles to find the API wrap; parallel session baf33d0 swept the untracked JSONs.)
- Radiance rad-convert checkpoint laws (frank-primary native-FP8 build, 2026-10-05): (1) SCALE NAME LAW: checkpoint.cpp scale_name() appends "_scale_inv" to the tensor name VERBATIM — a STACKED expert tensor (…mlp.experts.gate_up_proj, no .weight suffix) has its scale plane at …mlp.experts.gate_up_proj_scale_inv, NOT …gate_up_proj.weight_scale_inv; the per-expert convention (experts.e.gate_proj.weight → .weight_scale_inv) does not carry over. Slice law: both codes and scale are sliced at the same sub-tensor index (checkpoint.cpp:579-589), so the stacked scale plane must be [E, r/128, c/128]. (2) Python 3.14 mmap law: np.frombuffer(mm,…) arrays hold exported buffer views — sm.close() raises BufferError: cannot close exported pointers exist unless the view is del'd before close; the loop's last view is always alive at close. (3) WATCHER LAW: tail -N of a convert log is NOT the error count — errors emit sorted lexicographically so the tail shows the sort's last names (.9/.80-.99), making a full 100k-error wall look like 21 strays; always grep -c '^E ' the whole log before classifying a failure. All three already fixed in scripts/stack-qwen38-official-fp8.py (commit 272acb4). (context: frank-primary radiance native-FP8 cutover, 2026-10-05: first plan-only run failed with ~100k expert-name errors; root cause = stacked scale plane named with .weight; second failure = BufferError crash in PLE merge; misread tail of sorted error list as the full set before reading scale_name() in /tmp/radiance-src/core/format/checkpoint.cpp:579.)
- Two lessons from the 2026-10-05 Swift-1.5 frank-small cutover (shared checkout, live parallel writer): (1) A background suite run (bg_3) reported docs-seam test 135 failing while the LIVE parallel docs writer was editing the very index it tested — the writer's 23:25 commit fixed the seam between bg_3's snapshot and my recheck. Before chasing a seam failure that "shouldn't exist," stat the suspect files' mtimes against the suite start time and re-run the seam alone; a shared-checkout bg result is a snapshot of a moving tree, not ground truth. (2) PUT N: inserts after line N — if line N is a WRAPPED bullet/paragraph (continuation lines below), the insert lands mid-paragraph and the original continuation lines orphan below the new block. Anchor gap-inserts on the LAST line of a logical block, never its first, and re-read the whole region after any gap insert; this cost three repair edits on the runbook Trail section (bogus pasted fragment + orphaned continuation). (context: 2026-10-05 Swift-1.5 IQ3_S frank-small cutover session; docs seam race with a live parallel session, and a PUT N gap-insert that landed mid-sentence inside a wrapped bullet)
- radiance/qwen4exp payload laws (2026-10-05, frank-primary native-FP8 cutover): (1) The shipped radiance qwen4exp_fp8 plugin maps ONLY the STACKED expert layout (mlp.experts.gate_up_proj [E,2F,H] + _scale_inv plane at the same index, gate rows first) while the official Qwen FP8 HF repo ships per-expert unfused tensors (experts.e.{gate,up,down}_proj.weight + weight_scale_inv each) — rad-convert refuses with 100,352 "needs checkpoint tensor ... not in stage" errors; 100,352 = 49 stacks (48 trunk + mtp.layers.0) x 512 experts x 4 tensors. Fix = staging byte-stack (pure concat, no requant). (2) The PLE table ships as 128 SCALELESS fp8 shards + ONE bf16 scalar scale (1.9931793212890625e-04); the plugin's fp8 branch declares the scale view as {1} — per-shard-blocked scales can never fit, and rtn on raw scaleless codes overflows (v/1.99e-4 e4m3's 448). Fix = staging decodes to one bf16 shard (exact), then ONE --quant rule 'blk.*.ple_ngram.weight=rtn:codes=fp8_e4m3,block=x,scale=bf16,rule=fixed,scale_value=the checkpoint's own scale' re-encodes at that same scale — provable exact round-trip (e4m3 grid 2^-3 vs bf16 rounding perturbation 2^-9), verified empirically for 12 representative codes + the 448 clamp. container PLE stays fp8 (47.7 GiB pinned, unchanged ledger). (3) The checkpoint name map gotchas: the shard regex captures pre WITHOUT the '.ple.' segment — scale and merged names must re-add it ({pre}.ple.ple_embedding.ngram_embedding.weight_scale). (4) TTM on the current dankserver kernel exposes /sys/module/ttm/parameters/pages_limit ONLY (no pages_max — the two-knob story is stale); sysfs raise to 52,428,800 pages = 200 GiB works at runtime; persistence needs ttm.pages_limit=52428800 on the kernel cmdline at next reboot; a serve-script preflight must SKIP absent knobs, not read them as 0. (5) Python 3.14 (current CachyOS) + numpy over mmap: np.frombuffer(mmap,...) arrays EXPORT the buffer — mmap.close() then raises 'BufferError: cannot close exported pointers exist' (context: frank-primary radiance cutover session 2026-10-05: rad-convert plan-only triage (100,353 errors), staging reshape script written/debugged (name bugs, byte math, BufferError), one --quant PLE rule, TTM raise, commits 1919ad7+baf33d0 pushed)
- Radiance qwen4exp FP8 cutover reshape laws (2026-10-05, proven in source + on-host): (1) The shipped qwen4exp_fp8 plugin maps the STACKED expert layout ONLY (mlp.experts.gate_up_proj [E,2F,H] + mlp.experts.down_proj [E,H,F] with _weight_scale_inv planes at the same index = name+"_scale_inv"); the official Qwen3.8-Flash-Next-FP8 repo ships per-expert unfused tensors — the fix is staging-side byte-stacking (no requant; gate rows first inside each expert's slab), done by scripts/stack-qwen38-official-fp8.py with per-file sampled byte-identity asserts. (2) The PLE table's plugin fp8 branch wants codes beside a ONE-ELEMENT bf16 scale plane (decl_view {1} hardcode); a per-shard-blocked scale can NEVER fit it, and rtn on raw scaleless codes overflows (v/1.99e-4 e4m3 max 448) — the fix: staging decodes the 128 scaleless fp8 shards to ONE bf16 shard with the checkpoint's own scale (1.9931793212890625e-04), then ONE --quant rule blk.*.ple_ngram.weight=rtn:codes=fp8_e4m3,block=x,scale=bf16,rule=fixed,scale_value=s re-encodes at that same s — an exact round-trip (code grid 2^-3 vs bf16 perturbation 2^-9); the engine's bf16-vs-fp8 branch keys off the RESOLVED encoding, so the rule lands it in the fp8 branch. (3) TTM on current CachyOS kernels exposes ONLY /sys/module/ttm/parameters/pages_limit (NO pages_max); a preflight that reads an absent knob as 0 refuses a healthy cap — raise pages_limit (52,428,800 pages = 200 GiB done 2026-10-05; sysfs write doesn't survive reboot, cmdline ttm.pages_limit= is the persistence). (4) safetensors reshape scripts: compute index total_size from declared tensor bytes, never from a writer's return value (a header-only return silently undercounts ~116 GB). Repository of record: scripts/stack-qwen38-official-fp8.py docstring, scripts/build-frank-primary-rad.sh header, serverAppConfigs-docs/LLM/frank-primary-radiance-qwen38-native-fp8.md. (context: frank-primary radiance cutover session 2026-10-05: convert blocked with 100,353 plan errors (100,352 expert-plane + 1 PLE); three source-reading sessions on /tmp/radiance-src (rad_block_moe_fp8.h, rad_block_ple.h, qwen4exp_fp8.cpp, TOOLS.md --quant grammar, lq_grid.cpp fixed rule) resolved it into two staging transforms + one recipe rule; round-trip exactness verified on-host for 12 representative)
- radiance qwen4exp_fp8 plugin vs official Qwen/Qwen3.8-Flash-Next-FP8 repo — LAYOUT LAWS (2026-10-05 cutover): the shipped plugin maps (1) STACKED experts — per MoE layer ONE tensor pair mlp.experts.gate_up_proj [E,2F,H] + mlp.experts.down_proj [E,H,F] with _scale_inv planes at the same dim-0 index, names under model.language_model.layers.N. and mtp.layers.0.; the official repo ships per-expert UNFUSED (experts.e.{gate,up,down}_proj.weight, 6 tensors/expert) → rad-convert --plan-only fails 100,352 errors (49×512×4); (2) PLE table fp8 branch wants codes + a ONE-ELEMENT bf16 scale plane (view {1}), but the repo ships 128 SCALELESS fp8 shards + one bf16 scalar (1.9931793212890625e-04, = the publisher recipe's own scale_value in TOOLS.md). FIX (scripts/stack-qwen38-official-fp8.py, wired into build-frank-primary-rad.sh): stage-time reshape, both transforms value-preserving — experts byte-stacked (fp8 codes moved, never decoded; gate rows first; fused scale = gate scale ++ up scale per expert), PLE decoded e4m3→bf16 with its own scale (LUT decode exact; RNE pack), then ONE --quant rule blk..ple_ngram.weight=rtn:codes=fp8_e4m3,block=x,scale=bf16,rule=fixed,scale_value=the checkpoint's own scale re-encodes at that scale = EXACT code round-trip (e4m3 grid 2^-3, bf16 rounding perturbation 2^-9 — cannot cross a midpoint; verified empirically incl. the 448 clamp). rtn on RAW scaleless codes would instead overflow (v/s ≈ ×5017 e4m3 448 max). Also: rtn re-encoding must never be applied to the scaleless form; a per-shard-blocked scale can NEVER fit the plugin's {1} view; rtn on scaleless-fp8 input destroys values. Pitfalls hit: name regex consumed the .ple. segment (scale + merged names must rebuild …layers.1.ple.ple_embedding.ngram_embedding.); bf16 byte widths need explicit ×2 (element counts ≠ bytes); write_safetensors must return data bytes (header-only return mis-states logs and index total_size). TTM LAW (dankserver kernel): only /sys/module/ttm/parameters/pages_limit ex (context: frank-primary radiance native-FP8 cutover session 2026-10-05: convert blocker triage (100,353 plan-only errors → 2-class fix), staging transform authored + round-trip verified on host, TTM cap raised pre-cutover, incumbent FreeToken stopped at Frank's order. Runbook + script docstring carry the full argument.)
- Converting the official Qwen FP8 checkpoint for the shipped radiance qwen4exp plugin (frank-primary cutover 2026-10-05): the plugin maps (a) STACKED experts — mlp.experts.gate_up_proj [E,2F,H] + down_proj [E,H,F] with _scale_inv planes at the same dim-0 index — so the official repo's per-expert unfused tensors must be BYTE-STACKED in staging (gate rows first inside each gate_up slab; pure byte concat, no requant); 100,352 plan errors = 49 stacks (48 trunk + mtp.layers.0) × 512 experts × 4 tensors (weight+scale each) — the arithmetic confirms which names are missing. (b) The PLE table's fp8 branch wants codes beside a ONE-ELEMENT bf16 scale plane (decl_view {1}); a per-shard-blocked scale can never fit that view AND rtn on the raw SCALELESS fp8 codes overflows (v/1.99e-4 ≫ e4m3's 448). The working transform: staging decodes the 128 scaleless shards with the checkpoint's OWN bf16 scale (0.00019931793212890625 — matches the publisher recipe's 1.99317932128906e-4 in TOOLS.md:141 exactly) into one bf16 shard_0 (config split_ngram_parts: 1), and the convert's single --quant rule blk.*.ple_ngram.weight=rtn:codes=fp8_e4m3,block=x,scale=bf16,rule=fixed,scale_value=s re-encodes at that same scale — an EXACT round-trip (nearest-code distance 2⁻³ vs bf16 rounding perturbation 2⁻⁹; empirically verified for 12 representative codes + the 448 clamp). Helper facts: e4m3fn decode is a 256-entry LUT (0x38=1.0, 0x7E=448, 0x7F=NaN only), f32→bf16 RNE = (bits+0x7FFF+((bits16)&1))16; np.argmin over a LUT with NaN entries returns the NaN index (mask with where(isfinite,…,inf) in tests). TTM on dankserver kernel 7.2.3: ONLY /sys/module/ttm/parameters/pages_limit exists (no pages_max — "both knobs" is stale); raised to 52,428,800 pages = 200 GiB pre-cutover (sysfs write, survives until reboot; persistence = ttm.pages_limit=52428800 kernel cmdline). Any cap function must SKIP an absent knob, not read 0. Also: dankserver host has numpy 2.3.5; the dev box does not. (context: frank-primary radiance native-FP8 TP=2 cutover session, 2026-10-05; scripts/stack-qwen38-official-fp8.py, runbook serverAppConfigs-docs/LLM/frank-primary-radiance-qwen38-native-fp8.md)
- frank-primary radiance cutover, convert-blocker fix (2026-10-05): the official Qwen3.8-Flash-Next-FP8 checkpoint cannot rad-convert directly because the shipped qwen4exp plugin maps ONLY the stacked expert layout (mlp.experts.gate_up_proj [512,1280,2560] + _scale_inv at the same index; error-count arithmetic 49 stacks × 512 experts × 4 tensors = the 100,352 errors) and a PLE fp8 branch whose scale view is hard-coded {1}. Fix (all value-preserving, scripts/stack-qwen38-official-fp8.py + ONE --quant rule): (1) byte-stack per-expert gate/up/down + scales along dim 0 — no requantisation; (2) decode the 128 SCALELESS PLE fp8 shards with the checkpoint's OWN bf16 scale into one bf16 shard_0 (e4m3 values and the scale are exact in bf16), then blk.*.ple_ngram.weight=rtn:codes=fp8_e4m3,block=x,scale=bf16,rule=fixed,scale_value=ckpt scale re-encodes at that same scale — nearest-code distance 2^-3 vs the bf16 perturbation 2^-9, so every original code is restored exactly and the one-element scale plane lands as the plugin declares (rtn on the RAW scaleless codes would overflow: v/1.99e-4 exceeds e4m3's 448). Empirically verified on the host for representative codes incl. the 448 clamp. Safetensors writing: 8B LE u64 header length + JSON header, data_offsets relative to data start, pad header with spaces to 8-byte alignment; bf16 = RNE pack of f32 via (bits + 0x7FFF + ((bits16)&1)) 16. Dev box has NO numpy — test numpy-dependent host scripts on dankserver (numpy 2.3.5). Also: hashline PUT/CUT with remembered line numbers across MULTIPLE edits in one file silently corrupts (a mis-aimed PUT N.=M ate main-body lines and a later insert landed mid-function) — after any multi-edit sequence, py_compile BEFORE running; recover by re-reading the touched region and restoring eaten lines first. TTM on dankserver: /sys/module/ttm/parameters/pages_limit exists, NO pages_max; raised to 52,428,800 pages (200 GiB) pre-cutover; sysfs does not survive reboot (cmdline ttm.pages_limit=52428800 pe (context: frank-primary radiance cutover 2026-10-05: stacking/PLE reshape + convert-blocker triage + TTM raise; runbook frank-primary-radiance-qwen38-native-fp8.md)
- TTM pinned-page cap on the CachyOS fleet hosts (verified 2026-10-05 on dankserver, kernel 7.2.3): only /sys/module/ttm/parameters/pages_limit exists — there is NO pages_max, so any preflight that mins over both knobs must SKIP an absent knob, not read it as 0 (a 0 makes a healthy cap refuse; fixed in scripts/serve-frank-primary.sh ttm_cap_mib). Pre-cutover cap was 32,252,917 pages = 123 GiB, BELOW frank-primary's 134 GiB pinned ledger. Raising is a runtime sysfs write (echo 52428800 | sudo tee ...pages_limit = 200 GiB) — allocates nothing, harmless, no GPU experiment rules apply; verified read-back. The write does NOT survive reboot: persist via kernel cmdline ttm.pages_limit=52428800 at the next scheduled reboot. Required pages = MiB × 256 (4 KiB pages); the serve gate is FRANK_PRIMARY_TTM_MIN_MIB=140000. (context: radiance cutover pre-work for frank-primary (dankserver), 2026-10-05: TTM preflight gate design + live sysfs raise before the pinned-RAM engine boot.)
- Converting a scaleless-FP8 artifact into a container that hard-codes a one-element scale plane (radiance plugin law, e.g. rad_block_ple.h wants fp8 codes + a single bf16 scale): NEVER rtn-re-encode the raw codes at the fixed scale — v/1.99e-4 overflows e4m3's 448 max and the codes become garbage. The exact recipe: (1) staging DECODES the scaleless shards with the artifact's OWN bf16 scale into a bf16 table (e4m3 decode is exact; the product may round to bf16 by 2^-9), then (2) the convert's rtn rule re-encodes at that same scale — nearest-code distance is 2^-3 while the bf16 perturbation is 2^-9, so every original code is restored EXACTLY and the one-element scale plane is produced. Round-trip proven empirically for representative codes incl. the 448 clamp. Companion facts: a per-shard-blocked scale can NEVER fit a {1} decl_view (plugin hard-codes extents); safetensors bf16 = 2 B/element (byte-stacking code that forgets the ×2 produces ValueError/buffer-shortage crashes, and argmin over an e4m3 LUT must mask NaN or it returns the NaN entry 0x7F). Implemented in scripts/stack-qwen38-official-fp8.py + one --quant rule in scripts/build-frank-primary-rad.sh; full argument in the script docstring and serverAppConfigs-docs/LLM/frank-primary-radiance-qwen38-native-fp8.md. (context: radiance native-FP8 TP=2 cutover for frank-primary (dankserver), 2026-10-05: convert of Qwen/Qwen3.8-Flash-Next-FP8 blocked by 100,353 plan errors (100,352 stacked-expert + 1 PLE scale-plane); derived the decode-reencode round-trip from rad_block_ple.h/rad_block_moe_fp8.h/lq_grid.cpp source tracing and verified it on-host before committing to a 102 GB staging write.)
- TWO lessons from the 2026-10-05 frank-large halogen cutover: (1) ROGUE/PARALLEL-SESSION RECOVERY RECIPE (this checkout is shared): a second omp session force-committed OVER this session's uncommitted work (serve script reverted to the pre-fix --ulimit nofile version, AGENTS.md lessons deleted, 413 restored over 400), then push created divergence mid-deploy. Recovery that worked: git log --graph --all to map the two lineages (rogue 3ee88d7/77decb5 Ornith commits + my be840b4/b0b840b above shared base bdbe814), git diff origin/main HEAD --stat to classify every diverging file as MINE (keep) vs ROGUE (drop), git rebase origin/main (clean replay of my 2 commits), then re-apply the specific reverted hunks. The seam is the tripwire that catches this class: tests/frank_small_unit.bats failed 7 tests because the rogue swap commit (Ornith payload) never touched the deploy handler + seam twins — stale seams DETECT half-finished swaps. Also: my own edit-tool tags went stale after the clobber — trust grep, not remembered line numbers, and re-read every region before editing. (2) halogen (frank-large) contract facts verified LIVE 2026-10-05 (engine 0.1.4, health reports version.api==version.engine==0.1.4): boot ledger prints "kv pool: 1 slot(s) x 200700 tokens = 13.15 GB" + dtype census (bf16 2.96 GB, q4c 9.93 GB, fp8r 10.63 GB, i4l 12.35 GB — p1w4d-d2). Prompt cache AUTO SIZES ITSELF OFF on this box ("35.7 GB free after mapped checkpoint ... less than the 36.9 GB floor (2 x 18.4 GB full-context entry)") — expected, not a fault. Drafter verified from the RESPONSE timings object (llama-server shape): draft_n/draft_n_accepted counts at 39-42 t/s greedy — DFlash2 active on the response, not just /health's drafter_default. Tool round-trip REAL: get_weather - {"city":"Seattle"} as an OpenAI tool_calls array (wire format qwen-xml inside the engine). Contract: over-cap max_tokens AND prompt-over-slot AND response_format are ALL 400s naming the limit (README-verified; my earlier 413 cla (context: frank-large halogen cutover session 2026-10-05; discovered when a parallel omp session force-committed over uncommitted work mid-deploy)
- Parallel-session docs writer vs the deploy tree gate: deploy.sh refuses on ANY uncommitted change INCLUDING untracked files (whole-tree guard, scripts/deploy.sh ~line 117), and live docs writers (Frank's Obsidian vault work or another agent) constantly produce untracked serverAppConfigs-docs/LLM/*.md files. Stashing a LIVE writer's strays is a data-loss race: 2026-10-05 a stash -u of 6 stray docs was followed within seconds by 3 MORE untracked files appearing — the writer was active; had the stash held, their in-flight files would have vanished from under them. Reversed with an immediate git stash pop (safe: stash snapshots, nothing lost). Working protocol: (1) check writer liveness first — mtimes within ~10 min of now means LIVE, do not stash; (2) the labeled-stash convention ("parallel-session topic WIP - stashed for reason") applies only to quiet strays; (3) if the writer is live, the deploy is genuinely blocked on Frank's coordination — say exactly which files block the whole-tree gate and ask him to commit/close the writer; do NOT commit another session's WIP yourself, do NOT stash twice in a race, and do NOT bypass the gate. (context: 2026-10-05 frank-small Ornith deploy: 364/366 tests green, swap pushed, download verified — deploy blocked solely by a live docs writer's strays at the whole-tree gate; one stash/pop round-trip proved the race is real before it cost anything.)
- Recipe: read a remote HF GGUF's metadata without downloading it — HTTP range request + struct parse. curl -fsSL -r 0-8388607 -o head.bin https://huggingface.co/repo/resolve/main/file.gguf, then parse: magic 4B, version u32, tensor_count u64, kv_count u64, then KV pairs. Two parser traps cost three failed attempts (2026-10-05, Ornith-1.5-9B sizing): (1) initialize offset to 4 AFTER the magic assert — treating offset 0 as the version field reads the magic itself as u32 (0x46554747 = "GGUF") and every downstream field shifts; (2) string arrays must be fully consumed (n × (u64 len + bytes)) — early-returning "str[n]" without consuming leaves offsets inside array data and later keys misread as unknown types. The tokenizer vocab array (~150k strings) sits BETWEEN the general.* keys and the architecture keys (qwen35.block_count etc.), so 64 KiB is NOT enough — fetch ~8 MiB. Yields arch name, block_count, head counts, key/value lengths, full_attention_interval (→ KV rate = full_attn_layers × kv_heads × klen × 2 B × 2), nextn_predict_layers, expert_count (absent = dense), native context — enough to size VRAM before committing a payload swap. Note: an existing managed skill gguf-loader-compatibility-check may be the right home for this; verify its content before minting a duplicate. (context: 2026-10-05 frank-small→Ornith-1.5-9B swap: needed Ornith's architecture (9 full-attn layers, 36 KiB/token f16 KV) to size the shape; the range-read settled it in two cheap requests against the live Hub file, no download required.)
- Frank's standing working rules for skill management (established 2026-10-05): (1) Do NOT use subagents for reading/analysis/distillation work — he explicitly ordered solo work ("Without subagents… read through each skill", later "NO. SUBAGENTS."); parallel fanout is not authorized by default even when tools suggest it. (2) The knowledgebase (serverAppConfigs-docs) is the system of record for all fleet knowledge — managed skills are NOT durable homes for lessons; when skills duplicate or extend runbooks, distill their content into vault pages and delete the skills, staging deletions in ~/.AGENTTRASH first. His default is "no reason to keep these skills". (context: 2026-10-05 managed-skills audit session: Frank twice ordered "Without subagents" and then "NO. SUBAGENTS." when the agent planned task-fanout for reading 173 skills and distilling them; and he ruled that none of the fleet skills are worth keeping as skills — their content belongs in serverAppConfigs-docs.)
- serverAppConfig multi-session triage rule (proven 2026-10-05, three events in one day): when ./tests/run.sh goes red and the failing seams point at files you did not touch, FIRST split the breakage by git state: (a) COMMITTED-but-broken states from a parallel session (swap commits that forgot their seam/deployer twins) → repair them yourself in clearly-labeled follow-up commits; that is what kept the suite green twice. (b) UNCOMMITTED working-tree state (M/untracked files owned by a LIVE concurrent session — check git status --porcelain and untracked ?? entries against HEAD, which may not have moved) → do NOT edit those files; the other session is mid-flight and will reconcile env+seam+docs in its own commit; editing its dirty tree risks colliding with an active writer. Verify your own pushed state instead (rev-list HEAD...origin/main, targeted seams on your files) and report the named dirty files as the red-suite owner. Signature of case (b): HEAD identical across two suite runs yet different failures, because bats seams read the working tree, not the commit. (context: 2026-10-05 goal session: frankbook e2e split (9c50821/2930431/1c725ea/5573ca1) interleaved with a live parallel session committing Ornith-swap breakage and later holding the tree dirty (M frank-small.env, M frank_small_unit.bats, ?? GGUF Compatibility.md).)
- Wrapper-script law (serverAppConfigs tests/e2e/run.sh): when converting a pure passthrough exec tool "$@" into "default argument set + passthrough", the default set must be APPENDED to "$@", not substituted for it — exec npx playwright test "${PROJECT_ARGS[@]}" silently DROPS every other arg (--list, --grep, file filters), so run.sh --list ran the entire 34-test suite instead of listing. The regression is only visible by diffing observed behavior against requested semantics; the seam (bash -n) cannot see it. Correct shape: build PROJECT_ARGS only when no user --project is present, then exec npx playwright test "$@" "${PROJECT_ARGS[@]}". Caught 2026-10-05 because the --list proof printed execution checkmarks instead of a listing; verify arg-forwarding wrappers by exercising EVERY documented passthrough arg, not just the happy path. (context: 2026-10-05 frankbook e2e split; regression introduced by my own default-project-set rewrite and caught during verification (commit 1c725ea).)