Skip to content

AI, fully local on your computer.

239 KB
Raw Blame

Model benchmark protocol (Phase 29)

The repeatable, fully-offline, judge-free protocol for ranking every catalog chat model on a given laptop in ~a day, with numbers comparable across machines and re-runs. Authored for Phase 29; decisions D19/D20 and the catalog design record are §7; apply the §5 decision rule with the results.

Not to be confused with benchmark.md — that doc is the in-app hardware probe (can this machine run a model); this doc is the offline model-quality protocol and measured speed/RAM/quality results.

0. Hard constraints (do not violate)

  • Offline, Wi-Fi OFF. All eval data is committed (eval/); all weights + the runtime are already on the drive (Phase 28). Nothing here touches the network.
  • No cloud judge, no telemetry. Quality is scored by deterministic local string math (apps/desktop/tests/eval/score.ts). Only summary CSVs + a per-item audit dump are written, and only those go in git — no user data, no weights.
  • Greedy decoding (temperature 0) everywhere for reproducibility. (llama.cpp greedy is near-deterministic, not bit-exact across builds; record the median where a metric varies.)

1. Machines + fixed conditions

Run on ≥ 2 machines: the dev box + the i7-1185G7 / Iris-Xe laptop are the natural pair. For each run record, in the CSV notes, the machine label, CPU, total RAM, backend (cpu | vulkan), the runtime build (runtime/llama.cpp/<os>/.hilbertraum-runtime.json), and the thread count. Fixed conditions: AC power, no other heavy load, fixed -t <physical cores>, median of repeated runs.

The drive root used below is the provisioned Windows D:\ (or any root with runtime/llama.cpp/<os>/llama-server + models/{chat,embeddings,reranker}/*.gguf).


2. Part A — Quality (the grounded-QA harness)

The gate metric. Runs the hand-authored German/English grounded-QA set through the app's real RAG path — the same E5 embedder + bge reranker + grounding template + chat runtime users get — for every chat GGUF on the drive, scoring each answer deterministically.

Data (committed, regenerate with node eval/build.mjs):

  • eval/corpus_de_en.jsonl — 60 passages across 16 documents (7 parallel DE/EN office + civic/everyday pairs + 2 German-only civic docs), with deliberate distractors.
  • eval/rag_de_en.jsonl — 100 items: 60 DE / 40 EN, 40 parallel DE/EN pairs + 20 German-only, 15 unanswerable (gold = abstain). All prose is original → license-clean.

Run:

$env:HILBERTRAUM_MODEL_EVAL = "D:\"
$env:HILBERTRAUM_EVAL_MACHINE = "devbox"      # or "i7-1185G7"
$env:HILBERTRAUM_EVAL_BACKEND = "cpu"          # or "vulkan"
# $env:HILBERTRAUM_EVAL_MODEL = "granite-4.1-8b-q4.gguf"   # optional: a single model
# $env:HILBERTRAUM_EVAL_SPECULATIVE = "mtp"                # optional: run WITH the #182 MTP flags
cd apps\desktop
npx vitest run tests/manual/model-eval.test.ts

HILBERTRAUM_EVAL_SPECULATIVE=mtp spawns each scored model with the same code-owned flag pair the start ladder's rung 1a passes (MTP_SERVER_ARGS, imported — this harness composes createLlamaRuntime directly and never walks the ladder, so without the knob it is structurally unable to score a model the way rung 1a runs it). Pair it with HILBERTRAUM_EVAL_MODEL (the harness enumerates GGUF files and cannot tell which weight carries a draft head) and a distinct HILBERTRAUM_EVAL_MACHINE label, so the run gets its own CSV stem instead of overwriting the pre-MTP baseline. The comparison is score parity within cross-run tolerance, never byte identity — see the §9.4 MTP addendum.

Retrieval is embedded once (E5) and reranked once, so it is identical across chat models — every cross-model delta in EM / citation-correctness / abstention is the chat model following the grounded prompt. Each model is loaded at -c 8192 and answers all 100 items at temperature 0, maxTokens 384.

Outputs (in eval/results/, <machine>-<backend>):

  • …-quality.csv — one row per model (the QA columns, header from QA_CSV_HEADER).
  • …-items.jsonl — every raw answer + its score, for auditing the heuristic abstention calls.

Metrics (per model; DE/EN split so the D18 German gap is directly readable):

Column Meaning Better
em_rate answer contains a gold span (over answerable) higher
mean_f1 token-F1 vs gold span (over answerable) higher, but only read beside mean_answer_chars (§5)
mean_answer_chars mean answer length in characters (over answerable, declined ones included) neither: not a quality score; it shows whether an F1 gap is a length gap (§5)
citation_correct_rate cited the gold document (over answerable) higher
grounded_rate gold span ∈ a cited chunk (over answerable) higher
over_abstain_rate wrongly declined an answerable item lower
abstain_rate_unans correctly declined an unanswerable item higher
hallucination_rate answered an unanswerable item anyway lower
em_rate_de / em_rate_en EM split by language higher; small gap
f1_de / f1_en F1 split by language higher; small gap

Abstention is detected by a curated DE/EN refusal-phrase list (heuristic — that's why every raw answer is dumped). Audit borderline unanswerable items in …-items.jsonl before trusting abstain_rate_unans / hallucination_rate.

mean_answer_chars (#378, 2026-11-15) is the answer's answer.length (UTF-16 code units, set in score.ts scoreItem) averaged over the same answerable items mean_f1 averages, so an answerable item the model declined counts with the length of its refusal. Lengths quoted elsewhere in this doc before #378 (§9's 125–215 and 87–93 characters) and in the issue are means over all 100 items, refusals on the unanswerable items included, so they are higher than this column: for the same models in i9-9900X-vulkan it gives 99–191 and 72–81. It comes right after mean_f1 in QA_CSV_HEADER, so every new …-quality.csv carries it. The 31 …-quality.csv files already committed predate it (each is its run's raw output; the rescored file is the authoritative one, §6); the 17 committed …-quality-rescored.csv files carry it.

Re-scoring after a detector change (no model re-run): when the abstention phrase list is improved, regenerate the numbers from the committed …-items.jsonl dumps:

node eval\rescore.mjs                  # writes eval/results/<stem>-quality-rescored.csv from every dump
node eval\rescore.mjs --existing-only  # rewrites only the rescored CSVs that already exist

rescore.mjs imports the SAME text.mjs the harness uses, so a re-score and a fresh run agree. This is exactly how the first run was corrected — see §6. It recomputes the answer length from each dump's answer, so dumps written before mean_answer_chars existed score the same as a fresh run. Use --existing-only after a scorer change that adds a column: there are more dumps than rescored CSVs (31 and 17 on 2026-11-15), and a plain run would also write a new rescored CSV, a new authoritative file, for every dump that never had one. That is how the 17 committed rescored CSVs gained mean_answer_chars (#378), with every other cell unchanged. Any other argument is refused (exit code 2).


3. Part B — Speed (llama-bench)

One-shot loop (Parts B + C together, all models):

scripts\benchmark-speed.ps1 -Root D:\ -Machine i7-1185G7 -Backend cpu

Runs llama-bench + the peak-RSS probe for every chat GGUF on the drive and writes eval/results/<machine>-<backend>-speed.csv (model, backend, threads, pp512/2048/8192_tps, tg_tps, peak_rss_gib, suggested_min_ram_gb). Numbers are invariant-culture-formatted (German locale safe). The per-model commands below are the underlying reference / fallback.

llama-bench ships in the b9585 archives we already fetch (runtime/llama.cpp/<os>/; verify on first run — fallback = time llama-server streaming, which we already measure in-app). Per model × backend:

# CPU
D:\runtime\llama.cpp\win\llama-bench.exe -m D:\models\chat\<model>.gguf `
  -p 512,2048,8192 -n 128 -t <physical cores> -ngl 0 -r 3 -o csv
# Full GPU offload (where Vulkan is shipped) — drop -ngl 0 (b9585 auto-offloads with --fit on)
D:\runtime\llama.cpp\win\llama-bench.exe -m D:\models\chat\<model>.gguf `
  -p 512,2048,8192 -n 128 -t <physical cores> -r 3 -o csv

Record pp t/s per context size and tg t/s (median of 3). MoE note: tg tracks active params; pp + RAM track total.


4. Part C — Memory (peak RSS → recommended_min_ram_gb)

One realistic -c 8192 run per model, polling peak working set. The Windows poll is the fiddly bit, so use the helper:

scripts\measure-peak-rss.ps1 -Root D:\ -Model granite-4.1-8b-q4.gguf -Ctx 8192

It starts llama-server at -c 8192, sends one generation, reads PeakWorkingSet64, prints peak RSS in GiB and a suggested recommended_min_ram_gb (peak RSS + 3 GiB OS/app headroom, rounded up). Linux = /usr/bin/time -v (Maximum resident set size); macOS = /usr/bin/time -l.

This measurement REPLACES the pre-measurement estimates in each manifest's recommended_min_ram_gb / recommended_ram_gb — update the manifests with the measured tier on the highest-RAM machine that ran it.


5. Combined results + the decision rule

The deliverable is one row per model × laptop × backend. Join the Part-A QA columns with the Part-B/C speed + RSS columns into eval/results/<machine>-<backend>.csv:

model, backend, pp512_tps, pp2048_tps, pp8192_tps, tg_tps, peak_rss_gib, suggested_min_ram_gb,
em_rate, mean_f1, mean_answer_chars, citation_correct_rate, grounded_rate, over_abstain_rate,
abstain_rate_unans, hallucination_rate, em_rate_de, em_rate_en, f1_de, f1_en

The harness writes the QA half (…-quality.csv); paste the speed/RSS numbers alongside. Commit the combined CSVs + the per-item JSONL. node eval/combine.mjs builds this join from each …-quality-rescored.csv and its …-speed.csv. It picks the columns by name (OUT_COLS in eval/combine.mjs). mean_answer_chars sits right after mean_f1, as in the rescored CSVs, so the F1 is never read without the answer length (#378, #833). A stem with no speed CSV is a quality-only run and gets no combined file.

Two combined files are committed: i7-1185G7-cpu.csv and i9-9900X-vulkan.csv. The i9 speed run covers four Gemma 4 models (e2b, e4b, 26b-a4b, 31b) whose QA ran in a separate wave. combine.mjs joins that QA from i9-9900X-gemma4wave-vulkan-quality-rescored.csv. First source wins: where a model is in both runs (gemma4-12b, qwen3.6-27b-q4) the main run's row is kept whole. The combined CSVs are derived files. After rescore.mjs or a new speed CSV, run node eval/combine.mjs and commit the result. apps/desktop/tests/eval/combine.test.ts re-runs the script over the committed inputs and fails on any byte of difference.

The decision rule — a challenger earns recommended_profiles promotion (and a default-model challenge) at its tier when it either (a) beats the incumbent on the German RAG metrics AND citation_correct_rate at ≥ comparable tg_tps, or (b) matches quality with materially better license/provenance or lower RAM. Losing challengers are demoted/removed — the catalog must not accumulate dead multi-GB downloads. Then update:

  • each promoted manifest's recommended_profiles + the model-policy.md catalog table (drop the "challenger — not auto-recommended" note),
  • every manifest's recommended_min_ram_gb with the Part-C measured value,
  • D18: decide whether qwen3-4b-instruct-2507-q4 beats the original 4B (and the original 8B) — especially on em_rate_de / f1_de (the §7.3 German wobble). Promoting it to default is a product call because 2507 has no hybrid thinking (Deep becomes a no-op on the default).
  • Gemma flag: decide whether to flip gemma4-12b-it-qat-q4's supports_thinking_mode to true based on its Deep-mode quality numbers (it already honours enable_thinking; §7.3).

(Both decisions were made — the outcomes are §6.1 and the §7 record.)

Reading mean_f1 (#378, 2026-11-15): always beside mean_answer_chars. On this harness EM no longer separates the models. In the 17 committed …-quality-rescored.csv files em_rate lies between 0.9412 and 0.9765, and 66 of the 80 model rows sit at 0.9765, which is 83 of the 85 answerable items (issue #378 quotes about 0.83: the same 83 items counted over all 100). EM only checks that the answer contains the gold span, so once nearly every answer does, token-F1 against that short span mostly measures how short the answer is. In each of the seven runs with six or more models, mean_answer_chars and mean_f1 correlate at r = −0.93 to −0.99, one point per model (the four-quant i9-9900X-qwen38-vulkan run has almost no spread, F1 .3500–.3523 at 80.3–81.1 characters, and shows nothing either way). Example from one run, i9-9900X-gemma4wave-vulkan: gemma4-e2b-it-qat-q4 answers in 76.2 characters on average at F1 .3373, gemma4-e4b-it-qat-q4 in 95.5 at F1 .2999. So:

  • Read mean_f1 (and f1_de / f1_en) as a verbosity indicator, not as a quality ranking on its own: a lower F1 with longer answers can mean a fuller answer, not a worse one.
  • The quality axes that do vary between models are abstention on the 15 unanswerable items (abstain_rate_unans) and hallucination_rate, each audited against the …-items.jsonl dump (§6). citation_correct_rate is part of the rule above, but it is 0.9882 in every row of all 17 files: here it measures retrieval, not the model (§6).
  • Ranks already argued from an F1 delta stay as recorded; #378 adds the column and moves no rank. The clearest ones, where an F1 delta is the stated quality basis of a current rank, are the gemma4-e4b-it-qat-q4 rank 0, the gemma4-e2b-it-qat-q4 rank 3 (§9.3 decision table, §6.5 "#153 amendment") and the gemma4-26b-a4b-it-qat-q4 rank 2 (§9.3), and each carries a pointer back here. Re-reading them with the answer length beside F1, on the axes above, is pending: an owner call.

The column is regenerated from the committed dumps with node eval/rescore.mjs --existing-only (§2).


6. First-run findings (2026-06-11 — i7-1185G7, CPU; QA half only)

First QA execution: the 8 benchmarked catalog chat models on the i7-1185G7 laptop (CPU/Vulkan-DL build; the 9th chat manifest, qwen3.5-4b-ud-q4kxl, shipped later and is not yet benchmarked), plus a single-model reproducibility check on the dev box. Speed (Part B) + peak-RSS (Part C) followed later the same day — §6.1. Authoritative QA numbers are the *-quality-rescored.csv (see below).

  • Reproducible across machines. qwen3-4b-instruct-2507-q4 scored bit-identically on the dev box and the i7 (EM 0.9765 / F1 0.3613 / 1 hallucination) — greedy decoding is deterministic, so QA quality is machine-independent and one machine suffices for it (the 2nd machine matters for speed/RAM, not quality).

  • Grounded accuracy saturates → it does NOT separate the catalog. EM 95–98% for every model, German ≈ English (em_de ≈ 0.94–0.96, em_en = 1.00). All eight benchmarked models are competent grounded extractors; the catalog separates on hallucination-resistance, not accuracy.

  • citation_correct_rate is a flat 0.9882 for every model — it is a RETRIEVAL property, not a model one. generateGroundedAnswer persists the citations computed by retrieval (not parsed from the model's [Sn]), so this column is constant across chat models and cannot rank them. ⇒ In this architecture the decision rule's "citation-correctness" clause is a retrieval constant; lean the decision on EM/F1 + hallucination-resistance + speed/RAM (§6.1) instead. (#378, 2026-11-15: F1 is no firmer ground. With EM saturated it mostly measures answer length, so it is read beside mean_answer_chars as a verbosity indicator (§5); the quality axis that separates the models is abstention on the unanswerable items, the next bullet.)

  • The discriminating axis = abstention on the 15 unanswerable items. Audited genuine hallucinations (manually confirmed against the raw dump):

    Model Genuine hallucinations / 15
    ministral3-8b-instruct-2512-q4 0
    gemma4-12b-it-qat-q4 1
    qwen3-4b-instruct-2507-q4 1
    qwen3-30b-a3b-q4 1
    qwen3-8b-instruct-q4 2
    qwen3-14b-instruct-q4 2
    qwen3-4b-instruct-q4 (current default) 3
    granite-4.1-8b-q4 3

    Two hard item families caused every failure: (a) contract-penalty — the invoice's "2% late-payment fee" misread as the agreement's (nonexistent) late-delivery penalty (fails almost everyone, incl. Gemma's one miss); (b) hr-sick — answering with the 20 vacation days for a paid-sick-days question (trips the Qwen family + Granite; Gemma / Ministral / 2507 correctly refuse). ±1 item residual on borderline hedged answers (e.g. qwen3-30b's caveated en-contract-penalty).

  • D18 (the incumbent-refresh question): 2507 ≥ the original 4B on every axis — EM 0.9765 vs 0.9647, F1 0.3613 vs 0.3277, em_de 0.9608 vs 0.9412, f1_de 0.3698 vs 0.3400, hallucinations 1 vs 3. It also matches the original 8B on EM with higher F1 and fewer hallucinations (1 vs 2). The §7.3 bring-up "German wobble" did not appear on the grounded RAG path (2507 has the top German F1 here) — that wobble is an open-/parametric-knowledge issue, not a grounding one. Promoting 2507 over the original 4B as default is supported on quality; the only caveat stays the product one (2507 has no hybrid thinking → Deep becomes a no-op). Confirm once speed/RAM are in.

  • Gemma supports_thinking_mode flag: not informed by this run (grounded answers run balanced, thinking off). Gemma's strong abstention is a general quality signal, but the flag needs a separate thinking-quality check.

  • Methodology note — the abstention detector was hardened mid-analysis. The v1 phrase list overcounted hallucination ~2–3× (it missed "none of the documents mention", "does not specify", "nicht ausreichend", "nicht im bereitgestellten Dokument enthalten", bolded Ministral refusals, …). Fixed in apps/desktop/tests/eval/text.mjs (+ regression tests), then re-scored from the dumps via eval/rescore.mjs — no models re-run. The *-quality.csv files are the raw v1-detector output; *-quality-rescored.csv is authoritative and a fresh run now reproduces it.

6.1 Speed + RSS (i7-1185G7, CPU) and the decisions applied

Speed/RSS were measured on the i7 (scripts/benchmark-speed.ps1; combined row in eval/results/i7-1185G7-cpu.csv). Decode (tg t/s) and peak RSS, by tier:

Tier Model tg t/s peak RSS (GiB) min RAM set
4B qwen3-4b (default) · qwen3-4b-2507 6.3 · 6.2 5.2 · 5.2 8 (validated)
8B qwen3-8b · ministral · granite 3.9 · 4.5 · 4.3 8.3 · 8.7 · 8.9 12
12–14B qwen3-14b · gemma4 2.1 · 3.0 10.6 · 10.6 14
30B-MoE qwen3-30b-a3b 4.7 10.3† 24 (held)

†MoE + mmap undercounts resident set (the file is ~18.6 GB); recommended_min_ram_gb held at 24.

Benchmark verdicts (tier winners): Ministral 3 8B (best 8B — 0 hallucinations + fastest); Gemma 4 12B (beats Qwen3 14B on every axis); Qwen3-4B-2507 (beats the original 4B on every axis, D18). Granite 4.1 8B lost its tier (most 8B hallucinations, lowest F1).

What was actually applied to the catalog:

  • recommended_min_ram_gb recalibrated from measured peak RSS — 8B 16→12, 12–14B 16→14 (4B held at 8, 30B held at 24 for the MoE/mmap caveat). This is live. recommended_ram_gb left unchanged (changing it shifts the quality-blind best-fit — see §6.2). (Revised 2026-07-11: §6.3 recalibrated recommended_ram_gb for the 12–14B pair and the 8B once the ranked-only guard removed that blocker.)
  • The original qwen3-4b-instruct-q4 stays the bundled default (user decision) — it has hybrid thinking, so Deep keeps working out of the box on low-end machines; 2507 is instruct-only.
  • Promotions made LIVE via recommendation_rank (the §6.2 follow-up, done same session): each manifest carries a rank (winner = higher) that the now quality-aware recommendModelIdByRam uses as the tiebreak. Real-hardware effect: ≤12 GB → Qwen3-4B (default), 16–24 GB → Ministral, ≥32 GB → Gemma 4; Granite + the 30B MoE are never auto-recommended. recommended_profiles stays [] (the picker is RAM-best-fit, not profile-based).
  • Gemma supports_thinking_mode FLIPPED to true (run #2, tests/manual/gemma-thinking.test.ts, i7): Deep matched Balanced 8/8 on reasoning items (incl. the snail/bat-ball/syllogism traps) with coherent chain-of-thought → Deep is safe to offer. Caveat: both modes hit 100%, so the small set can't show Deep strictly helps; it shows Deep deliberates well and never regresses. Gemma 4 is the only thinking-capable challenger; the composer now offers "Thorough" for it.
  • Licence correction: the whole catalog is Apache-2.0 (Qwen3 included) — the challengers' edge is quality + speed, not licence. Manifest comments that implied otherwise were fixed.

6.2 Recommender architecture finding — FIXED (quality-aware tiebreak)

The benchmark exposed that the production recommender recommendModelIdByRam was quality-blind: it picked the largest model whose recommended_ram_gb fits, tie-broken by disk size, and ignored recommended_profiles (that list is only the legacy no-RAM path). Concretely, on a 16 GB machine it would have recommended granite (largest-disk 8B at recommended_ram_gb: 16) — the run's worst 8B.

Fix applied (Phase 29): a new optional manifest field recommendation_rank (integer, default 0; higher = preferred) is now the tiebreak in recommendModelIdByRam, applied AFTER the capacity fit (comfortable recommended_ram_gb, or the lightest runnable) and BEFORE disk size. Default 0 preserves the old behaviour for every other manifest, so legacy callers/tests are unchanged. Ranks encode the benchmark verdict folded with the product decisions: Qwen3-4B = 2 (default, keeps Deep) > 2507 = 1; Ministral = 2 (8B winner) > Qwen3-8B = 1 > Granite = 0; Gemma 4 = 2 (12–14B winner) > Qwen3-14B = 1; 30B MoE = 0 (opt-in). Net result on real hardware: ≤12 GB → Qwen3-4B, 16–24 GB → Ministral, ≥32 GB → Gemma 4; Granite and the 30B are never auto-recommended. (Superseded for 20–24 GB by §6.3, 2026-07-11: the 12–14B tier's honest comfortable RAM is 24, so ≥24 GB → Gemma 4 and Ministral serves 16–20 GB.) Covered by tests/integration/benchmark.test.ts (real-manifest picks) + models.test.ts (the tiebreak unit tests).

Phase 29 closed 2026-06-11: the Gemma thinking-quality check ran (flag flipped true) and the plan was condensed into §7 below. Only the OPTIONAL dev-box speed/RSS sweep remains, for the formal ≥2-machine completeness (QA and RSS are machine-independent, already reproduced).

6.3 The 20–24 GB tier gap — FIXED (issue #48, 2026-07-11)

Issue #48 found that a 20–24 GB machine was recommended the same 8B as a 16 GB machine: every 12–14B model carried recommended_ram_gb: 32, so the comfortable-fit stage could never reach the tier winner even though Gemma 4 12B (measured ~10.6 GiB peak RSS, hard min 14) runs comfortably with the embedder/reranker/app/OS co-resident on 24 GB. §6.1 had deliberately left recommended_ram_gb unchanged because "changing it shifts the quality-blind best-fit" — that blocker is what the guard below removes. Two changes, applied together:

  • Data (honest comfortable RAM): gemma4-12b-it-qat-q4 and qwen3-14b-instruct-q4 recommended_ram_gb 32→24 (same measured RSS, same physical tier — they must stay in one capacity group so the §6.2 rank keeps deciding the tier winner); qwen3-8b-instruct-q4 32→16 (measured 8.3 GiB — Ministral's tier; at 32 it would have sat alone in the top capacity group and hijacked the ≥32 GB pick once the 12–14B pair moved down).
  • Ranked-only guard (recommendModelIdByRam): within each stage (comfortable, then runnable), a rank-0 model is considered only when no ranked model fits that stage at all. Rank stays a within-tier tiebreak (capacity-first ordering is unchanged), but a never-evaled or benchmark-loser model can no longer win on capacity alone — which §9's "never auto-recommend rank 0" invariant previously got only from careful per-manifest RAM alignment (the fast-tier 2B/0.8B manifests carry deliberately tier-aligned RAM lines for exactly that reason; with the guard, honest RAM lines become safe to ship with their eval). A role with no ranks at all (embeddings/reranker/…) is unchanged.

Net mapping (asserted in benchmark.test.ts at 8/12/16/20/24/32): ≤12 GB → Qwen3-4B, 16–20 GB → Ministral, ≥24 GB → Gemma 4; Granite, the MoEs, and every rank-0 Qwen3.5 model are never auto-recommended. The rest of issue #48 — promoting the Qwen3.5/3.6 generation — is NOT a rank edit: it stays gated on the §9 eval + §9.1 smoke (owner, offline, real weights). (Superseded 2026-07-12: §6.4 promoted the Qwen3.5/3.6 generation by owner decision; the mapping above is the historical Phase-29/issue-48 state.)

6.4 Newest-Qwen promotion (owner decision, 2026-07-12)

The decision. The owner promoted the newest-generation Qwen models to recommendation_rank: 3 per RAM tier: qwen3.5-4b-ud-q4kxl (≤12 GB), qwen3.5-9b-ud-q4kxl (16–20 GB), qwen3.6-27b-q4 (24 GB, productized from its local-test stub with a real unsloth download source + HF-LFS hash), and qwen3.6-27b-q5 (≥32 GB, same productization). Net mapping (asserted in benchmark.test.ts and committed-catalog.test.ts): ≤12 GB → Qwen3.5 4B, 16–20 GB → Qwen3.5 9B, 24 GB → Qwen3.6 27B Q4, ≥32 GB → Qwen3.6 27B Q5. Granite, both MoEs, the fast-tier 2B/0.8B, and the superseded incumbents stay selectable, never auto-recommended. (Amended 2026-08-16: the same standing preference handed the 24 GB and ≥32 GB tiers to qwen3.8-27b-q4 / qwen3.8-27b-q5 at the §9.4 wave ratification — full generational handover, the Qwen3.6 pair to rank 1. The 4B/9B rows above are unchanged; the 12–15 GB row belongs to the #153 E2B promotion, §6.5.)

The rationale (recorded verbatim so the trade-off stays visible). A subjective owner judgment: newer model generations are expected to be better than the ones they replace (training data, instruction tuning, and multilingual quality all move forward), and the current local evidence is not strong enough to override that prior. The owner weighed the §9 tester eval and judged it directional, not decisive: its primary quality signal (F1) is length-confounded (the §9 scorer caveats; Qwen3.5's verbose house style), EM rates across the promoted set and the incumbents are all high and close (the widest promoted-vs-incumbent EM gap is ~2.4 points — the 9B's .9765 vs Ministral's .9529), and the runs are single-machine, single-run, pending the §5-item-8 scorer fixes. Follow-up benchmarks on BOTH axes (rescored quality, plus the missing speed/peak-RSS rows) are planned and stay recorded as open work below. Where the eval IS clear it AGREES with the promotion at the top end: Qwen3.6 27B Q5/Q4 lead the quality table outright (F1 .3573/.3523, zero unanswerable-set hallucinations for Q5).

What this supersedes. The §-9/D17 rule "a challenger earns promotion only via the local eval" is amended: the owner may also promote on product/positioning grounds, and the honest eval standing must then be recorded next to the rank (done, in each promoted manifest and here). Specifically: the 4B FAILED its §9 bar against qwen3-4b-instruct-q4 (F1 .2728 vs .3277, EM tied at .9647 — a cross-run i9-vs-i7 comparison) and the 9B actually EDGED Ministral on F1/EM within cross-run tolerance (F1 .3152/.3124 vs Ministral's Phase-29 i7 .3111, EM .9765 vs .9529) but fell once for the en-contract-penalty invoice-distractor trap where Ministral's record is clean — the tester's basis for proposing rank 1 under it (§9); they are recommended anyway by this decision. The b9849 load gate is satisfied for all four (the #48 tester ran the whole wave on the b9849 binary; the 4B additionally loaded + streamed through the app from the portable drive on 2026-07-12).

Still open after this decision (unchanged from §5 item 8): the scorer follow-ups (refusal-phrase list, rescore.mjs rerun), owner ratification of the tester CSVs as canonical (the raw CSVs are now committed under eval/results/i9-9900X-vulkan-*), speed + peak-RSS rows for every promoted model (the tester runs were QUALITY-ONLY; the promoted set has no §3/§4 rows yet, so their recommended_min_ram_gb values rest on file size + headroom convention, not measured RSS), and the §9.1 through-the-app smoke for the 9B and both 27Bs. If the speed/RSS rows or the rescored quality table later contradict a promoted rank, this decision is the one to revisit, not silently override. (All four CLOSED 2026-08-03 — scorer v3 + rescore landed, both i9 runs ratified as the §9 record, the 2026-07-30 run supplied §3/§4 rows for the whole promoted set (RAM lines confirmed on the vulkan basis; the Linux-cpu numbers are a non-comparable mmap basis — §9.3 "§4 RSS"), and the 9B + both 27B §9.1 smokes PASSED. The rescored table did NOT contradict the promoted ranks. Residuals live in the wave follow-up issue: the Windows-basis RSS re-measure and the 35B-A3B §9.1 smoke — the latter PASSED 2026-08-09, §9.3 smokes record.)

6.5 Signal-aware picker: the measured-tok/s step-down (issue #95 item 1, 2026-08-09)

Status: design record for the option-2 signal-aware picker (issue #53's residue, tracked in issue #95). Changes recommendation behavior for every benchmarked machine, so it carries the BUILD_STATE §5 item 8 standing requirement: owner sign-off (@comilionas) in PR review before merge. It also resolves issue #52's deferred downgrade question (see "What this resolves" below).

The RAM-best-fit picker (§6.2/§6.3) sees capacity only. Two machines with 16 GB get the same pick even when one of them demonstrably generates text at a crawl (issue #53's weak-iGPU laptop class). Since issue #52 the Diagnostics benchmark persists the honest pairing (tokensPerSecond plus measuredModelId, the model that actually produced the number), so the picker can now consume it. The rules:

  1. Required behavior. A loaded-model tok/s probe under the threshold (SLOW_PICK_TOKENS_PER_SECOND = 5, strictly below) steps the RAM-best-fit recommendation down ONE size tier. At or above the threshold, or with no probe, nothing changes.
  2. Applicability predicate (the #52 lesson). The crawl is a valid signal ONLY when measuredModelId resolves to a catalog manifest of the same role whose recommended_ram_gb is at or below the would-be pick's recommended_ram_gb. A crawl measured on an OVERSIZED loaded model (the user manually started something above their tier) is expected and never downgrades the pick. A measuredModelId that no longer resolves in the catalog is no signal. The signal applies to the CHAT recommendation only: the probe streams through a chat model, and the embeddings pick never moves on it.
  3. "One tier down" defined. Re-run the §6.2 comfortable stage excluding the top band (every model sharing the winner's recommended_ram_gb), over RANKED models only: the §6.3 ranked-only guard applies unchanged, and the step therefore can never land on a rank-0 model (gemma4-e2b stays unreachable until its own #95-item-2 gate resolves — resolved 2026-08-09, see the #153 amendment below). If no lower ranked tier exists, KEEP the original pick: the step never lands on nothing. A pick that came from the runnable fallback stage (machine below every comfortable line) also keeps: it is already the lightest honest answer. Against the committed catalog today the step moves 24 GB boxes qwen3.6-27b-q4 → qwen3.5-9b-ud-q4kxl and ≥32 GB boxes qwen3.6-27b-q5 → qwen3.6-27b-q4; the 16 GB tier keeps its pick (no ranked band below 16 exists yet — superseded 2026-08-09: the #153 E2B promotion created the sub-16 band; 16–20 GB crawls now step to gemma4-e2b-it-qat-q4). The step's reach grows as RAM lines are retuned from measured RSS (#95 item 3) or lower tiers earn ranks (#95 item 2): the rule is structural, not a hardcoded mapping — the #153 promotion exercised exactly this property (rank edit only, zero picker-code change). (Amended 2026-08-20 by the #196 successor wave (§9.5) — again a catalog change, not a picker change, and again the structural rule doing its own work: with the UD-* successors ranked, a crawling 24 GB box steps qwen3.8-27b-ud-q4km → qwen3.5-9b-ud-q4kxl (unchanged landing tier) and a crawling ≥32 GB box steps qwen3.8-27b-ud-q5km → qwen3.8-27b-ud-q4km rather than to qwen3.6-27b-q4. Pins in committed-catalog.test.ts.)
  4. Stateless, single-step. The stepped pick is derived fresh on every listModels call from the persisted settings.lastBenchmark; a re-benchmark replaces the sample. The base pick is always recomputed from RAM alone, so downgrades never compound across runs.
  5. No-signal path byte-identical. No benchmark yet, probe skipped (no runtime was running), tok/s at/above threshold, or predicate fails: the result is today's pure RAM-best-fit answer, exactly. The no-signal mapping (≤12 → Qwen3.5 4B, 16–20 → Qwen3.5 9B, 24 → Qwen3.6 27B Q4, ≥32 → Qwen3.6 27B Q5) stays pinned untouched in committed-catalog.test.ts and benchmark.test.ts. (Amended 2026-08-09 by the #153 E2B promotion — a catalog change, not a picker change: 12–15 GB → Gemma 4 E2B, the new sub-16 comfortable band; 8 GB keeps Qwen3.5 4B via the runnable stage. Pins updated in both files.) (Amended again 2026-08-20 by the #196 successor wave: the two top rows are now 24 → Qwen3.8 27B UD-Q4_K_M and ≥32 → Qwen3.8 27B UD-Q5_K_M, and the 9B band reaches to 23 GB. Both files were re-pinned; the "pinned untouched" claim above is the pre-#196 reading and is kept for the record, not as current fact.)
  6. Consistency across surfaces. runBenchmark (the Diagnostics card's recommendedModelId) applies the same rule with the just-measured values, and listModels applies it with the persisted ones, so the two surfaces cannot disagree: both call the same recommendModelIdByRam(manifests, ram, role, speedSignal) picker.
  7. Surfacing. When the step-down fires, the #52 named-warning family gains a sibling (main.benchmark.warnRecommendationLowered): it says the recommendation was moved down one size tier and names the measured model and the measured figure. EN + DE catalogs; persisted in settings.lastBenchmark.warnings as canonical English (i18n record §3.3 rule 1), display translated via the interpolated display map. The #110 slow-read warning upsert is untouched.

What this resolves. Issue #52 deliberately deferred the question "should the profile downgrade be suppressed when the measured model is much larger than the recommendation?" (recorded in benchmark.md "Profile classification"). Answer, as built: the legacy PROFILE downgrade stays as-is (it feeds the profile table, a fallback surface), and the RECOMMENDATION applies the predicate above instead: an oversized crawl never moves the pick, a right-sized crawl moves it exactly one tier. The #52 warning keeps naming the measured model; the new sibling warning names the consequence for the pick.

Basis note (issue #291, 2026-09-04). Every tok/s figure in this section — the SLOW_PICK_TOKENS_PER_SECOND = 5 calibration and the #153 legs below (17.0 / 9.0 / 14.6) — is probe-basis: streamed SSE chunks over a wall-clock window that started before the request, so prefill-inclusive and, on an MTP model, chunk-not-token. Since #291 the persisted tokensPerSecond is llama-server's own decode-only predicted_per_second whenever the runtime sends timings (BenchmarkResult.speedBasis), which reads HIGHER than the old figure (the #291 rig on the pinned b9849, verified on #298: the old probe's 25 vs 28.2 / 25.9 with MTP and 21.8 without; the issue's 47.9 / 38.4 came from a newer -fa build). The threshold was deliberately not retuned: it is an order-of-magnitude crawl gate, no benchmarked machine sits within a factor of two of it, and a decode-only figure only moves readings further above it. Re-measure the #153 class on the new basis before any future retune.

#153 amendment (2026-08-09, owner-ratified): the E2B promotion gives the step-down its sub-16 landing tier. The weak-16 GB-box in-app Diagnostics leg (issue #153, successor to #95 item 2) ran on the designated class (15.8 GB, i7-1185G7, Iris Xe iGPU, Vulkan b9849, AC + idle, dev build of master 2d1d9db9): settled tok/s gemma4-e2b 17.0 vs qwen3.5-4b 9.0 vs bundled qwen3-4b 14.6 — the big-rig cpu ratio (~2× the promoted 4B) reproduces on the iGPU basis (all three legs GPU/Vulkan per the chat header; basis + full runs in the #153 comment). With the §9.3 quality standing (E2B F1 .3373 > qwen3.5-4b .2728, equal-class audited hallucinations) E2B wins the sub-16 band on both axes, so: recommendation_rank 0 → 3 and recommended_ram_gb 16 → 12 (the honest retuned value; the old 16-floor existed only to keep the then-rank-0 manifest from hijacking the comfortable stage — the §9.3 field-signal note's "retune recommended_ram_gb" branch, executed). Consequences, all pinned: base mapping 12–15 GB → E2B (was the runnable-stage qwen3.5-4b fallback); stepped mapping 16–20 GB crawl → E2B (was rule-3 keep); 8 GB and ≥16 GB base picks unchanged. The §6.5 step-down was also exercised on real hardware for the first time during the #153 measurement: it correctly did NOT fire (all settled values ≥ 5 tok/s; recommendation stayed the 9B throughout). Deep 7/8 flip-rule guidance for E2B stands (§9.3 thinking table). (#378, 2026-11-15: the quality half of "both axes" is an F1 delta; read it beside mean_answer_chars, re-read pending as an owner call, §5.)

Single-step card-path semantics (2026-09-06 amendment, PR #308 audit). §6.6's rule C reuses this section's step-down unchanged, with the destination filtered through the card's own eligibility: a slow sample can never step to a model that needs more RAM than the machine has OR more graphics memory than the card's free budget holds (audit finding R1 — the original shipped picker could step past both), and a crawl measured on a model the card cannot hold (the user manually started something oversized for the card) never moves a pick that already fits, exactly as an oversized-RAM crawl never moves the RAM pick (audit finding R2). Both are the same applicability predicate as rule 2 above, extended once to the card's eligible set — never applied twice.

Sample identity (2026-09-06 amendment, issue #322; owner-confirmed 2026-09-06). The persisted pairing used to carry no record of what produced it, so after a card swap, a driver change of backend, or the GPU switched off, a stale crawl kept steering the pick as if nothing had changed (audit R2's residual, finding O5). Every sample now carries BenchmarkResult.speedIdentity — the NEXT-start memory class and budget device name at benchmark time (the same GpuBenchmarkInput the pick is judged against), the context window the running model was launched with (ModelRuntime.contextWindow), and the backend the ladder landed on — normalised by shared/benchmark-schema.ts like speedBasis (absent on older results, null when nothing was measured). The rule, in speedSignalFor / sampleCountsForNextStart (registerModelIpc.ts, the one implementation both the Models ★ and the Performance snapshot read), is one-directional: a sample counts when the next start (nextStartMemoryFor) runs on a path NO FASTER than the one it was measured on — the crawl is an upper bound on what a slower path can do, never evidence about a faster one.

  1. Measured on the card (backend gpu under a discrete / unified class): counts for the next start on the SAME card (by name), and counts for a next start on the PROCESSOR (GPU switched off, auto-disabled) — the processor will be slower still, so dropping the sample there would move the pick UP on the slowest configuration the machine has (the first draft of this rule did exactly that; corrected on the owner's review). A DIFFERENT card: dropped (ambiguous without the sizes; rare).
  2. Measured on the processor (the ladder's CPU rung, whatever the class was; or an unknown backend): counts for a processor start, never for a card start — a processor crawl says nothing about the card. A sample from the mock runtime never counts.
  3. The context is recorded, not matched. The step-down is an order-of-magnitude crawl gate (< 5 tok/s) on a DECODE figure (#291: prefill excluded), and decode speed does not move by an order of magnitude with the context size — while the context is a Settings value users change often; invalidating on it would drop a valid signal for no reason. No ratio threshold: it would be a number with no measurement behind it.
  4. Legacy samples (no identity) keep steering as before — an existing workspace's recommendation does not change at upgrade; the next check records the identity.
  5. Thresholds, the step itself and the card-path filtering above are unchanged; runBenchmark still applies the just-measured sample (its identity trivially matches at that moment).

Known residual: the warnRecommendationLowered warning a check persisted is historical (it describes that run) and stays on the Diagnostics card and in the Copy report after the identity stops matching, while the ★ no longer steps — the "Recommended at the time of the check" label already covers the saved id; the warning carries no such qualifier.

Pinned in picker-seams.test.ts ("the speed sample carries the identity it was measured under (#322)": recorded at runAndPersistBenchmark; GPU off / auto-disabled → the RAM pick still steps (Q5 → Q4); a CPU-rung crawl under a card class → the card pick, not the step; a processor-only crawl → steps a processor start, not a later card start; the mock → never; a different card → the card pick; the same card → still steps, exactly as a legacy sample; a different context → still steps) and benchmark-schema.test.ts.


6.6 Graphics-memory-aware picker: the card decides on a discrete GPU (2026-09-05)

Amended 2026-11-20 by §6.8. The need is now the runtime's measured projection, the order follows card ranks (decision 2 is retired), and a model seen landing partly on the card is not picked again. The thresholds, grids and the 8 GB reasoning below are the record of the state before that.

Status: implemented on feat/vram-aware-picker (PR #308), merged onto the Performance wave (PR #303). Changes the recommendation on every machine with a usable discrete card, so it carried the §5 item 8 standing requirement: owner sign-off given 2026-09-06 in the PR #308 review (decisions 1–11, rule C on the free-memory basis, the cross-PR notes, and the strictly ranked card-path fallback of #326).

2026-09-06 amendment (PR #308 audit). An independent audit of the 2026-09-05 shipped picker found it read devices[0] instead of an explicit budget device (so a hybrid laptop could pick its iGPU), judged fit against the card's TOTAL memory with one flat 0.5 GiB cache term instead of a per-model figure against FREE memory, and let the §6.5 speed step-down land off the RAM floor or off the card. This section is rewritten below as the FIXED rule (rule C); the picks table, the 30-point grid and the raw-MiB thresholds are all recomputed on the corrected free-memory basis and supersede the 2026-09-05 figures (an 8 GB card starring the 9B, a flat grid from 12 GB up starring Gemma 12B, 24 GB and up starring the 27B Q5), which are retracted. Full remediation record: tmp/PR-308-fix-plan-ledger.md (P2–P4 logs); the picker rule itself was already correct apart from the three defects above.

The finding (still true). The RAM-best-fit picker (§6.2/§6.3) sees RAM only. On a machine with ample RAM but a small discrete card it would recommend a model that llama.cpp's --fit then splits across the card and RAM at roughly processor speed. On a machine with a discrete card the model has to FIT THE CARD to run at card speed, and the card is the smaller number on every consumer machine.

The rule, as fixed (recommendChatModelId → recommendModelIdByVram in services/models.ts):

  1. Memory class (nextStartMemory in services/performance.ts): discrete = a usable budget device is available for the NEXT start — the largest probed device at or above the runtime's own 5,120 MiB gate (USABLE_VRAM_MB; 6,144 until the 2026-09-07 decision on #321 — see the N8 paragraph below) and not integrated by name (selectBudgetDevice / looksIntegrated, never the first device the driver listed; the name table matches the bare "Intel(R) Graphics" as integrated since 2026-09-07, anchored so a model-numbered discrete Arc still does not — #320) — and the runtime agrees at launch without an app-side --device: b9849's fit drops the integrated device by TYPE before it fills devices (#318 leg 5; the "the fit spreads layers over every listed device" reading of common/fit.cpp was measured false) — and the GPU is not switched off in Settings (gpuMode: 'off') nor auto-disabled after a crash (gpuAutoDisabled); unified = Apple Silicon (stays unified even with the GPU switched off); cpu = everything else, including a card present but excluded by the flags above. Only discrete changes anything; unified and cpu keep the RAM pick.

  2. The budget (graphicsBudgetMib, MiB) is the budget device's FREE memory: the probe's own freeMb, else totalMb − 1,024 (GRAPHICS_IDLE_ALLOWANCE_MIB) as an idle-desktop-use estimate (measured idle figures ran 0.6–1.5 GiB on Windows, median ≈ 1 GiB; total − 768 yields the identical 30-point grid below — every threshold sits > 300 MiB from either column, so the exact idle constant does not matter within that margin).

  3. A model fits the card (fitsGraphicsMemory) when estimateGraphicsNeedMib(m) ≤ budgetMib, where

    estimateGraphicsNeedMib(m) = (weightsMib(m) − hostMappedWeightsMib(m)) × 1.15
                               + (m.estimatedContextCacheGib ?? 0.5) × 1024
                               + 1,024
    

    — the unrounded weights (decimal GB manifest size → MiB), the runtime's working buffers (15 % of the weights that actually reach the card), the model's own context-cache estimate, and the fit's fixed 1 GiB --fit-target margin. The working share moved from the whole file to the OFFLOADABLE weights on 2026-09-07 (owner decision, #321). It stands for the compute buffers the runtime reserves BESIDE the weights on the card, and those scale with what is on the card — but it was being applied to the embedding/output tables that stay CPU_Mapped too. On the E2B that made the estimate 2.4× too high (4,746 predicted against 1,997 projected and ≈ 1,998 used) because 2,152.50 of its 3,147 MiB never leaves the host; on the 9B it assumed 837 MiB against a 498 MiB compute buffer. That barely mattered while sub-6 GiB cards never reached the card path; with the gate at 5,120 they do, and "Your model" would have called the E2B far tighter than it is. host_mapped_weights_mib is an optional manifest field carrying the MEASURED figure — the app has no GGUF-header parser — read off the CPU_Mapped model buffer size line of a full-offload start (a partial offload inflates it with the layers that did not fit: the 9B logs 545.62 at 33/33 but 824.31 at 31/33). A manifest without it, i.e. any model never started on hardware, keeps the old whole-file arithmetic rather than getting a guess:

    model host_mapped_weights_mib from
    gemma4-e2b-it-qat-q4 2,152.50 leg 4, E2B 36/36
    qwen3.5-9b-ud-q4kxl 545.62 leg 5, 33/33
    gemma4-12b-it-qat-q4 787.50 leg 3, 49/49
    qwen3.8-27b-ud-q4km 682.03 leg 7, 66/66
    qwen3.8-27b-ud-q5km 682.03 leg 1 -np 1, 66/66
    qwen3.5-4b-ud-q4kxl 497.31 #391 leg 4 follow-up (b), 33/33
    gemma4-26b-a4b-it-qat-q4 577.50 #391 last item, 31/31 on the RTX 3090

    (The MoE was the last one missing, and only the RTX 3090 can fully offload it. Measured 2026-09-08 on its first hardware start ever: the weight had to be fetched onto the rig first. Every model rule C can ever star now carries a measured figure — the five rank-3 models, plus the two rank-2 tier winners in the table below. That holds because the E2B has both the lowest threshold (2,271; the next is 3,838) and the lowest RAM floor of any ranked model, so a rank-3 model is eligible whenever any ranked model is, and rank sorts first. It is NOT every ranked model, and the whole-file path is not dead: 8 of the 15 ranked manifests carry no figure — exactly the 8 this section omits from the thresholds table below as unable to win rule C — so they keep the whole file as their base. That is conservative for the ★, which never lands on them, but it is what "Your model" uses for one a user installs by hand.)

    2026-09-08: the host-mapped weights come out of the BASE too, not only the share. #321 took them out of the 15 % term on the reasoning that the share stands for buffers beside the weights on the card; the same reasoning applies with far more force to the weights term itself, and that is where the error actually lived. On the E2B, #321's share fix removed 323 MiB of a 2,748 MiB gap — the other 2,152.50 was still being charged as VRAM for weights that never leave the host. Against the five full-offload starts of #318 — plus the 4B's and the MoE's, added by #391 — estimate versus what the card was really asked for (the 4B's and the MoE's pre-#321 and #321 columns are identical because neither carried a measured figure until 2026-09-08, so neither fix could reach them; their "now" column is this measurement, not item 22 (e) itself):

    model pre-#321 #321 now measured now / measured
    E2B 4,746 4,423 2,271 1,998 1.14× (was 2.4×)
    9B 8,014 7,830 7,285 6,007 1.21×
    Gemma 12B 11,159 11,041 10,254 9,227 1.11×
    27B Q4 20,247 19,940 19,258 17,885 1.08×
    27B Q5 23,866 23,559 22,877 19,692 1.16×
    4B 4,410 4,410 3,838 3,261 1.18× (added #391)
    MoE 26B 18,353 18,353 16,972 14,943 1.14× (17,689 until #412 corrected the cache term)

    Every row is still ABOVE the measurement: the estimate stays deliberately conservative, because a too-small answer costs a silent partial offload while a too-large one costs a smaller recommendation. What this does NOT fix is the 15 % share itself — the measured compute buffers run 316–664 MiB per llama_context across the six models in the 33 captured logs, 2.9 to 19.8 GB on disk (corrected 2026-09-08, #329, recounted when the MoE capture landed: the earlier "416–569 MiB across models from 3.3 to 19.8 GB" was wrong in both directions — 316.16 is the 4B at ctx 4,096, 664.18 the 27B Q5 at ctx 32,768, and the 3.3 GB E2B's own load log is not among the committed captures). They are near-flat in file size and set instead by ubatch, context size and the layer split: 174 MiB on that same Q5 under a --ubatch-size 512 probe. The MoE capture added under #391 falls inside the range rather than widening it — 428.07 MiB on 14.4 GB of weights, between the 4B and the Q5. So the share reads 149 MiB on the E2B and 2,730 on Q5. Replacing it with a flat term was modelled and rejected for now: it flips the 8 GB row to the 9B, against #318 leg 2's measured 31/33 partial offload there.

    Why the GGUF header cannot replace the manifest field (this retires that half of §5 item 22 (e)): the picker judges models the user has not downloaded — the ★ is set on a missing model on purpose, and exactly ONE of the 29 chat manifests ships on a prepared drive. A header parser answers for that one and goes silent for the other 28, which are precisely the ones the recommendation exists to choose between. For a model that IS installed and HAS been started, the measured ModelPlacement already beats any estimate. What stays open is narrower and is what item 22 (e) now records: the two models with no measured figure, and the fact that nothing recomputes the field when a manifest's weights change.

  4. estimated_context_cache_gib (optional manifest field, number ≥ 0) replaces the flat 0.5 GiB term for nine models: the eight chat models below, whose figure was derived from the launch config (--ctx-size 8192, ubatch 2048; the 4B's figure is its own 4,096-token window) — the 26B-A4B's has since been read off a hardware start instead (#412) — and, since #473, the translation model, whose figure was measured; every other manifest defaults to 0.5 GiB in code (the field is absent, not stored as 0.5). Recomputed 2026-09-07 for ONE server slot (issue #319: CHAT_SERVER_ARGS passes -np 1 — the amendment below). Pinned in committed-catalog.test.ts ("pins the nine estimated_context_cache_gib values, and that no other manifest carries the field"); each manifest carries its own arithmetic in a YAML comment:

    model estimated_context_cache_gib was (4 slots) why it moved, or did not
    gemma4-12b-it-qat-q4 2.4 2.4 no recurrent state — both Gemma caches are cell-sized
    gemma4-26b-a4b-it-qat-q4 0.8 1.5 same — but the 1.5 was DERIVED and measured 760.00 MiB on the model's first hardware start (#412 below); the -np 1 reasoning itself is confirmed, both halves log 1/1 seqs
    gemma4-e2b-it-qat-q4 0.1 0.1 same
    qwen3.8-27b-ud-q4km 0.9 1.1 KV 512 + recurrent 448.88 MiB (MTP, 1 seq) = 960.9 MiB
    qwen3.8-27b-ud-q5km 0.9 1.1 identical figures — the recurrent state is f32, quant-independent
    qwen3.5-9b-ud-q4kxl 0.3 0.4 KV 256 + 1 × 48 = 304 MiB (measured at 4 slots: 256 + 201)
    qwen3.5-9b-ud-q3kxl 0.3 none (added 2026-11-20) same architecture as the UD-Q4_K_XL above, and the f16 cache does not depend on the weight quantization: KV 256 + 1 × 48 = 304 MiB
    qwen3.5-4b-ud-q4kxl 0.2 0.3 KV 128 + 1 × 48 = 176 MiB, at its 4,096 window
    translategemma-12b-it-q4 0.75 — (added by #473) measured on a full-offload start at its 4,096 window: KV 256 (non-SWA) + 480 (SWA) = 736 MiB, rounded up; it feeds the translation sidecar's headroom gate

    The rule behind the column, measured on the pin (leg7-baseline-q5km vs leg1-np-1 under eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/: same model, same context, one thing varied): the KV cache — and, on Gemma, the sliding-window cache — is sized in CELLS from --ctx-size and is counted ONCE at either setting (512.00 MiB both times; Gemma's two caches log as 4/1 seqs, four sequences over ONE cache). Only the recurrent state is per-sequence, so it drops exactly 4× (1,795.50 → 448.88 MiB). The two 27B figures use the MTP recurrent state (rs_seq 2 — both manifests opt into speculative_decoding, and finding 3 below recorded the old 1.1 GiB as under-counting that case). That is not a double count with MTP_VRAM_HEADROOM_MB: the constant gates whether rung 1a is attempted and covers the draft head's own weights + KV, while this term is the context cache the fit estimate adds to every start.

  5. RAM stays a HARD gate throughout: recommended_min_ram_gb ≤ RAM. The Models screen refuses to start a model over it, and the pick must never point at a refused model.

  6. The order (rule C). The RAM pick (recommendModelIdByRam, unchanged) stands wherever it ALSO fits the card. Only when it does not does the picker fall back to the fittest eligible model ranked FIRST by recommendation_rank, then by RAM tier, then by size — among RANKED models only (owner decision 2026-09-06, issue #326: a rank-0 model is never the automatic pick, so the card path is stricter here than the RAM picker's §6.3 guard). With no ranked model eligible — a card under ~4.5 GiB free — the RAM pick stands unchanged: the documented no-fit fallback (the model partially offloads; null when RAM is unknown as well).

  7. The §6.5 speed step-down applies to the card pick exactly as to the RAM pick, with the step-down's destination filtered through the same card eligibility (§6.5's single-step amendment below).

The picks against the committed catalog, RAM ample (32 GB) — the recomputed 30-point grid on the free-memory basis (pinned in committed-catalog.test.ts, "pins the 30-point rule-C grid on the free-memory basis"; freeMb per point 2 above):

card (nominal) freeMb used RAM 8 RAM 12 RAM 16 RAM 24 RAM 32
6 GB 5,120 4B E2B 4B 4B 4B
8 GB 7,168 4B E2B 4B 4B 4B
12 GB 11,264 4B E2B 9B 9B 9B
16 GB 15,360 4B E2B 9B 9B 9B
20 GB 19,456 4B E2B 9B Q4 Q4
24 GB 23,552 4B E2B 9B Q4 Q5

(4B = qwen3.5-4b-ud-q4kxl; E2B = gemma4-e2b-it-qat-q4; 9B = qwen3.5-9b-ud-q4kxl; Q4 = qwen3.8-27b-ud-q4km. A 32 GB-and-larger card's free memory, ≥ 31,744 MiB on this convention, clears the 27B Q5's threshold, so it keeps qwen3.8-27b-ud-q5km — the one row the 2026-09-05 total-memory grid also got right.)

Two rows moved on 2026-09-08, when item 22 (e) took host-mapped weights out of the estimate's base (rule 3 above). Neither of the 2026-09-07 decisions had moved the grid at all — every threshold fell but none crossed a row's free figure; #321's effect was on which machines REACH the grid, not on its content (the N8 paragraph below).

  • 20 GB / RAM ≥ 24: 9B → Q4. Q4 needs 19,258 against 19,456 free. This row is still predicted — no 20 GB card exists in the project — but the prediction is better grounded than the one it replaces: §6.6's original "Q4 lands partial at 20 GB" was computed at four slots, and -np 1 (#319) cut ≈ 1,347 MiB of recurrent state from exactly that projection.
  • 24 GB / RAM 32: Q4 → Q5. Q5 needs 22,877 against 23,552 free — it missed the nominal row by 7 MiB before this change. A real 24 GB card had already flipped at #319 (the RTX 3090 reports 24,822 MiB, so its budget is 23,798), and the hardware agrees: 66/66 layers at 51.0 tok/s.

The 8 GB row does not move: the 9B needs 7,285 against 7,168 free, 117 MiB short. But a real 8 GB card is not that stingy — the GTX 1070 Ti reports 7,504 free, so on that card the 9B IS now starred. That is the one place this change is load-bearing rather than cosmetic, and the measurement behind it is #318 leg 2: at four slots the fit read 6,898 MiB free, projected 6,007, and fell 133 MiB short of its own 1,024 MiB target — 31/33 layers at 20.2 tok/s. -np 1 returns 150.75 MiB, 17.75 more than that shortfall, so a full offload is expected; and the app's estimate (7,285) still sits above what the fit asks for (5,856 projected + its 1,024 target = 6,880), so the estimate remains the more conservative of the two. MEASURED 2026-09-08 (#391 leg 2): 33/33, twice. The fit read 7,350 MiB free under -np 1 — not 6,898: the reading moves with the slot count on every card measured (finding 1 below) — projected 5,856 and left 1,494 ≥ 1,024; on the 2026-09-07 reading the same projection would still leave 1,042, the 18 MiB pass predicted here. Decode 29.0 tok/s (was 20.2 at 31/33). Evidence eval/results/hardware/i7-8700-gtx-1070-ti-8gb-32gb/leg2-np1-verify*.*.

One consequence worth recording because it undercuts a stated rationale: the E2B's threshold is now 2,271 MiB, so a 4 GB card could hold a ranked model. #321 justified its 5,120 MiB floor partly as "nothing ranked fits 4,512 anyway, and rule C's no-fit fallback returns the RAM pick regardless". That arithmetic no longer holds. Settled 2026-09-08 (owner decision, #321): the floor STAYS at 5,120 and its recorded reason is replaced — see "Why 5,120 — RESTATED" in the N8 paragraph below, which rests on what the star would actually do at the budget such a card produces rather than on nothing fitting. That budget figure was itself corrected 2026-09-10 (#413): the 2026-09-08 text said ~3,900 MiB free, which no probed card supports — on the 768 MiB idle reserve measured on every card in this project it is ≈ 3,328, below the 4B's 3,838, so the E2B is alone at BOTH budget forms and the argument is intact. The N8 note carries the reserve table. Closed 2026-09-11 (owner, #413): the floor stays without a 4 GB measurement; N8 "Decided 2026-09-11" carries the reason.

Hardware verification (issue #318, 2026-09-07) — the 6, 8, 12 and 24 GB rows are VERIFIED on real starts; the 20 GB row stays predicted. When this section was written (G3) no model could be started on the audit machine, so the 8 GB row and the Gemma 9–11 GiB / MoE 17–18 GiB estimate bands rested on the formula alone. Six machines then ran the protocol (tmp/PR-308-assumptions-check.md §4, reproduced verbatim in #318) with the app's OWN rung-1/1a argv on the pinned b9849 build, one comment per start on #318; per-start JSON, the redacted -lv 4 load logs, Vulkan heap samples and the pasted Performance Copy reports live under eval/results/hardware/<slug>/. Every §6.6 verdict held:

leg card (probe total / free, MiB) model at ctx 8192 fit outcome decode app ★ (basis)
2 GTX 1070 Ti 8 GB (8,273 / 7,504) 9B 31/33 — the fit read 6,898 MiB free and fell 133 MiB short of its 1,024 target; identical with ~1 GB of desktop use 20.2 tok/s 4B (Grafikspeicher) ✔
2 fu same card, re-run 2026-09-08 under #391 with -np 1 now in CHAT_SERVER_ARGS (two starts, one with the #318 heap sampler polling) 9B 33/33 both times — the fit read 7,350 MiB free (not 6,898: finding 1 below), projected 5,856, "will leave 1494 >= 1024 MiB, no changes needed"; CPU_Mapped 545.62 (the manifest's figure, now measured on a second card); RS 50.25 MiB at 1 seq; the BAR heap still used (149.6 of 214 MiB) 29.0 tok/s 9B (Grafikspeicher) ✔ — read off the Performance screen 2026-09-08 (#414), app-report-20260908-performance-screen.txt: a npm run dev build on a checkout containing #390, the drive's own probe reading 8273 / 7504 live, Empfohlen für den nächsten Start: Qwen3.5 9B (UD-Q4_K_XL) (Grafikspeicher), profile PRO, 30 tok/s over the check's 64 tokens. The row previously cited the computed pick (committed-catalog.test.ts, the 1070 Ti case); the app's own chain now agrees with it. #390's 8 GB behaviour CONFIRMED
3 RTX 3080 Ti 12 GB (12,084 / 11,316) Gemma 12B 49/49, 2,086 MiB to spare; identical with 1–2.7 GB of desktop use 27.7 9B ✔
4 RTX 3060 Laptop 6 GB (5,994 / 5,226 — 150 below the gate) E2B (the RAM pick) · 9B (question f) E2B 36/36 on the card anyway · 9B 18/33 86.4 · 5.2 E2B (Arbeitsspeicher) ✔ — after #321 lowered the gate to 5,120 this machine's star becomes the 4B on the Grafikspeicher basis; the measured record above is what the app did on the day
5 same laptop: AMD Radeon(TM) Graphics listed FIRST, RTX 3060 second, no --device E2B, 9B every GPU buffer on the RTX; the fit's device list never contained the iGPU (its "device 0" was Vulkan1) — —
7 RTX 3090 24 GB (24,822 / 23,575) Q4 · Q5 Q4 66/66 (4,704 MiB free at peak) · Q5 62/66 under rung 1a (MTP on, -np auto) 53.8 · 30.4 Q4 ✔; the RAM pick Q5 demoted exactly as rule C says — but see the #319 amendment: with -np 1 this card stars Q5, which it then offloads 66/66
1 the rig, Q5, one thing varied per start ubatch 2048→512 · --fit-target 1024→512 · -np auto→1 · MTP on→off 65/66 · 64/66 · 66/66 · 66/66 38.9 · 34.7 · 51.0 · 30.7 —
7 moe the rig, 2026-09-08 under #391, the last open item: the MoE's first hardware start ever (the weight had to be fetched onto the machine) gemma4-26b-a4b-it-qat-q4 at 8192, rung 1 (no speculative_decoding, so no MTP) 31/31 — projected to use 14943 MiB vs. 23766 free, "will leave 8822 >= 1024 MiB, no changes needed"; CPU_Mapped 577.50, the deliverable; KV an iswa pair at one sequence, 160.00 (8192 cells, 5 layers) + 600.00 (3072 cells, 25 layers) = 760.00 against the 1,536 the derived cache term claimed — the measurement the term now carries (#412); compute 428.07 + 88.08 host 68.4 tok/s (same-day: memory clock parked at 5001 MHz, see the leg 7 note above) n/a, app closed; rank 2, never the automatic pick while a rank-3 model fits
4 fu same laptop, re-run 2026-09-08 under #391 with -np 1 now in CHAT_SERVER_ARGS 4B at its own ctx 4096 · 9B at 8192 4B 33/33, CPU_Mapped 497.31 · 9B 20/33 (was 18/33: one slot returns 150.75 MiB of recurrent state) 59.4 · 4.2 (both on AC; on battery the same 4B start reads 4.2) E2B (Grafikspeicher) ✔ unchanged, tile 5,9 GB VRAM, profile BALANCED — but only after a re-measure: the profile is a field of the stored benchmark record and the machine's was pre-#387

Two integrated-only laptops (Iris Xe 8,098 MiB, UHD 620 8,119 MiB) had no leg; both confirmed on hardware that looksIntegrated keeps a large integrated device out of the budget slot (class cpu, RAM basis) even with the GPU switched on. Findings every session reproduced — the rule and the thresholds above are unchanged; these bound how far they can be trusted:

  1. The fit reasons from its OWN free reading, taken after the Vulkan context is up, not from the probe's: 606 MiB lower on the 1070 Ti (6,898 vs 7,504), 1,820 lower on the 3090 (21,755 vs 23,575), 204 lower on the RTX 3060 Laptop (5,022 vs 5,226). The estimate's working share + 1 GiB margin absorbed that gap on every card measured; the 8 GB verdict would flip only on a fit reading ≥ 7,031 MiB. 2026-09-08 (#391): the reading moves with the slot count. Under -np 1 every card read higher than at four slots — 3080 Ti 11,111 → 11,262, RTX 3060 Laptop 5,022 → 5,173, 1070 Ti 6,898 → 7,350 — and the gap to the probe's figure tracks the recurrent-state buffer: ≈ 1× RS on the first two (205 → 54 MiB against RS 201.00 → 50.25), ≈ 3× RS on the 1070 Ti (606 → 154), the card whose BAR heap that buffer lands in. Six data points, a pattern rather than an explanation. The 1070 Ti's 2026-09-07 reading was not noise: byte-identical with and without ~1 GB of desktop use then, and the 2026-09-08 pair byte-identical with and without the heap sampler.
  2. The probe's VK_EXT_memory_budget "free" figure does not track other processes' pre-spawn use on NVIDIA (7,504 at both 883 and 1,318 MiB of nvidia-smi use on the 1070 Ti; 11,316 at 2.6 and 5.4 GB on the 3080 Ti) and is static or nearly so while a model runs (unchanged on the laptop, −673 MiB on the 1070 Ti). GRAPHICS_IDLE_ALLOWANCE_MIB and the protocol's desktop-use distinction are moot on this backend, and a re-probe to fit a SECOND model beside a running one reads a stale number.
  3. The estimate is conservative everywhere (the two structural causes named here were CORRECTED on 2026-09-07 — the cache terms by #319, the working share by #321; the figures below are what the estimate said on the day of the measurement): 33 % on the 9B (8,014 vs 6,007 projected), ≈ 1.9 GiB on Gemma 12B, 1,570 MiB on Q4, and 2.4× on the E2B (4,746 vs 1,997 — the 15 % working share is applied to the whole 3,147 MiB file although 2,152 MiB of it stays host-mapped). The estimated_context_cache_gib terms are close (9B 0.4 GiB vs 440–457 MiB measured); Q5's 1.1 GiB under-counts the 1,795 MiB its 4-slot recurrent state takes WITH MTP (the draft head triples the state: rs_seq 2), which is why the Q5 estimate reads "partial, ~263 MiB spill" against ≈ 1,173 MiB measured on the host.
  4. The Q4-versus-Q5 boundary at 24 GB is a property of the rung-1a launch, not of the weights (leg 1): MTP costs the 552 MiB draft context plus 1,197 MiB of extra recurrent state at four slots — the 859 MiB shortfall the baseline could not meet. -np 1 (51.0 tok/s) or MTP off (30.7) fully offloads Q5; under the app's launch MTP buys nothing on this card (30.4 at 62/66). Since a refused or latched-off rung 1a lands on rung 1, the app can run Q5 fully offloaded while its "Your model" row calls it partial. → #319 (-np), §5 item 22 (f) — DECIDED 2026-09-07: the chat server takes -np 1; see the #319 amendment above. This finding is the measurement that decision was waiting for, and it is also why the two 27B cache terms are recomputed on the MTP recurrent state rather than the smaller no-MTP one.
  5. The 214 / 246 MiB BAR heap on cards without resizable BAR is used (the recurrent-state buffer at load, staging during a request, ≤ 9 MiB of budget left at peak) — question (e).
  6. The parser read every real partial-offload log's LAYER SPLIT correctly — in the committed captures 31/33, 18/33, 62/66 and Gemma 36/49 on the 12 GB card (leg3-diag-fit-target-4096). (The 8 GB card's "32 von 49" Gemma start of #318 was read off the Performance screen, not a load log; its logs in the repo are all the 9B, so no committed capture carries a 32/49 split.) But the split is not the whole placement. Amended 2026-09-08 while promoting four of these captures to fixtures (#329): the parser had never counted the RS buffer size line at all — the per-sequence recurrent state of the hybrid models, 29–1,795 MiB of card memory in 26 of the 32 logs — and it summed an MTP start's draft-context compute buffer a THIRD time, because llama.cpp reprints the buffer's unchanged size when the speculative implementation re-reserves that context (1,665.34 MiB parsed where 1,145.28 was allocated). Both are fixed; with them the parsed total lands within +28.6…+36.6 MiB of the heap-measured VRAM on all seven measured runs, where before it missed by up to 1,658 MiB. One summary-field defect from the same reading stays open: ModelPlacement.gpuFreeAtStartMb names the iGPU on a machine with no budget device (#332).
  7. A leg's own preparation can contaminate the report's drive row (added 2026-09-08, #414). The 1070 Ti report reads Laufwerk: 1.008,4 MB/s lesen on a drive whose media rate is 407.9 MB/s — the machine's Intel USB 3.0 xHCI (Gen 1, ~500 MB/s ceiling) cannot deliver 1,008 at all. Cause: a pre-flight Get-FileHash on the 9B, run to check the drive's require_sha256_match policy, left all 5.97 GB in the page cache and the app's read sample hit it warm (the same file re-read measures 6,748.7 MB/s, i.e. RAM). This is the #392 class that PR #406 fixed for weights hashed inside the app — a guard that cannot see an EXTERNAL hasher. Hash a weight the leg will not sample, or drop the cache (a replug dismounts the volume) before the check. Harmless to every verdict in this section: read speed is an input to neither liveChatRecommendation nor classifyProfile.
  8. A "full" offload can still run partly from host memory on NVIDIA/Windows (added 2026-10-07 from the #318 leg-3 evidence, #473). Every Gemma 12B start of the 2026-09-07 session on the RTX 3080 Ti (b9849, NVIDIA 610.88) logged offloaded 49/49 layers, yet the DXGI GPU Adapter Memory counters show ≈ 3.1 GiB of it in shared (system) memory from the moment it loaded, with 3.3 GB of dedicated memory still unused, and its decode fell 27.7 → 10.0 / 5.0 / 4.6 / 2.5 tok/s across the session. The 9B on the same card spilled ≈ 0.1 GiB. Neither the load log nor the probe's free figure (finding 2) can see this; only decode speed or the shared-usage counter can. One lever was measured: --fit-target 4096 made the fit offload 36/49 layers on purpose, and that start decoded at 13.8 tok/s against the spilled start's 10.0 (leg3-diag-fit-target-4096). The app passes no --fit-target; whether it should is an open ruling on #473. Evidence: eval/results/hardware/i9-14900k-rtx-3080-ti-12gb-64gb/leg3-baseline-repeat-sampled.comment.md.

2026-09-11 addition (the integrated class measured: the UHD 620 laptop, no leg; PR #454). The two integrated-only laptops above confirmed the naming rule but had never STARTED a model, so the class had no speed figure of its own. The UHD 620 machine now has one. gemma4-e2b-it-qat-q4 — the model the picker recommends there, and one never started on that machine before — measured 5.600 tok/s decode on the app's own argv (prefill 19.1) and 6.826 under --device none (22.4), against qwen3.5-9b-ud-q4kxl at 1.723 and 2.488; ctx 8192, --threads 4, 512 tokens behind a ~2,000-token prefill, every start repeated.

  • Auto-offload is SLOWER on both models and both axes — decode −18.0 % (E2B) and −30.7 % (9B), prefill −14.8 % and −12.4 % — and on shared memory it costs host RAM instead of saving it: the 9B's auto start peaked 2,056.8 MiB above its processor start, leaving 41 MiB free, and loaded in 28.77 s against 9.86. This CORRECTS BUILD_STATE §5 item 21 (e), which recorded prefill parity (56 vs 57 t/s) and a 45 % decode loss for this machine: the direction of the decode loss holds, the parity claim does not, and neither magnitude nor the absolutes reproduce.
  • llama.cpp uses the UHD 620 unasked — 36/36 and 33/33 layers, Vulkan0 model buffers of 1,341.77 and 5,133.63 MiB — so the never---device rule of item 22 (j) shows on the integrated class what finding 1 shows on hybrids: the naming rule governs the ★ and the tile basis, never placement. VK_EXT_memory_budget on this Intel driver reports heap usage = 0 throughout, including while Vulkan0 held 5.1 GiB of weights, so the heap counter cannot detect iGPU allocation here — only the buffer lines can.
  • The first Vulkan start of each model pays a one-off shader compile (E2B auto 4.465 cold vs 5.600 warm, byte-identical placement), so the figures above are the warm runs and the cold ones are committed as *-run1.

Qualifier carried from the session: AC throughout, but the Windows power mode was "Best power efficiency", left as the operator had it — every absolute above is a floor, and all six starts shared the setting, so the comparisons between them are unaffected. Evidence: eval/results/hardware/i7-8550u-uhd-620-shared-8gb-laptop-16gb/02-e2b.comment.md and the per-start JSON, redacted -lv 4 logs and RSS samples beside it.

Hardware confirmation (issue #391, 2026-09-08): the 24 GB row re-measured under the app's own post-#386 launch, and it holds. Leg 7's confirming start was run on the same rig from the APP (not the harness), on a build carrying #386 + #387 + #390, so the rung is production's own choice; evidence under eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/ as leg7-app-q5km.*, leg7-app-q5km-ctx8192.* and leg7-harness-control-q5km.*.

what #318 (2026-09-07, four slots) #391 (2026-09-08, the app, -np 1)
app ★ (Performance Copy report) Qwen3.8 27B UD-Q4_K_M (graphics memory) Qwen3.8 27B UD-Q5_K_M (graphics memory)
Q5 at ctx 8192, rung 1a 62/66, 1,173 MiB on the host 66/66, will leave 3591 >= 1576 MiB, no changes needed
Q5 at ctx 32768, rung 1a not started 66/66, will leave 1834 >= 1672 MiB
recurrent state 1,795.50 MiB (4 cells, 4 seqs, 2 rs_seq) 448.88 MiB (1 cells, 64 layers, 1 seqs 2 rs_seq)

Both halves of #319's prediction for this card are therefore confirmed on hardware: the star flips to Q5, and the app's own launch offloads it whole, with room to spare even at four times the context the leg assumed. CPU_Mapped model buffer size read 682.03 MiB on both full-offload starts, which is exactly the host_mapped_weights_mib already in the Q5 manifest.

One acceptance figure did NOT reproduce, and it is not a placement effect: decode came out at 37.4 tok/s from the app and 38.0 tok/s from the #318 harness re-run unchanged beside it, against the 51.0 that same harness produced on 2026-09-07 with the same argv, the same 2,015-token prompt and the same MTP acceptance (308/405 both days). Prefill fell in step (643 to 665 against 903). nvidia-smi sampled through a repeat (leg7-clock-state-2026-09-08.csv) has the card's memory clock at 5001 MHz in eight of ten in-load samples where its P0 figure is 9501, with no throttle reason active and 244 W drawn of a 350 W limit. Decode on a 27B is memory-bandwidth-bound, so the rig's clock state, not the app, is what the day's tok/s figures measure. Treat 37.4 / 38.0 as a same-day pair and keep 51.0 as the P0 figure until the rig is re-measured at P0.

Still predicted: the 20 GB row (leg 6 — no 20 GB card is available to the project). By interpolation from the rig, Q4 needs ≈ 19,460 MiB of the fit's own reading (17,885 projected + the 1,576 rung-1a target) while a 20 GB card's reading lands around 18,700–19,900 (≈ 20,470 probe minus finding 1's 600–1,800), so Q4 is expected to land partial and the 9B star stands. The Gemma 10–11 GiB estimate band (question b) is likewise unmeasured; it is never the star (a lower-threshold, equal-or-higher-rank model always wins first). The MoE band (question c) is no longer predicted: measured 2026-09-08 under #391 on the RTX 3090, 31/31 layers with the fit projecting 14,943 MiB, so the estimate's 17–18 GiB band was high by ~3 GiB and now reads 16,972 (17,689 until the same start's cache measurement was taken up by #412). It is still never the star, for the rank reason above, and no grid row moved. Leg 5 on an Intel-first hybrid was not available either; the AMD result — llama.cpp dropped the integrated device by TYPE before the filling pass — is expected to carry over, and looksIntegrated's completeness (#320) is a name-table question, checked against the Intel names above.

2026-09-08 amendment (§5 item 22 (e)): host-mapped weights leave the estimate's BASE, and the GGUF-header plan is retired. #321 subtracted them from the 15 % working share; this subtracts them from the weights term as well, which is where the error actually was — on the E2B the share fix closed 323 MiB of a 2,748 MiB gap while 2,152.50 MiB of host-resident weights were still charged as VRAM. Rule 3 above carries the formula, the before/after table against the five measured starts, and the reason a GGUF-header parser cannot replace the manifest field (the picker judges models the user has NOT downloaded — exactly one of the 29 chat manifests ships on a prepared drive). Two grid rows move; the 8 GB row does not, though a real 8 GB card now stars the 9B — the grid note carries the leg-2 arithmetic that makes that expected rather than reckless, and what is still unmeasured. Rejected in the same pass: replacing the 15 % share with a flat compute term, which the measurements support (316–664 MiB per llama_context across the six models in the 33 captured logs, 2.9 to 19.8 GB on disk — corrected 2026-09-08, #329) but which flips the 8 GB row against leg 2's measured partial offload.

2026-09-07 amendment (#321, owner decision): the usable-card gate is 5,120 MiB, and the working share is computed on the offloadable weights. Two changes in one decision, because the second is what makes the first safe to show. USABLE_VRAM_MB (= GPU_BUMP_MIN_VRAM_MB) goes 6,144 → 5,120 so the common 6 GB laptop card reaches the card path — the full reasoning and the measured evidence are in the N8 paragraph above, which this decision rewrote. estimateGraphicsNeedMib subtracts a manifest's measured host_mapped_weights_mib before applying its 15 % working share — rule 3 above. The second matters because the first makes it visible: the share was 2.4× too generous on the E2B, which is exactly the model a 6 GB laptop lands on, so "Your model" would have called it far tighter than it is the moment those laptops started reaching the card path.

Consequences, all pinned: the boundary tests flip to 5,119 out / 5,120 in and the three real cards in (gpu-rules.test.ts); the RTX 4050 Laptop now reaches the card path and stars the 4B, while a 4 GB GTX 1650 takes its place as the sub-gate case (picker-seams.test.ts); the hybrid [iGPU, RTX 3060 Laptop] probe now describes the CARD on every consumer, in either driver order (performance-gpu.test.ts); the tile reads "Usable" at 5,994 MiB and its "Under {min} GB" copy follows the constant to "Under 5 GB" on its own (PerformanceScreen.test.tsx). Five thresholds fell — the E2B by 323 MiB, the largest single correction in this section's history — and the 30-point grid did not move: see the grid note above for the three near misses, including the 7 MiB by which Q5 still fails the nominal 24 GB row. Still open: deriving the host-mapped split from the GGUF header instead of a measured per-model field, which would cover the models never started on hardware (qwen3.5-4b-ud-q4kxl, gemma4-26b-a4b-it-qat-q4) — BUILD_STATE §5 item 22 (e).

2026-09-07 amendment (#319, owner decision): the chat server runs ONE slot. CHAT_SERVER_ARGS passes -np 1; b9849's default of four unified slots is gone. Chat only — the embedder, the reranker, translation (TRANSLATION_SLOT_ARGS) and vision (VISION_SLOT_ARGS) keep their own args, the latter two already pinning one slot in the long form --parallel 1 for their own reasons. Why: the app is single-user by design and already serialises every lane that reaches this server — the model-slot arbiter hands the one slot between chat and yielding builds, and the local API admits one external request with a queue depth of one, answering 429 beyond that. The four slots were never used in parallel, yet they cost 0.4–1.3 GiB of card memory exactly where the fit decides between full and half speed: leg 1 turned the 27B Q5's 62/66 layers at 30.4 tok/s into 66/66 at 51.0, and on the 8 GB card the four slots cost the 9B 440 MiB where the fit missed a full offload by 133. Accepted cost (owner): with one slot a background job — categorisation, ZIM query expansion, a doc task — evicts the chat conversation's KV prefix; llama-server's host-RAM prompt cache restores it on a prefix match, so the cost is a restore, not a full re-prefill, and no in-app path depends on parallel slots. The restore half of that cost MEASURED FALSE on 2026-09-08 (#391 leg 7, evidence leg7-app-q5km-evicted-prefix.*); the decision stands, the cost is larger than stated. Consecutive turns in one conversation do reuse the prefix in the slot (22 tokens re-prefilled on turn 2 of 190 cached). But once another task takes the one slot, the server saves the conversation to the host cache and then refuses to load it back. Measured: a 435-token conversation, evicted by one turn in another conversation, re-prefilled 305 of 452 tokens on return; only the 147-token system prefix survived, because it is common to every conversation and stays in the slot.

2026-09-09 correction (#399): the affected set is 11 of 14 chat models, not "both 27B quants". The first version of this paragraph named only the two 27B quants as hybrid/recurrent. That reading was far too narrow. A fourteen-model architecture sweep on i9-9900x-rtx-3090-24gb-128gb — raw llama-server, the app's argv shape at --ctx-size 8192 -np 1, no MTP, every model fully offloaded, three requests per start (long conversation A → a short unrelated B takes the slot → back to A) — settles which architectures lose the restore. Evidence: PR #445, eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/issue399-arch-sweep-*.

RE-PREFILLED — 11 models, two architectures. The whole modern Qwen line by recurrent state: qwen3.5-2b/-4b/-9b-ud-q4kxl, qwen3.5-35b-a3b-ud-q4kxl, and all three qwen3.8-27b quants (-q4, -ud-q4km, -ud-q5km) — 1,488–1,492 of ~1,530–1,571 tokens re-processed on return, with only the 41–79-token shared system prefix surviving. And all four Gemma 4 manifests by sliding window (n_swa 512 or 1024): gemma4-e2b, gemma4-e4b, gemma4-12b, gemma4-26b-a4b — 1,471 of 1,514, 43 kept. That includes both 8–12 GB tier picks, the catalog-default 4B and the DIY 9B — i.e. exactly the machines where re-prefilling a whole history is least affordable. The 27B Q5 control reproduces leg 7 token for token.

RESTORED — the three positive controls. qwen3-8b-instruct-q4 (arch qwen3), qwen3-30b-a3b-q4 (qwen3moe) and ministral3-8b-instruct-2512-q4 (mistral3) — no sliding window, no recurrent state — each re-prefilled only 14–21 tokens of a ~1,470-token return prompt. So the restore mechanism works, the method detects it, and this is a measured architecture split, not an anecdote: recurrent state OR a sliding window closes the restore path; nothing else does. Among ranked models ministral3-8b is the only one that keeps it.

Which path actually pays the length-proportional cost — the plain CHAT path only (leg B). A documents ask keeps only its ~227-token system prefix on every turn, with or without a helper call: the retrieved-excerpt block changes between turns, so the prompt diverges immediately after the system prompt and the history was never being reused there in the first place (control, 2,371-token prompt, 2,144 prefilled, 227 kept, nothing touching the slot). RT-2's hoisting keeps the grounding rules inside that 227-token prefix, and that prefix is the whole of what in-slot reuse can save on that path — so an eviction's marginal cost on a documents ask is bounded by it, not by conversation length. classifySkillPointer also turns out to run only on the two trigger classes services/analysis/classify.ts:65 pins, not "whenever there are skill candidates": an ordinary high-confidence documents ask made zero classifier calls in four attempts, and on a turn that does trigger it the cost is 400 extra prefilled tokens (1.4 s). The length-proportional cost is real but belongs to an ordinary chat conversation, where the prompt is append-only and in-slot reuse works (171 → 22 → 22). Neither helper runs on that path, and assertChatStreamReady (ipc/chat-stream.ts:65-77) makes every non-yielding lane refuse chat rather than take the slot — so the one thing that can evict a live chat is the yielding deep-index build. That is what narrowed the fix to D3(a).

No slot arrangement fixes this (leg C). -np 2 on the 27B Q5 fits (66/66, 2,676 MiB headroom left, so MTP_VRAM_HEADROOM_MB does not bite) but halves every conversation's window to 4,096 (--ctx-size is the total cache) — and R3 is identical token for token, 1,492 of 1,571. The slot picker prefers prefix similarity (0.804, threshold 0.100 — the shared BASE_SYSTEM_PROMPT guarantees it) over an idle empty slot, and when A did land in the never-used slot the host-cache restore failed there too. On a recurrent/SWA model the state cannot be reconstructed from a saved prompt at all. The only lever is not evicting, and the saved copy is pure waste: 14.86–343.59 MiB written per eviction and never read.

Fixed 2026-09-09 (#399, owner decisions D3(a) + D5). The arbiter no longer resumes a parked deep-index build the instant chat releases the slot — it waits RESUME_AFTER_CHAT_DELAY_MS (90 s, services/analysis/model-slot-arbiter.ts), so a conversation's own typing/reading gaps stop handing the slot away turn after turn; a MAX_PARK_DEFERRAL_MS (10 min) cap on a single park guarantees the build still runs. And CHAT_SERVER_ARGS gains --cache-ram 0 for the affected families only (shared/prompt-cache-rules.ts, gated on the manifest's family: — qwen3.5, qwen3.8, gemma4), so the unreadable copy is no longer written; every other family, including an unmeasured one, keeps today's behaviour, because disabling the cache on an unaffected model would cost real restores while leaving it on merely continues the waste. Residual: a pause longer than the delay still lets the build resume and evict, so returning from a break costs ONE slow reply — once, not per turn. Both sides of the D5 gate were checked on hardware before it shipped — on i7-8700-gtx-1070-ti-8gb-32gb the app spawned qwen3.5-9b-ud-q4kxl WITH --cache-ram 0 and qwen3-14b-instruct-q4 without it (read from the OS process list, not from our own code), and the affected model still started fully offloaded, its 50.25 MiB recurrent state matching the sweep's 9B row exactly: eval/results/hardware/i7-8700-gtx-1070-ti-8gb-32gb/399-cache-ram-gate-smoke.md.

A methodological warning for anyone reproducing this. Do not grep for forcing full prompt re-processing due to lack of cache data (likely due to SWA or hybrid/recurrent memory, see llama.cpp PR #13194). That line appears only on MTP starts — it did not appear once in the whole fourteen-model sweep, not on the 27B Q5 control, not on any Gemma. Without MTP the server logs a confident load: - found better prompt with f_keep = 0.990, sim = 0.983 and then silently re-prefills the whole prompt anyway. Grepping for forcing full gives the opposite answer; the TOKEN COUNT (prompt eval time = … / N tokens against cached n_tokens) is the only honest read. Measured 2026-09-18 (#447): the ZIM query expander DOES evict the prefix, on every pack-scoped turn — not the harmless case leg B's proxy predicted. In-app, leg B's tee-wrapper method, skills off, --cache-ram 0 confirmed in the OS argv: 16 of 16 pack-scoped turns across qwen3.8-27b-ud-q5km (MTP) and qwen3.5-9b-ud-q4kxl (non-MTP) ran exactly one extra task and the answer task then kept 0 tokens, against 227 on 8 of 8 control turns. The plan prompt shares 3 tokens with the answer prompt, so each erases the other's context checkpoint — a two-way thrash of the one slot. Cost per pack-scoped turn: 369–373 extra prefilled tokens (the 142–146-token plan call + the 227-token prefix), ≈ 1.2 s of prefill on the 27B — inside the classifier proxy (~400 tokens, ~1.4 s, itself a prefill figure) and bounded by the prefix, not by conversation length. But the plan call also decodes 53–71 tokens where the classifier decodes 7, so the whole call is ≈ 2.6–3.2 s per turn on the 27B (≈ 1.6–1.8 s on the 9B), paid on every pack-scoped turn. That decode was already accepted in D-Z20 (#423) and only the bounded cache part is new, so the owner ruled 2026-09-18 that D-Z20's "always" stands. The same run logged forcing full on the non-MTP 9B start — on every task that lost its checkpoint, under --cache-ram 0 — so "only on MTP starts" describes the sweep above, not the line; the token count stays the read. Evidence: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/issue447-zim-expander.comment.md. The three chat entries this paragraph used to list are measured, see the 2026-09-10 addition below. If llama.cpp PR #13194 lands recurrent-state restore upstream, both the delay and the D5 switch become removable. Follow-up: #399 (closed by this work). What it does NOT change: the context window. --ctx-size is the TOTAL cache size on both settings and every slot sees all of it (n_ctx_slot = 8192 either way; kv_unified goes true → false, n_seq_max 4 → 1). That is the whole reason only four of the seven cache terms moved — see point 4 above for the rule and the recomputation, and the thresholds table for what it did to the numbers. MTP_VRAM_HEADROOM_MB stays at 3,584: it was measured at four slots and is now conservative, which is the safe direction (the guard refuses a rung it could have run, never the reverse), and the verdicts it was calibrated to reproduce — Q4/Q5 clear a 24 GB card, Q6_K does not — are unchanged. Evidence: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/leg1-np-1.* against leg7-baseline-q5km.*; finding 4 below is the measurement this decision was waiting for.

2026-09-10 addition (#446): the three entries the sweep could not start, measured — qwen3.6 loses the restore, granite keeps it. The #399 sweep left three catalog entries untested for reasons of logistics, not judgement: qwen3.6-27b-q4 and -q5 were broken symlinks into the eval drive deleted 2026-09-04, and granite-4.1-8b-q4 was not on the rig. Under the conservative D5 default all three were treated as unaffected, which was safe but left the record ambiguous — the standing risk being that "never tested" quietly reads as "measured and fine". All three weights were fetched, verified against the manifest's sha256 and size_bytes, and run through the unchanged leg-A driver on the same machine and the same pinned binary, no MTP. Evidence: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/issue446-arch-sweep-*.

model arch n_swa recurrent state layers R3 prefilled kept verdict
qwen3.6-27b-q4 qwen35 0 149.62 MiB (64 layers) 65/65 1488 of 1529 41 RE-PREFILLED
qwen3.6-27b-q5 qwen35 0 149.62 MiB (64 layers) 65/65 1488 of 1529 41 RE-PREFILLED
granite-4.1-8b-q4 granite 0 none 41/41 22 of 1414 1392 RESTORED
qwen3.8-27b-ud-q5km (control) qwen35 0 149.62 MiB (64 layers) 66/66 1492 of 1571 79 RE-PREFILLED

The control reproduced the sweep token for token (1,492 of 1,571, 79 kept), so the rows above belong in the same table as the fourteen. qwen3.6 is affected because it reports arch qwen35 with a 149.62 MiB recurrent state — the expectation from its lineage happened to be right, but the architecture line is what decided it, and both quants are identical in every column. --cache-ram 0 therefore extends to the qwen3.6 family (shared/prompt-cache-rules.ts), making the affected set 13 of 17 measured models. granite restored — no sliding window, no recurrent state, 22 of 1,414 tokens re-prefilled, and the 217.517 MiB it saved on the hand-back was actually read back. It becomes the fourth positive control beside qwen3, qwen3moe and mistral3, and it is the concrete case for keeping the cache-ON default: the family nobody had an opinion about is the one that would have lost real restores. Every family: in the catalog now has a verdict; the default still governs the family added next. The forcing full trap held a fourth time — that line appears 0 times in all four captures, including the two qwen3.6 runs, which instead logged a confident found better prompt with f_keep = 0.989, sim = 0.985 before re-prefilling 1,488 tokens.

#512 amendment (2026-09-27): on the b11146 pin the restore WORKS for qwen3.5 and gemma4 — the family gate is gone. The #399 protocol (conversation A, an unrelated B takes the one slot, A extended with its reply and a new question) was re-run on the i9-14900K / RTX 3080 Ti with the app's chat argv and the default --cache-ram, b9849 alongside as the control:

model b9849: re-prefilled on return b11146
qwen3.5-4b-ud-q4kxl 1,736 48
qwen3.5-9b-ud-q4kxl 1,736 48
gemma4-e2b-it-qat-q4 1,654 48
gemma4-12b-it-qat-q4 1,658 48
qwen3-8b-instruct-q4 (control) 48 48

On b11146 the restored answer (120 tokens, temperature 0) is byte-identical to a cache_prompt: false recompute on the same server, with the facts correct. qwen3.6 and qwen3.8 were not on that machine; they share qwen3.5's architecture (arch qwen35), and the owner ruled the cache ON for all four #399 families (decision 1); the RTX 3090 rig confirmed both on 2026-09-27 ("Rig legs" below). What shipped: PROMPT_CACHE_RESTORE_BROKEN_FAMILIES is removed; a manifest states disable_prompt_cache: true if the manual smoke tests/manual/prompt-cache-smoke.test.ts shows its GGUF re-prefilling on the pin (none does); and every chat start gets --cache-ram min(8192, total RAM MiB / 8) (decision 2 — 8 GB → 1 GiB, 16 GB → 2 GiB, 32 GB → 4 GiB, 64 GB+ → 8 GiB; the OS reports a "64 GB" box as 63.7 GiB, so this machine gets 8,151 MiB). The #399 / #446 tables above describe b9849 and stay as its record.

The committed smoke reproduces it through the app's own spawn (createLlamaRuntime, so the argv is the shipped one including --cache-ram 8151), ~1,850-token conversation, 2026-09-27:

run re-prefilled on return restored answer == cache_prompt: false recompute advice
b11146 · qwen3.5-4b-ud-q4kxl 52 of 1,899 — RESTORED yes leave unset
b11146 · qwen3.5-9b-ud-q4kxl 52 of 1,899 — RESTORED yes leave unset
b11146 · gemma4-e2b-it-qat-q4 48 of 1,879 — RESTORED yes leave unset
b11146 · gemma4-12b-it-qat-q4 53 of 1,888 — RESTORED yes leave unset
b11146 · qwen3-8b-instruct-q4 (control family) 52 of 1,855 — RESTORED yes leave unset
b11146 · qwen3.5-4b, spawned as disable_prompt_cache: true 1,899 of 1,899 — RE-PREFILLED (control) —
b9849 · qwen3.5-4b-ud-q4kxl 1,878 of 1,899 — RE-PREFILLED (control) set true

The controls show the field really turns the cache off, and this old pin losing the restore for qwen3.5-4b. Correction (rig legs, PR #524): in these runs B used a different system message from A, and the same smoke's b9849 control RESTORED qwen3.8 on the rig — so that protocol does not separate the builds for every family. The case #399 lost is B sharing A's system message, which is also the app's case (every chat carries one system prompt), so the smoke now sends B with A's system message (#512 close-out). The corrected smoke has not been re-run on this machine yet — Windows' application-control policy blocked the engine that day. This machine's original #512 table above was made with the #399 harness (shared system message), and the rig's runs below use it too, so the shared-prefix case is measured for all four families. Evidence: eval/results/hardware/i9-14900k-rtx-3080-ti-12gb-64gb/issue512-prompt-cache-smoke.txt.

Decision 2, measured (one session per cap, qwen3-8b-instruct-q4 on b11146, 2026-09-27). Six conversations of 1,100–4,800 tokens hand the one slot back and forth over 18 turns, each turn extending the conversation it returns to. qwen3-8b was chosen for its large per-token state (≈ 140 KiB: a 4,794-token prompt saves 674.2 MiB), so the smaller cap is actually reached.

  • At 8,151 MiB (this machine's rule value) the cache grew to 5 saved prompts / 2,628 MiB by turn 18 and never evicted; every returning conversation restored (only the ~910 new tokens prefilled, even for a 4,766-token prompt).
  • At 2,048 MiB (a 16 GB machine's value) the log reads making room for prompt cache entry, removing oldest entry (size = … MiB) on every save from turn 11, and the cache never exceeded 2,039 MiB — the ceiling holds and eviction works. The cost is visible too: six conversations of ~3,000+ tokens visited in rotation outgrow 2 GiB, so the oldest-first eviction removes each one just before it comes back, and from turn 11 every return re-prefilled in full (cache_n 6). Fewer or shorter conversations fit (turns 3–9 restored at the same cap). How many a cap holds depends on the model: in the smoke above the server reported single-prompt cache states from 2.3 MiB (gemma4-e2b) and ~154 MiB (qwen3.5-4b/-9b) up to 1,636 MiB (gemma4-12b, which also saves context checkpoints) for conversations of under 1,900 tokens — so on a 16 GB machine (2 GiB) the 12B keeps roughly one conversation. Not measured further here; an observation for the owner, not a change.

Evidence: …/issue512-cache-session-8151.txt and …/issue512-cache-session-2048.txt (per-turn prompt / prefilled / reused tokens and the server's cache lines).

The pin bump's grounded-QA gate (§2 harness, 2026-09-27): PASSED. All ten chat GGUFs on the test drive, the same machine and backend (i9-14900K, Vulkan), b9849 on the current master against b11146 with this change's argv. EM, citation-correct and grounded rate are identical on all ten; mean_f1 moves by at most ±0.003; 83–100 of 100 answers per model are byte-identical (near-tie token flips — the kernels changed). Four items flip, all on the abstention column: gemma4-e2b on the unanswerable de-vhs-lehrbuch stops inventing a textbook and abstains (a real improvement); the other three (qwen3.5-4b on the same item, qwen3.5-9b on de-hr-sick, and qwen3-4b's one over-abstention on the answerable de-contract-termination) give the same substance on both builds and flip only because the scorer's abstention phrase list matches one wording and not the other. Evidence: eval/results/i9-14900K-512-b9849-vulkan-* and …-512-b11146-vulkan-*. (Scorer v4, #517, 2026-09-27: text.mjs gained sentence-scoped German "not stated" families — "nennt … nicht", and "nicht … angegeben/genannt/festgelegt/erwähnt/beantwortet" when the sentence names the source material — pinned on these three answers in score.test.ts. On v4 the three score the same on both builds, leaving the gemma4-e2b improvement as the gate's only flip. The committed dumps were re-scored on v4 the same day, after the owner read the delta table and kept the 2026-07-09 hand-audit ruling (the v4 participle form needs a source word in its sentence): every dump now carries a *-quality-rescored.csv; four move in the abstention columns (512-b9849, 512-b11146, pr6-before, pr6-after — 21 items, all German refusals) and the five v3 files reproduce byte-for-byte, so no ratified 2026-07 number moved.)

Rig legs (2026-09-27; i9-9900X / RTX 3090 24 GB / 128 GB, Linux, the ubuntu-vulkan b11146 asset; PR #524): both PASSED. The desktop held 698 MiB of VRAM.

Leg 1 — qwen3.6 / qwen3.8 restore. The #399 harness (issue399-arch-sweep.mjs, B shares A's system message, --cache-ram 8192) on both builds:

model b9849: re-prefilled on return b11146
qwen3.6-27b-q4 1,488 of 1,529 29 of 1,533
qwen3.8-27b-ud-q5km 1,492 of 1,571 29 of 1,571

The smoke agreed on b11146 (then still with a different B system message): qwen3.6-27b-q4 and -q5, qwen3.8-27b-ud-q5km, and the 27B with rung 1a's MTP flags all RESTORED, 31–32 of 1,903 re-prefilled, restored answer == recompute. So all four #399 families restore on b11146, and no manifest sets disable_prompt_cache.

Leg 2 — the 27B starts with MTP. run-start.mjs, qwen3.8-27b-ud-q5km at ctx 8192, -np 1, --spec-type draft-mtp --spec-draft-n-max 2, a 2,015-token prompt and 512 generated tokens, builds alternating: all four runs offload 66/66; draft acceptance 0.754 (b11146) against 0.760 (b9849); decode 46.7 / 45.8 tok/s on b11146 against 46.0 / 45.2 on b9849 (+1.4 %, inside each build's a/b spread); prompt processing about 3 % slower on b11146 (826–829 against 854–856 tok/s); load 8.1–8.2 s on both. Both builds sit about 10 % under #318's 51.0 tok/s with the drafts matching #318 exactly, and the card now runs at a 275 W power limit — card state, not the build.

Evidence: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/issue512-rig-cache-smoke.txt (imported from PR #524, byte-identical). The Leg 2 run logs (leg512-mtp-*) stay in PR #524, which was not merged; the run-start harness there now reads the build from the server log instead of writing a fixed label.

#729 amendment (2026-11-07): the b12110 pin (v0.9.0). Measured on the GTX 1070 Ti box (i7-8700, 32 GB, Windows 11, Vulkan), b11146 against b12110, each the official archive as fetch-runtime installs it. Raw results: eval/results/hardware/i7-8700-gtx-1070-ti-8gb-32gb/issue729-*.txt.

The bug the bump fixes. gemma4-e2b, temperature 1 / seed 42 / top-k 20 / top-p 0.95 / presence 1.5, a German follow-up R that opens with a user turn, after an unrelated X on the same server:

build flags R after X == fresh R R a third time == fresh R
b11146 the issue's (--cache-ram 0 --no-cache-prompt …), card no (token 0 Wenn −0.9346 → −0.8797, text from char 221) no
b12110 the issue's, card yes yes
b11146 the app's argv, cache_prompt: false, card no (the same numbers) no
b12110 the app's argv, cache_prompt: false, card yes yes
both either, --device none yes yes

A fresh server gives the same R on both builds. On this processor the leftover checkpoint (b11146's log: created context checkpoint 2 of 32 where b12110 starts again at 1 of 32) does not move the logits; the #729 analysis saw it move them on the i9-14900K.

The pin bump's grounded-QA gate (§2 harness, 2026-11-07): PASSED on the five catalog chat models this box holds (owner call: the other five on ps-work and the rig's MTP leg gate the next release tag):

model EM citation-correct grounded abstain (unans.) mean_f1 b11146 → b12110 byte-identical answers
gemma4-e2b 0.977 = 0.988 = 0.977 = 0.867 = 0.337 → 0.336 96 / 100
qwen3-4b 0.977 = 0.988 = 0.977 = 0.800 = 0.312 → 0.308 91 / 100
qwen3.5-4b 0.977 = 0.988 = 0.977 = 0.867 = 0.235 → 0.239 80 / 100
qwen3.5-9b 0.977 = 0.988 = 0.977 = 0.867 = 0.281 → 0.280 84 / 100
qwen3-14b (24/41 on the 8 GB card, its own run) 0.977 = 0.988 = 0.977 = 0.867 = 0.336 = 94 / 100

Two items flip, both answerable and neither a loss: qwen3-4b on de-vhs-gebuehr gave the invoice's 940 € as the course fee on b11146 (EM 0) and says the fee is not stated directly on b12110 (EM 0, an over-abstention); qwen3.5-4b on en-coffee-redlight is correct on both and only on b11146 tripped the scorer's abstention phrase list. The retrieved sources differ on 3 of 100 items between the two four-model runs, but not because of the build: the same three differ between two runs of b11146 (the four-model one and the 14B one), while both b12110 runs and the 14B b11146 run agree on all 100. The harness's retrieval varies from run to run on near-ties, whatever the build. In isolation each build's E5 vectors and reranker scores are bit-identical run to run, and the builds differ by ≤ 0.0042 in rerank score with the same order (issue729-probes.txt). The qwen3-4b flip above sits on one of those three items, so it follows the retrieval order, not the engine. Evidence: eval/results/i7-8700-729-b{11146,12110}-vulkan-* and …-729-14b-b{11146,12110}-vulkan-*.

Prompt cache, 30 conversations each (prompt-cache-smoke.test.ts with HILBERTRAUM_PROMPT_CACHE_SMOKE_PROMPTS=30, the app's chat argv, --cache-ram 4088, temperature 0, 120 tokens):

model build restored restored answer == recompute re-prefilled on return (conversation 0)
gemma4-e2b b11146 30 / 30 29 / 30 (conversation 4, from char 28) 48 of 1,879
gemma4-e2b b12110 30 / 30 30 / 30 28 of 1,879
qwen3.5-4b b11146 30 / 30 30 / 30 52 of 1,899
qwen3.5-4b b12110 30 / 30 30 / 30 52 of 1,899

So on this card a restored answer and its recompute agree in 59 of 60 conversations on b11146 and 60 of 60 on b12110; a single matching answer (the smoke's old protocol) was weak evidence, and the rate is now on record per build.

Speed (builds alternated A B A B on the same card state; the app's chat argv; a ~1,850-token prompt, 256 tokens, temperature 0, cache_prompt: false; tok/s from the server's own timings):

model prompt b11146 → b12110 decode b11146 → b12110 load
qwen3-4b 496 / 495 → 499 / 499 57.1 / 57.0 → 56.0 / 56.0 2.9 → 2.6 s
gemma4-e2b 724 / 724 → 1,824 / 1,821 72.3 / 72.4 → 69.7 / 69.1 3.3 → 2.6 s
qwen3.5-9b 255 / 255 → 222 / 260 28.6 / 28.5 → 28.3 / 28.3 5.4–6.8 → 4.9 s

Gemma 4 E2B reads a prompt 2.5× faster (upstream #31356, "massive gains on pp for E2B and E4B"); decode is 1–4 % slower on this Pascal card on all three, repeatably. TranslateGemma on b12110: 10.0–10.6 tok/s at 39/49 on the card, 3.3–3.4 on the processor (translategemma-smoke).

Second-machine leg (2026-11-10): PASSED. The owner's condition for the release tag (call 3 on #785), the runbook's "Leg 3", run on the i9-9900X / RTX 3090 24 GB / 128 GB box (Ubuntu 22.04, NVIDIA 595.99.02, Vulkan) instead of ps-work: the §2 harness on the other five catalog chat models, each fully on the card, b11146 against b12110 from the official archives, models SHA-256-checked against their manifests. Every model started and answered all 100 items on both builds:

model EM citation-correct grounded abstain (unans.) mean_f1 b11146 → b12110 byte-identical answers
gemma4-12b-it-qat-q4 0.977 = 0.988 = 0.977 = 0.933 = 0.340 → 0.337 95 / 100
granite-4.1-8b-q4 0.977 = 0.988 = 0.977 = 0.733 → 0.800 0.216 → 0.211 80 / 100
ministral3-8b-instruct-2512-q4 0.965 = 0.988 = 0.965 = 1.000 = 0.2995 → 0.2999 90 / 100
qwen3-4b-instruct-2507-q4 0.977 = 0.988 = 0.977 = 0.933 = 0.337 → 0.335 92 / 100
qwen3-8b-instruct-q4 0.977 = 0.988 = 0.977 = 0.867 = 0.327 = 97 / 100

One item flips a score, and it is not a loss: granite-4.1-8b on the unanswerable de-vhs-lehrbuch says on both builds, from the same retrieved sources, that the excerpts do not name the textbook; only b12110's wording ("kann … nicht aus den gegebenen Exzerten bestimmt werden") trips the scorer's abstention phrase list. The retrieved sources differ between builds on the same three near-tie items as on the GTX 1070 Ti box (de-hausordnung-sonntag, de-security-rest, de-vhs-gebuehr), and across the ten runs each item's two retrieval variants both occur on both builds, so this is the harness's run-to-run variation again; none of the three flips a score. No template leak, no garbled or empty answer in the 20 dumps. The bring-up smoke passes 4 / 4 on b12110 (and 4 / 4 on b11146 as a control: qwen3-4b-instruct-2507 calls Vienna's river the "Wienfluss" on both builds, the model's weakness, not the engine's). Raw results: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/issue729-gate.txt, evidence eval/results/i9-9900x-729-b{11146,12110}-<model>-vulkan-*.

Rig legs (2026-11-10): Leg 1 PASSED, Leg 2 FAILED on draft acceptance. The runbook's "Leg 1" and "Leg 2" on the same i9-9900X / RTX 3090 box (275 W limit, memory clock at P0 on every run, no other GPU process), b11146 against b12110 from the official archives, both models SHA-256-checked against their manifests.

Leg 1, the prompt-cache smoke on b12110 with 20 conversations per run:

run restored restored answer == recompute re-prefilled
qwen3.6-27b-q4 20 of 20 20 of 20 0
qwen3.8-27b-ud-q5km 20 of 20 20 of 20 0
qwen3.8-27b-ud-q5km with rung 1a's MTP flags 20 of 20 20 of 20 0

Each return re-processes 31–32 of about 1,900 tokens, as on b11146 in #512. Every run advises leaving disable_prompt_cache unset, so no manifest changes.

Leg 2, run-start.mjs with qwen3.8-27b-ud-q5km at ctx 8192, -np 1, --spec-type draft-mtp --spec-draft-n-max 2 --cache-ram 8192, a 2,015-token prompt and 512 generated tokens, builds alternating:

variant build offload draft acceptance pp tok/s decode tok/s load
b12110-a 12110 66/66 297 / 426 = 0.697 775.0 43.40 7.46 s
b11146-a 11146 66/66 307 / 407 = 0.754 795.8 45.32 8.03 s
b12110-b 12110 66/66 297 / 426 = 0.697 783.6 43.11 7.42 s
b11146-b 11146 66/66 307 / 407 = 0.754 784.3 45.20 8.03 s

The start passes: 66/66 with the MTP flags on both b12110 runs. The acceptance does not: b11146 reproduces #512's 0.754 exactly, while b12110 drafts more and accepts fewer, identically on both runs. 512 tokens then take about 215 target steps instead of 205, and decode with MTP is 4.4 % lower (43.25 against 45.26 tok/s), far outside b11146's 0.12 tok/s a/b spread. A control with MTP off (the same four starts, rung 1) separates the engine from the draft:

variant build pp tok/s decode tok/s load
b12110-a 12110 977.1 29.51 7.05 s
b11146-a 11146 921.0 29.39 7.39 s
b12110-b 12110 960.4 28.80 7.00 s
b11146-b 11146 917.6 28.46 7.33 s

Without MTP b12110 decodes as fast as b11146 and reads the prompt about 5 % faster, so the whole loss is the lower acceptance: MTP's decode gain falls from 1.56× to 1.48×. Answers are unaffected (the target model verifies every draft). This is the symptom the runbook watched for after v0.9.0 changed how MTP's hidden state is saved and restored in checkpoints (upstream #30141); the cause is not established. Owner call 2026-11-11: ship v0.1.65 on b12110 with this cost recorded (CHANGELOG, known-limitations.md "Speculative decoding"), re-measure at the next pin bump (#800), and report it upstream. The upstream check due on that date found v0.9.0 still the latest stable release, no report of this drop, and no reported b12110 regression on a path the app uses. Raw results: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/issue729-rig-legs.txt, issue729-rig-cache-smoke.txt and leg729-{mtp,nomtp}-* in the same folder.

2026-09-07 amendment (#320, owner decision). Both halves of the hybrid-laptop question are now closed. (j) The app keeps its never---device rule: the premise it rested on — llama.cpp's fit spreads layers over every listed device — did not hold on the pinned b9849 build on either hybrid machine measured (desktop: both devices in device_info, then using device Vulkan0 alone; APU-first laptop: iGPU listed first, every buffer on the RTX, the fit's own "device 0" was Vulkan1), so an app-side --device would change nothing, would break the ladder's contract that --device none is the only device argument, and would add a name→device mapping that has to survive driver renames. Every doc sentence claiming the spread is corrected. (h) looksIntegrated gains one anchored bare-name alternative for the exact trimmed string "Intel(R) Graphics" (no platform code): a false NEGATIVE there would make a 16–32 GiB shared-memory iGPU the budget device and star a model the machine cannot accelerate, the one direction the module's bias note forbids; the anchor keeps a model-numbered discrete Arc ("Intel(R) Arc(TM) A770 Graphics", "B580") out. Pinned in gpu-rules.test.ts. Evidence: eval/results/hardware/i9-14900k-rtx-3080-ti-12gb-64gb/leg5-baseline.*, …/ryzen-7-5800h-rtx-3060-laptop-6gb-14gb/leg5-device-landing.comment.md.

The 6 GB row (N8) — DECIDED 2026-09-07 (#321, owner): the gate comes down to 5,120 MiB.

The finding, as it stood. Every 6 GB laptop card the project has seen reports BELOW the runtime's then-6,144 MiB discrete gate on Vulkan — GTX 1660 SUPER 5,746, RTX 4050 Laptop 5,921, the RTX 3060 Laptop of leg 4 5,994 — while an RTX 2060 reports exactly 6,144. That is not a driver quirk to be corrected: the RTX 3060 Laptop exposes ONE device-local heap of 5,994 MiB and the probe reports exactly it, where the 3090 and the 1070 Ti report the SUM of two heaps (24,576 + 246, 8,059 + 214); nvidia-smi's round 6,144 is the marketing figure. So the "6 GB" row described only the unusual card that reports at or above the gate, and the common 6 GB laptop was a RAM machine on every start (nextStartMemory → cpu).

What leg 4 measured. The gate costs nothing in PLACEMENT — llama.cpp's fit put the RAM pick fully on the sub-gate card (E2B 36/36, 86.4 tok/s, 3,225 MiB to spare) and never consults the gate. What the gate decides is only which model is STARRED, the basis wording, the profile bump and the tile's rating.

Why that is worth changing anyway. On the machine measured (14 GB RAM) the star would not have moved: the RAM pick is the E2B and it fits the card either way. The case that bites is the 16 GB gaming laptop, where the RAM pick is the 9B — and the 9B on this card measured 18/33 layers at 5.2 tok/s, against 20.2 at 31/33 on an 8 GB desktop card. Today's gate therefore sent the most common 6 GB configuration to a model running roughly four times slower than the alternative. With the gate at 5,120 the card path stars the 4B (4,410 MiB when this was decided, 3,838 since #391, against a 5,226 MiB budget), fully offloaded at card speed.

Why 5,120 — RESTATED 2026-09-08 (owner decision, issue #321), and RE-RESTATED 2026-09-10 (#413). The floor is UNCHANGED through both; what moved each time is the reason recorded for it. #321 wrote that keeping 4 GB cards (≈ 4,096) out costs nothing, "where nothing ranked fits 4,410 anyway and rule C's no-fit fallback hands the machine back to the RAM pick regardless". That arithmetic is void: the three estimate fixes of 2026-09-07/08 took the E2B from 4,746 MiB to 2,271 (the threshold table below), so a 4 GB card CAN hold a ranked model — the point already recorded under rule 3 above.

The floor stays on a different and measured basis — the arithmetic note below carries the budget figure it rests on, which is the part 2026-09-10 corrected. At the budget a 4 GB card actually produces, the E2B is the ONLY ranked model that fits, so admitting such cards would star it at EVERY RAM size — verified against the committed catalog at RAM 8 / 16 / 24 / 32 / 64: the 4B, the 9B, the 27B Q4 and the 27B Q5 all collapse to the E2B; only at RAM 12, where the RAM pick is already the E2B, would the star not move. That is the same trade #321 made at 6 GB — but there the trade was backed by a MEASUREMENT (leg 4 and the 16 GB gaming laptop: the 9B at 18/33 layers, 5.2 tok/s, against a fully offloaded 4B at card speed), and here there is none: no 4 GB card has ever been measured in this project. Demoting a 32 GB machine from the 27B Q5 to the smallest model in the catalog on an unmeasured guess is exactly the #318 leg-4 mistake in reverse — leg 4 is what proved a gate assumption wrong once already.

What "the budget a 4 GB card actually produces" is — the arithmetic corrected 2026-09-10 (#413). The 2026-09-08 version of this paragraph put that budget at ~3,900 MiB free, and #413 then reported the argument half-dead on it: #391 measured the 4B's host-mapped weights at 497.31 MiB, moving its need 4,410 → 3,838, which 3,900 clears — so on that figure the 4B, not the E2B, would be the star, and "the smallest ranked model at every RAM size" would hold only for the no-free-figure budget form. Both readings rest on a number that was never a measurement. 3,900 is a fixture value, invented alongside the gate change itself (freeMb: 3900 in picker-seams.test.ts, performance-gpu.test.ts, commit c3247fe5); no 4 GB card has ever been probed. What the probed cards do show is an idle reserve set by the DESKTOP, not by the size of the card:

card Vulkan total best idle free reserve
RTX 3060 Laptop 5,994 5,226 768
GTX 1070 Ti 8,273 7,504 769
RTX 3080 Ti 12,084 11,316 768
RTX 3090 24,822 23,808 1,014

768 MiB across three cards spanning 6 → 12 GB, and it is a FLOOR rather than a typical figure: the worst 1070 Ti reading in the same evidence is 1,686 MiB used, and that box read 1,591 used under an ordinary desktop session on 2026-09-10. Applied to a 4 GB card, graphicsBudgetMib (the probe's free figure, else total − 1,024) is therefore ≈ 4,096 − 768 = 3,328 MiB, not 3,900 — and the 4B at 3,838 does not fit it. For the 4B to fit, a card would have to REPORT ≥ 4,606 MiB, which a 4 GB card does not have. The probe-free form therefore voids this argument only on a 4 GB card with no desktop drawn on it, a machine the project has never seen; on every card it HAS probed, both budget forms — the free figure and the no-free-figure total − 1,024 = 3,072 — still collapse to the E2B alone. The cost of a lowering stays pinned on both forms in committed-catalog.test.ts either way, and that test now asserts the 3,328 form beside them.

Decided 2026-09-11 (owner, #413): the floor STAYS, and without a 4 GB measurement. The project owns no 4 GB card and will not buy one, so the question is closed on the asymmetry between the two ways of being wrong instead of being held open for a leg nobody will run. Keeping the floor is the side that corrects itself. The floor never moves PLACEMENT (leg 4's E2B went 36/36 onto a card the gate of the day refused), so a 4 GB-card machine gets the RAM pick, partially offloaded onto that card anyway, and if that start measures below SLOW_PICK_TOKENS_PER_SECOND the §6.5 step-down (applySpeedSignal on the RAM path, models.ts; pinned by committed-catalog.test.ts "steps each tier down one band on a right-sized crawl") moves the ★ one ranked tier down on that user's own measurement. Lowering the floor has no such correction: the ★ would sit on the E2B at every RAM size, and nothing steps a pick UP when a small model runs fast, so a 32 GB machine would stay on the smallest ranked model for good. The accepted residual: on such a machine a RAM pick that runs at or above the crawl gate stays the ★ even where the E2B, fully offloaded, might be faster.

What would reopen it. A 4 GB card measured on the §6.6 protocol, by anyone who has one: the E2B fully offloaded on that card against the RAM pick partially offloaded, on a 16 GB and a 32 GB machine. If the card wins those, the floor comes down the way it came down for 6 GB. Two things such a card settles before it runs a single benchmark, and both are cheap: what it reports as its TOTAL, and what it reports FREE with a desktop on it. The total is what a lowering would have to be set from, and 4,096 is not it — reported totals do not track nominal capacity, and the four measured cards split in both directions: 3080 Ti 12,084 for a nominal 12,288 and 3060 Laptop 5,994 for 6,144, against 1070 Ti 8,273 for 8,192 and 3090 24,822 for 24,576, the latter two summing a second BAR heap. Picking 4,096 off the nominal figure would repeat exactly the #321 mistake this row exists to record — every 6 GB card reporting under a 6,144 gate is how the 6 GB row got here. (One correction to the framing, carried over from the 2026-09-08 restatement: the E2B is not "the smallest BUNDLED model" — the only chat model with bundled_on_preconfigured_drive: true is qwen3-4b-instruct-q4. The E2B is the smallest-NEED ranked model, which is why it is the one that fits.)

Above the floor the original reason stands: 5,120 admits all three measured 6 GB cards with margin for driver variance.

Blast radius, accepted. The profile bump moves such a laptop one step up (a label, plus the RAM-unknown fallback picker); the tile reads "Usable" for these cards, which matches what the fit does with them; the boundary pins at 5,921 out / 6,144 in flip to 5,119 out / 5,120 in (gpu-rules.test.ts). The tile has named the real card and its memory regardless of the gate since #375, so "my card is invisible" was already fixed and is not part of this. The 6 GB row's CONTENT is unchanged — 4B at RAM 8, E2B at RAM 12, 4B from RAM 16 up — but it is now a row about real hardware rather than about an RTX 2060.

The working-share correction that rides along with this decision is rule 3 above.

Thresholds (estimateGraphicsNeedMib, every RANKED chat manifest, raw MiB; "fits from" = ⌈need⌉; the boundary is asserted on both sides in committed-catalog.test.ts):

model rank need (MiB) fits from (MiB) 4 slots (pre-#319) #319 #321
qwen3.5-4b-ud-q4kxl 3 3,837.4 3,838 4,512 4,410 4,410
gemma4-e2b-it-qat-q4 3 2,270.2 2,271 4,746 4,746 4,423
qwen3.5-9b-ud-q4kxl 3 7,284.3 7,285 8,014 7,912 7,830
gemma4-12b-it-qat-q4 2 10,253.0 10,254 11,159 11,159 11,041
gemma4-26b-a4b-it-qat-q4 2 16,971.9 16,972 18,353 18,353 18,353
qwen3.8-27b-ud-q4km 3 19,257.2 19,258 20,247 20,042 19,940
qwen3.8-27b-ud-q5km 3 22,876.4 22,877 23,866 23,661 23,559

(Three changes moved these, shown apart. -np 1 (#319) recomputed the cache terms for one slot: the 4B and 9B fell 102 MiB, the two 27B quants 205, the three Gemma rows not at all. host_mapped_weights_mib (#321) took the working share off the host-mapped weights: the E2B fell 323 MiB, Gemma 12B 118, the 9B 82, the two 27B quants 102. Item 22 (e) then took those weights out of the BASE as well, which is the largest step of the three wherever a model keeps much of itself on the host: the E2B fell another 2,152 MiB, Gemma 12B 788, the 9B 546, the two 27B quants 682. The 4B and the MoE 26B carried no measured figure at the time and so were untouched by the last two; both were measured on 2026-09-08 under #391 and fell then, the 4B by 572 MiB and the MoE by 664, which is why their three history columns are flat and their "fits from" is not. A fourth change touched the MoE alone: #412 replaced its DERIVED estimated_context_cache_gib with the 760.00 MiB the same start measured — 1.5 → 0.8 GiB, a further 717 MiB, 17,689 → 16,972.)

(Lower-ranked models sharing a tier with a ranked one above — qwen3-4b-instruct-2507-q4, qwen3-4b-instruct-q4, qwen3-8b-instruct-q4, ministral3-8b-instruct-2512-q4, qwen3-14b-instruct-q4, qwen3.6-27b-q4, qwen3.6-27b-q5, qwen3.5-35b-a3b-ud-q4kxl — never win rule C's rank-first fallback against the ranked model at the same tier and are omitted here; their raw needs are pinned alongside these in the same test. Rank-0 models — qwen3.5-2b-ud-q4kxl 2,962 MiB, qwen3.5-0.8b-q6 2,304 MiB — are never reached on the card path since #326.)

Both consumers build the picker's PickerMemory from ONE decision — pickerMemoryFor in registerModelIpc.ts and probeAndPersistGpu in registerBenchmarkIpc.ts, both calling nextStartMemory + graphicsBudgetMib — so the AI Model ★ and the Performance check can never disagree. Legacy callers that pass no memory class are treated as class cpu and get the processor pick of §6.7 (until 2026-11-20: the RAM pick).

Not changed here. The insufficientRam gate and its copy still speak of RAM only.

6.7 Processor path: picks for a computer without a usable graphics card (2026-11-20)

Scope. This section governs the chat recommendation for the memory class cpu only: a computer whose next start runs from RAM on the processor, because it has no usable graphics card (an integrated chip included) or because the GPU is switched off or auto-disabled (nextStartMemory). Apple Silicon (unified) keeps the RAM pick of §6.2 to §6.5, a discrete card keeps rule C of §6.6. Both are unchanged by this section, on purpose: their picks wait for measurements on those machines.

Why a separate path. Until now the processor shared the RAM pick, which ranks by capacity and knows nothing about decode speed. Two measurements showed that this serves processor-only machines badly: the picks for 24 GB and more (dense 27B models) decode near 3 tok/s on a processor, and the picks for 8 to 15 GB were not the best-scoring models that run there at a usable speed.

Decision basis. A pick on this path has to be justified on two axes, in this order:

  1. Answer quality: the suite score of the 2026-11 answer-quality study (29 model variants, seven tasks in German and English, llama.cpp b12110, context 32,768, one run per model, finished 2026-11-15; all results on https://hilbertraum.ai/en/benchmark/). It replaces the "newer generation is expected to be better" prior of §6.4 where the two disagree. Differences under 3 points count as level: there is one run per model and no agreed margin of error yet.
  2. Processor speed: decode tok/s and the wait for the first token on a document-sized prompt, measured through the app on a processor (below). A model under the slow line (SLOW_PICK_TOKENS_PER_SECOND, 5 tok/s) is not a pick, however well it scores.

Memory is a gate, not an axis: every pick must clear its own recommended_min_ram_gb, and its measured peak has to fit the band it is recommended for. The §2 grounded-QA harness is not re-run for this decision; where its earlier verdict and the study disagree (the E4B), the ordinary rank keeps the harness verdict and only the processor rank moves.

Processor measurements (2026-11-20). Lenovo Legion, Ryzen 7 5800H (8 cores), 16 GB installed (13.9 GB usable, the app reads 14), Windows 11, mains power, GPU acceleration off and every start confirmed backend=cpu, dev build of master 5dc4e058 on llama.cpp b12110. Per model: one warm-up and three in-app Diagnostics benchmarks (decode-only, #291), then one Fast-mode answer to a prompt of about 1,400 tokens. Memory is the llama-server peak working set. Raw rows: eval/results/hardware/ryzen-7-5800h-rtx-3060-laptop-6gb-14gb/cpu-speed-2026-11-20.jsonl.

Model Study score tok/s (median of 3) First token, long prompt Peak working set
qwen3.5-0.8b-q6 39.4 37.2 3.7 s 1.25 GiB
gemma4-e2b-it-qat-q4 73.7 19.9 5.0 s 2.83 GiB
qwen3.5-2b-ud-q4kxl 56.7 19.5 7.3 s 2.21 GiB
qwen3-4b-instruct-q4 76.2 12.0 18.7 s 4.94 GiB
qwen3-4b-instruct-2507-q4 82.0 11.8 18.4 s 4.32 GiB
gemma4-e4b-it-qat-q4 82.9 9.9 17.6 s 5.48 GiB
qwen3.5-4b-ud-q4kxl 76.9 8.6 18.7 s 4.74 GiB
qwen3-8b-instruct-q4 77.2 6.4 31.1 s 6.99 GiB
granite-4.1-8b-q4 79.0 5.9 35.2 s 6.53 GiB
ministral3-8b-instruct-2512-q4 64.7 5.9 33.4 s 7.01 GiB
qwen3.5-9b-ud-q4kxl 86.1 5.1 32.4 s 6.06 GiB
gemma4-12b-it-qat-q4 89.5 4.5 75.8 s 8.15 GiB
qwen3.5-9b-q8 85.9 3.4 60.5 s 8.73 GiB
qwen3-14b-instruct-q4 87.4 3.4 58.4 s 9.26 GiB

The models from 20 GB up do not start on this machine. Their processor figures are the §9.3 and §9.4 rows of the i9-9900X: gemma4-26b-a4b-it-qat-q4 15.6 tok/s (a mixture-of-experts model, about 3.8B parameters active per token), the dense qwen3.6-27b-q4 2.8 and qwen3.8-27b-q4 2.83. The two machines are not the same processor, so the 15.6 is evidence of the class (five times a dense 27B on the same machine), not a figure for a laptop.

The picks.

RAM Pick on the processor Study score Was (RAM pick) Why
8 to 11 GB qwen3-4b-instruct-2507-q4 82.0 qwen3.5-4b-ud-q4kxl, 76.9 Ahead on both axes (11.8 against 8.6 tok/s). Cost: no thinking mode, so Deep does nothing on it.
12 to 15 GB gemma4-e4b-it-qat-q4 82.9 gemma4-e2b-it-qat-q4, 73.7 9 points for half the speed, which still leaves 9.9 tok/s. Level with the 2507 on quality, and it keeps a thinking mode.
16 to 23 GB qwen3.5-9b-ud-q4kxl 86.1 the same Every other 8B-class model runs at the same speed and scores lower. It sits at the slow line, which is what the chain below is for. Gemma 4 12B scores higher (89.5) and is under the line.
24 GB and more gemma4-26b-a4b-it-qat-q4 90.5 qwen3.8-27b-ud-q4km 89.9 / -q5km 90.0 Level on quality, about five times the processor speed of a dense 27B. The best-scoring models of the study (Gemma 4 31B 94.6, Qwen3.6 27B 92.8) are dense and stay card and Apple Silicon candidates.

How it is built (decision: data in the catalog, no model names in code).

  • recommendChatModelId sends the cpu class to recommendModelIdForProcessor. That function runs the unchanged recommendModelIdByRam stages (capacity first, rank inside a band, ranked models only) over a view of the catalog in which recommendation_rank_cpu, where a manifest carries it, replaces recommendation_rank.
  • recommendation_rank_cpu: 0 keeps a model selectable but never the automatic pick on a processor. Seven manifests carry it. Six were measured too slow there: Gemma 4 12B and Qwen3 14B in the table above, and the dense 27B models from the i9-9900X rows. The seventh, Qwen3.5 35B-A3B, was not measured on a processor (it needs 24 GB of RAM, more than the 16 GB laptop). As a mixture-of-experts model it may be fast enough. It carries 0 because the stages order by comfortable RAM first: a positive rank would make this unmeasured model, comfortable at 32, the pick from 32 GB ahead of the measured 26B-A4B. A processor measurement can lift it. Five carry a positive value: three of the four picks above at 3 (the 9B carries no processor rank and keeps its ordinary 3), the E2B at 2, under the E4B, and qwen3.5-4b-ud-q4kxl at 1.
  • Two comfortable-RAM figures moved with it, both from measurement: gemma4-e4b-it-qat-q4 16 to 12 (5.48 GiB peak on the 14 GB machine) and gemma4-26b-a4b-it-qat-q4 32 to 24 (in-app peak RSS 14.28 GiB, §9.3, under the 16.8 GB Qwen3.6 27B Q4 that already sits at 24). Neither changes a pick outside this path: the E4B's ordinary rank is 0 and the 26B-A4B's is 2, under the rank-3 holder of its band.
  • ministral3-8b-instruct-2512-q4 goes from rank 2 to 0 on every path: lowest study score of the 8B class (64.7 against 79.0 and 77.2) and the slowest start. It never was an automatic pick.
  • A catalog without the two fields gives exactly the RAM pick, with or without a speed signal (pinned in committed-catalog.test.ts).

Step-down (replaces §6.5 on this path). §6.5 moves a crawling pick one capacity band down, once. On a processor that was not enough: the 9B's single step would end on the model one band below, and a machine too slow for that one stayed there. Here each manifest names its own target, step_down_to, and the chains are:

gemma4-26b-a4b-it-qat-q4 -> qwen3.5-9b-ud-q4kxl -> gemma4-e4b-it-qat-q4 -> gemma4-e2b-it-qat-q4
qwen3-4b-instruct-2507-q4 -> gemma4-e2b-it-qat-q4

Rules, all in recommendModelIdForProcessor:

  1. The no-signal pick is computed from RAM alone on every call. Nothing is stored.
  2. A benchmark strictly under 5 tok/s on a model that lies on the pick's chain recommends that model's target. So a slow reading on the pick steps once, and a later slow reading on the stepped model steps again, down to the E2B (19.9 tok/s above, the fastest ranked model).
  3. A target that the machine's RAM floor refuses, or that is not ranked on the processor, ends the chain. The end of a chain that was followed stays the recommendation.
  4. A slow reading on a model that is not on the chain is judged by §6.5 unchanged: an oversized model is no signal, anything else moves the pick one band down at most.
  5. Unlike §6.5, a runnable-stage pick (8 to 11 GB) steps too, because its target is named.

The chain tests pin that every target exists, is ranked on the processor, needs no more RAM than its source, and that no chain loops.

What this does not settle.

  • Apple Silicon. The card path is §6.8.
  • The 26B-A4B on a processor other than the i9-9900X, and any processor pick on a machine weaker than the 5800H (the #153 class). The chain is the safety net for both.
  • One study run per model and no margin of error: the 24 GB row rests on "level on quality", not on a measured gain.
  • The legacy recommended_profiles picker and the profile step-down are untouched.

Changing a pick later. Bring both axes: the study score (or its successor) and an in-app processor measurement filed under eval/results/hardware/. Then edit recommendation_rank_cpu and, if the model should be a step-down source or target, step_down_to, and update the pinned mapping, chain list and rank table in committed-catalog.test.ts with this section.

6.8 Card path: measured need, card ranks, and what an earlier start showed (2026-11-20)

Scope. This section governs the chat recommendation on a discrete graphics card (memory class discrete). It amends §6.6: the budget (the probe's free figure, else total − 1,024), the RAM floor and the no-fit fallback stay as they are; the need, the order of the picks and the handling of a wrong estimate change. Apple Silicon is untouched. The tables and thresholds in §6.6 describe the state before this section; the current figures are pinned in committed-catalog.test.ts.

1. The need is the runtime's own projection. §6.6 derived a model's need from its file size ((weights − host-mapped) × 1.15 + cache + margin). Measured against real starts that estimate was off in both directions: 117 MiB too high for the 9B on an idle 8 GB card (which therefore got the 4B although the 9B was measured at 33/33 there, #391 leg 2), up to 3.5 GiB too high for the large models, and 552 MiB too low for the E2B. llama.cpp prints the figure it actually decides by: "projected to use N MiB of device memory", which it compares with the card's free memory less its 1 GiB --fit-target. A manifest now carries that figure as projected_graphics_need_mib, and estimateGraphicsNeedMib returns it plus the same 1,024 MiB margin. A manifest without one keeps the derived estimate.

The figures were read on the i9-9900X / RTX 3090 on b12110 with the app's launch per manifest (its own context, -np 1, batch and ubatch 2048, the MTP flags where the manifest sets them), every start a full offload: eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/projected-graphics-need-b12110-20261120.tsv, 24 chat manifests. The five without a figure are the withdrawn Qwen3.8 K-quants and the two local-test stubs. Cross-check on Windows (RTX 3060 Laptop, 2026-11-20, card peak by nvidia-smi): E2B 1,865 against a projection of 1,799, E4B 3,536 against 3,458, the 2507 3,319 against 3,275, Qwen3.5 4B 3,335 against 3,277. The projection is a property of the model and the launch, not of the card, which is why one machine can supply it for all.

2. Card ranks decide the order. recommendation_rank_gpu, where a manifest carries it, replaces recommendation_rank on this path. When the catalog carries any, the pick is the highest card-ranked model that fits the card and clears the RAM floor (rank, then comfortable tier, then size), outright. §6.6 decision 2, "the RAM pick stands wherever it fits the card", is retired with it: the RAM pick is ordered by comfortable RAM, which says little about a model that lives on the card, and it kept the 9B ahead of Gemma 4 12B on cards that hold both. A catalog without card ranks is rule C unchanged.

Decision basis, as in §6.7: the 2026-11 answer-quality study first, then speed measured on a card.

Card (idle, total − 1,024) Pick, RAM allowing Study score Before Speed evidence
6 GB gemma4-e4b-it-qat-q4 82.9 qwen3.5-4b-ud-q4kxl, 76.9 78 tok/s, 43/43 layers, RTX 3060 Laptop (the 4B: 69)
8 GB qwen3.5-9b-ud-q4kxl 86.1 qwen3.5-4b-ud-q4kxl, 76.9 29 tok/s, 33/33, GTX 1070 Ti (#391 leg 2)
12 and 16 GB gemma4-12b-it-qat-q4 89.5 qwen3.5-9b-ud-q4kxl, 86.1 73 tok/s on the RTX 3090 (the 9B: 94)
20 GB qwen3.8-27b-ud-q4km 89.9 the same 48 tok/s with MTP, RTX 3090
24 GB gemma4-31b-it-qat-q4 94.6 qwen3.8-27b-ud-q5km, 90.0 35 tok/s, 61/61 layers, RTX 3090 (the UD-Q5_K_M: 50 with MTP)

Under 12 GB of RAM the pick is qwen3-4b-instruct-2507-q4 on every card (82.0; 88 tok/s on the RTX 3060 Laptop), at 12 and 13 GB the 9B where the card holds it. Card ranks: Gemma 4 12B and the E4B and Gemma 4 31B 3, the 2507 and the Qwen3.8 27B UD-Q5_K_M 2, Qwen3.5 4B and the E2B 1; the 9B and the Qwen3.8 27B UD-Q4_K_M keep their ordinary 3.

The 20 and 24 GB rows (owner call 2026-11-20, speeds in eval/results/hardware/i9-9900x-rtx-3090-24gb-128gb/card-speed-b12110-20261120.tsv):

  • 24 GB: Gemma 4 31B. It leads the study by 4.6 points over the UD-Q5_K_M, more than the study's 3-point threshold for calling two models apart, and 35 tok/s on the card is far above reading speed. Its need with the margin is 21,640 MiB, so it is the pick from that much free memory. This sets the card rank only. Its ordinary rank stays 0, so the §9 ruling "rank 0 forever" (made on the grounded-answer F1, where it tied the 26B-A4B at a quarter of the speed) still holds without a card and on Apple Silicon; on a card that holds it completely the speed objection does not apply, and the study gives it the quality lead that F1 did not show.
  • The UD-Q5_K_M steps behind its UD-Q4_K_M sibling on the card (card rank 2). The two are level on the study (90.0 and 89.9), the UD-Q4_K_M needs 3 GiB less, and a card just short of the 31B (21,340 to 21,639 MiB free) is better served by the model with room to spare.
  • 20 GB: unchanged, the UD-Q4_K_M. Gemma 4 31B does not fit. Qwen3.6 27B Q4 leads by 2.9 points (92.8), under the threshold, and is slower (39 tok/s against 48 with MTP).

What partial offload costs, from the same laptop: the 9B at 20 of 33 layers ran at 8.7 tok/s (5.1 on the processor alone, 94 fully on a card), its UD-Q3 variant at 25 of 33 at 15. A model that does not fit completely is not a card pick.

3. A model seen landing only partly on this card is not picked for it again. The need is measured, the budget is a reading, and both can be wrong for one machine. So the picker also reads what happened: the placement the app already stores per model after every start (AppSettings.modelPlacements, this machine's only, cardEvidenceFor). landedPartlyOnCard counts a record when

  • it is a card start with fewer layers on the card than the model has,
  • its context was no larger than the one the next start launches with, and
  • the card had at least as much free memory then as the budget offers now, within 256 MiB (a start beside something that filled the card must not demote the model for good; an unknown free figure counts).

Such a model is not eligible, and the next card-ranked model that fits is the pick. A later start that lands fully overwrites the record and lifts the exclusion. This is what allows the 1 GiB margin to be the only reserve: a wrong estimate corrects itself after one start instead of being padded for everyone. All three seams (the AI Model ★, the Performance check, the live recommendation) pass the same evidence.

4. The named chain applies here too. The field of §6.7 is called step_down_to since this section, because the card path follows it as well: a benchmark under 5 tok/s on the pick, or on a model further down its chain, recommends that model's target, over models that are card-ranked and eligible. Gemma 4 12B joined the chain (-> qwen3.5-9b-ud-q4kxl), so on a card it runs Gemma 12B → 9B → E4B → E2B. A slow reading the chain does not cover is §6.5, as before. A no-fit fallback never steps.

Not settled. The 20 and 24 GB picks (above). The projections come from one machine and one build: a pin bump re-reads them with projected-graphics-need in the same folder as the template. chatGraphicsShareMib (the reranker and translation headroom gates) does not read the projection. It charges the running chat model its MEASURED share from this session's load log, and only without one the derived estimate with the cache term scaled to the launched window. Against the projection plus the margin, that fallback is higher for 16 of the 24 measured models but lower for 8, most for Gemma 4 31B (692 MiB) and the E2B (553 MiB), so before a measured start those gates can count the chat model short. No start on a 12, 16 or 20 GB card has been measured on this build.

7. Design record — catalog expansion (Phases 28–29, decisions D16–D22)

Formerly docs/model-catalog-expansion-plan.md (folded in here, 2026-06-12 docs housekeeping; the full original working paper — protocol drafts, bring-up checklists, the pre-measurement RAM estimates — is in git history via git log --follow on that path). The catalog + recommendation story lives in model-policy.md (incl. the disqualified/parked candidate list under "License review gate"); the protocol + first-run findings are §0–§6 of this document. Decision numbering continues the repo series (post-MVP D1–D7 · retrieval D8–D15 → D16–D22 here → wave-3 D23+).

7.1 Decisions (D16–D22) and outcomes

# Decision Choice Why (short)
D16 First challenger batch Ministral 3 8B Instruct 2512 + Granite 4.1 8B (mid tier) + Gemma 4 12B QAT (high tier) All Apache-2.0, all with vendor-published GGUFs, all strong German — 2–3 challengers per tier without 200 GB of downloads
D17 Challenger auto-recommendation New manifests ship with empty recommended_profiles (selectable, never auto-recommended) until they earn it A challenger must EARN promotion via the Phase-29 benchmark before the recommender offers it
D18 Incumbent refresh Evaluate Qwen3-4B-Instruct-2507 as a 4th Phase-28 manifest Report data: the 2507 4B beats the original 8B on most axes. ⚠️ 2507 is instruct-only (no hybrid thinking) — interacts with Phase-20 depth modes
D19 Quality benchmark = judge-free, ours Hand-rolled German/English grounded-QA set + deterministic string/F1/citation/abstain scoring; llama-bench for speed No cloud judge (hard rule); tests exactly what the product does (RAG + citations + abstention); no new toolchain
D20 Benchmark form Manual protocol doc first (this document + a results CSV convention); automate only if the manual loop proves annoying One developer, 2–3 laptops; don't build automation before the protocol has run once
D21 Big/opt-in slot + embeddings Phase 30, outline only — Gemma 4 26B-A4B vs the incumbent Qwen3 30B-A3B; Granite Embedding R2 small as the only near-drop-in embedder MoE comparisons need Phase-29 numbers first; an embedder swap forces a reindex story — separate, later. Drafted as the Phase-30 plan (D38–D43); retired 2026-07-12 unimplemented — disposition §9.2
D22 License gate posture Every new manifest lands with a real license_review record (approved, with source URLs) before merge Licensing is the #1 disqualifier; the review work is cheap now (all picks verified Apache-2.0) and mandatory before any drive bundles them

Outcomes (as built): D16 — all three challengers shipped + license-reviewed. D17 evolved: the challengers kept recommended_profiles: [], but Phase 29 found the production recommender was quality-blind (RAM-best-fit, ignores recommended_profiles; the legacy picker is one-model-per-profile), so promotion is now carried by the recommendation_rank manifest field that makes RAM-best-fit quality-aware (§6.2). D18 resolved: 2507 shipped (via the unsloth fallback) and beat the original 4B on every Phase-29 metric, but the original stays the bundled default (it has hybrid thinking → keeps Deep working out of the box); 2507 is ranked just below it. D19/D20 — the judge-free harness + protocol shipped and ran (§2–§6). D21 — Phase 30 outline → the D38–D43 plan, retired 2026-07-12 unimplemented (§9.2). D22 — all four license_reviews approved Apache-2.0.

7.2 Verified research facts (2026-06-10 — what the wave rested on; confirmed live on b9585)

  1. Pinned llama.cpp b9585 = the 2026-06-09 release — every candidate (incl. Gemma 4, which needs ~b8607) runs on the runtime we already ship. No runtime bump.
  2. Gemma 4 is Apache-2.0 — first Gemma under an OSI license. Official Google QAT Q4_0 GGUF: https://huggingface.co/google/gemma-4-12B-it-qat-q4_0-gguf.
  3. Ministral 3 (2512) family is Apache-2.0, official Mistral GGUF repo (https://huggingface.co/mistralai/Ministral-3-8B-Instruct-2512-GGUF). ⚠️ The Oct-2024 Ministral-8B-Instruct-2410 is non-commercial (Mistral Research License) — the manifest pins the exact -2512 URL; the review names the trap.
  4. Granite 4.1 is Apache-2.0 with official IBM GGUFs at https://huggingface.co/ibm-granite/granite-4.1-8b-GGUF (NO -instruct suffix — that repo IS the instruct model). German is one of 12 official languages.
  5. Incumbents are the ORIGINAL Qwen3 instruct models (hybrid thinking), not the 2507 refresh. Report-table basis for D18: 2507-4B scores above the original 8B on MMLU-Pro/IFEval/MMLU-ProX.
  6. --jinja is already in CHAT_SERVER_ARGS — the server applies each GGUF's embedded chat template; new-model bring-up only needs a render smoke. --reasoning-format deepseek is a no-op for non-thinking models.
  7. Embeddings: the pipeline is built around E5-small's 384 dims; switching embedders forces a reindex. Granite Embedding R2 small (384-dim, Apache-2.0) is the only near-drop-in candidate — Phase-30 material (BGE-M3 / Qwen3-Embedding are 1024-dim).

7.3 Phase 28 — catalog wave 1 (as built, manifest-only)

Four manifests under model-manifests/chat/, all Apache-2.0, all license_review: approved, no code changes — the existing validator + committed-manifests discovery test cover them:

id source GGUF notes
ministral3-8b-instruct-2512-q4 official mistralai/…-2512-GGUF Q4_K_M text-only (mmproj vision file deliberately not referenced); review names the -2410 NC trap
granite-4.1-8b-q4 official ibm-granite/granite-4.1-8b-GGUF Q4_K_M repo name has no -instruct
gemma4-12b-it-qat-q4 official google/gemma-4-12B-it-qat-q4_0-gguf vendor QAT Q4_0; file name lower-case gemma-4-12b-…
qwen3-4b-instruct-2507-q4 (D18) unsloth Qwen3-4B-Instruct-2507-GGUF Q4_K_M the Qwen org publishes NO official 2507 GGUF → established-quantizer fallback; recorded as third-party requant in the review

Provenance notes that survived to the manifests: vendor GGUF repos declare apache-2.0 via the HF card tag only, so their license_url points at the canonical Apache-2.0 text (card URLs in the review notes); only the Qwen 2507 base repo ships a LICENSE blob. Exact HF-tree byte sizes are baked into download.size_bytes. Weights fetched + real sha256 promoted; verify-models -Target D:\ reports all 10 catalog weights VERIFIED.

Bring-up (tests/manual/bringup-smoke.test.ts, real b9585): all four load, render the chat template through --jinja with no leaked artifacts, stream tokens, and answer the German prompt in German. Two findings were carried into Phase 29 and resolved there: (a) 2507 looked factually wobbly in German on open knowledge — it did not recur on the grounded RAG path (2507 has the top German F1 in the benchmark); (b) Gemma 4 honours enable_thinking — its supports_thinking_mode was flipped true after the Phase-29 thinking-quality check (tests/manual/gemma-thinking.test.ts).

7.4 Risks / open items (still live)

Risk Mitigation
Eval set saturates EM (all models ~96–98 %) Grow the set with harder/multi-hop + more distractor-heavy items before trusting accuracy deltas; per-item dumps are kept. Abstention already separates models. (= big-slot plan D42)
Benchmark machines too few/too similar The protocol records machine facts; the GPU hardware-matrix machines double as benchmark hosts over time (run the dev-box sweep for the formal 2nd machine)
HF repo layouts / filenames drift Manifests pin exact URLs; first fetch + verify-models --generate catches drift loudly
Phase-30 embedder swap forces a reindex Surface via the Phase-17 re-index machinery; its own mini-plan before any swap (big-slot plan Track B)

8. Image understanding (vision) — V1 measurements + the V5 smoke protocol

The vision sidecar (image-understanding feature; design record in architecture.md "Image understanding — design record") is a SEPARATE benchmark axis from the chat catalog above — a different role (vision), a two-file model (language GGUF + mmproj projector), and a CPU-bound multimodal prefill. Numbers below are the real V1 measurements on the pinned b9585 (a locally provisioned PAID smoke drive), captured during the V1 research gate (BUILD_STATE V1); the V5 manual harness re-runs them live.

8.1 The manual smoke harness (HILBERTRAUM_VISION_SMOKE)

tests/manual/vision-smoke.test.ts, the same env-gated pattern as gpu-smoke/rerank-smoke (skipped in CI — the green gate stays zero-binary/zero-model/zero-network):

$env:HILBERTRAUM_VISION_SMOKE = "<your-smoke-drive>"   # root with runtime/llama.cpp/<os>/llama-server + models/vision/*.gguf
cd apps\desktop
npx vitest run tests/manual/vision-smoke.test.ts

It drives the REAL VisionRuntime end-to-end against the off-repo weights: cold start (--mmproj loads multimodal), analyze the committed synthetic fixture (tests/fixtures/vision/chart.png — a content-free, license-clean bar chart drawn by make-fixtures.mjs), STREAM the answer (real SSE → readChatSSE), a warm follow-up (the cache_prompt reuse), then the RUNTIME-4 idle teardown + cold restart. Peak RSS co-resident is captured separately with scripts/measure-peak-rss.ps1 (§C) against the running sidecar. No multi-GB weights or user images are committed — only the ~1.7 KB synthetic fixture.

8.2 Chosen production candidate — Qwen2.5-VL-3B-Instruct (V1, real)

Datum Value Source / note
LM weight Qwen2.5-VL-3B-Instruct-Q4_K_M.gguf — 1.93 GB ggml-org GGUF, Apache-2.0 (sha256 d02fe9…486c12)
Projector mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf — 1.34 GB the --mmproj CLIP projector (sha256 b9160f…e60d5e)
Combined on disk ≈ 3.27 GB both files; install = both present + verified
Peak RSS (sidecar alone) ≈ 4.6 GB CPU-pinned, ctx 4096; PeakWorkingSet64 4597 MB / private 5126 MB
Cold start seconds (large GGUF off USB) "Starting the vision model…"; idle teardown re-pays it later
Image tokens (full-res scan) 2813 a high-res page; the §11 downscale-to-1536 cuts this ~proportionally
CPU prefill (full-res) ≈ 52 s (~18.5 ms/image-token) the headline latency risk — CPU off USB; downscale + GPU are the levers
Decode ≈ 12 tok/s CPU-pinned
cache_prompt reuse cache_n:2812, prompt_n:1 on the 2nd question the per-image thread pays the image prefill ONCE, not per follow-up
Capability read a real German invoice correctly (doc-type + the German text) the 256M reference garbled it

Reference (fast mechanics-proof, not the product model) — SmolVLM-256M-Instruct (ggml-org, Apache-2.0): also loads/answers; RSS ~402 MB (sha256s in BUILD_STATE V1).

8.3 The two levers + the tuned idle timeout

  • --device none / CPU-pin is the MVP default (§19.11): GPU is the optimization lever only if CPU TTFA fails the bar — it adds VRAM contention with chat + driver-flakiness. The ~52 s full-res prefill is the number that decides this per machine.
  • Client downscale to 1536 px (§11) is a real LATENCY lever, not just payload — fewer image tokens ⇒ proportionally less CPU prefill — and it normalizes EXIF orientation. Already on the real path (renderer decode.ts).
  • Idle-teardown default TUNED to 120 000 ms (2 min) — the lower end of the §19.13 2–5 min band (DEFAULT_VISION_IDLE_MS, env HILBERTRAUM_VISION_IDLE_MS). Rationale: the follow-up prefill is already cache_prompt-cached, so a warm sidecar only saves the seconds-scale model load; meanwhile the idle ~4.6 GB sits co-resident with a 12B chat (PROD-1 pushes a real machine >16 GB), so reclaiming it sooner is the higher-value trade. 2 min spans a burst of follow-ups, then frees the RAM; the next image cold-restarts cleanly.

8.4 RAM co-residency (PROD-1) — the acceptance bar, honestly qualified

Vision peak 4.6 GB + a 12B chat (7 GB) + the E5 embedder ⇒ >16 GB — three llama-server processes at peak. The idle teardown bounds the window, not the active-use peak. So vision is realistically co-resident only with a small chat model, or after the chat sidecar idles out; the manifest recommended_min_ram_gb / RAM-best-fit gate keeps a vision model off machines that can't hold it. Recorded in known-limitations.md.

The same PROD-1 convention governs recommended_min_ram_gb catalog-wide (PR #30): the hard start gate is the model-alone floor (peak RSS + ~3 GiB headroom), never the co-residency floor. Vision = 12 for its ~4.6 GiB peak; TranslateGemma = 13 for its 9.22 GiB peak (§11 D10). Co-residency pressure lives in recommended_ram_gb and is absorbed at runtime by idle-teardown + the RAM-best-fit picker — not by refusing to load the model. Baking a co-residency floor into the hard min (TranslateGemma's original 17) locks the model out of machines that could run it alone, so no manifest should do it.

9. Qwen3.5 Unsloth wave — PENDING candidates + the b9849 manual smoke (2026-07-01)

Four qwen3.5-family chat manifests are in the catalog as pending benchmark candidates — added manifest-only, rank 0, not bundled, not auto-recommended (model-policy.md "Qwen3.5 Unsloth wave"). No wins are claimed here. They had NOT been through the §2–§6 harness when this section was written, and the runtime pin they need (b9849, bumped from b9585) has not been smoked on this project's drive. (Update 2026-07-11: a tester has since run the §2 quality half on their own machine — see "Tester eval runs (2026-07-09)" below. Ranks still unchanged: ratification + the speed/RSS and §9.1 halves are owner work.) (Superseded 2026-07-12: §6.4 promoted qwen3.5-4b-ud-q4kxl and qwen3.5-9b-ud-q4kxl to recommendation_rank: 3 by owner decision — the "rank 0 / not auto-recommended / ranks unchanged" statements throughout this section describe the pre-promotion state; qwen3.5-27b-ud-q4kxl and qwen3.5-35b-a3b-ud-q4kxl remain rank 0. See §6.4.)

Candidate Tier Must beat (to earn a recommendation_rank > 0)
qwen3.5-4b-ud-q4kxl 4B qwen3-4b-instruct-q4 (the bundled default) before promotion.
qwen3.5-9b-ud-q4kxl 8B ministral3-8b-instruct-2512-q4 on hallucination rate, German/English grounded QA, citation correctness, AND speed.
qwen3.5-27b-ud-q4kxl 12–14B+ gemma4-12b-it-qat-q4 and qwen3-14b-instruct-q4 by enough to justify the size/RAM.
qwen3.5-35b-a3b-ud-q4kxl MoE (opt-in) qwen3-30b-a3b-q4 on speed OR quality by enough to justify replacement.

Public benchmark scores are NOT enough. HilbertRaum promotion depends ONLY on the local, offline German/English grounded-QA eval (§2) + the speed/RSS sweep (§3/§4) + the manual smoke below. Qwen3.5 27B's public numbers may look stronger than 35B-A3B's on several categories — that is not a promotion signal here. Until the local eval gives a model a real rank, every Qwen3.5 manifest stays recommendation_rank: 0 (selectable manually, never auto-recommended, never bundled). (Superseded 2026-07-12: §6.4 amended this "local eval only" rule — the 4B and 9B are now rank 3 by owner decision on product/positioning grounds; the 27B/35B-A3B stay rank 0.) The §4 recommended_min_ram_gb values for these are placeholders pending a real peak-RSS measurement (24 GB for the 27B/35B is a conservative guess, not a measured floor).

Tester eval runs (2026-07-09, recorded here 2026-07-11; full tables in issue #48's comments) — a tester ran the §2 grounded-QA harness (tests/manual/model-eval.test.ts) on their own machine (i9-9900X + RTX 3090, Vulkan, the b9849 drive binary; 100 DE/EN items, temp 0, identical retrieval) over 13 chat GGUFs in two runs — all six wave candidates included. Raw CSV/JSONL are now committed under eval/results/i9-9900X-vulkan-* (§6.4; originally kept on the tester's drive). Cross-run calibration held (three overlap models within ≤.022 F1 / ≤1 hallucination item of the committed Phase-29 i7 run), and the tester audited all flagged hallucinations by hand. Status: quality evidence, pending owner ratification — NOT yet the §9 record and no rank has moved. (Ratified 2026-08-03 together with the 2026-07-30 evidence run — both i9 runs are now the §9 record and the detector-v3 rescored CSVs are canonical; see the §9.3 wave outcome. The 35B-A3B's deferred rank resolved to rank 1 there.) Headline verdicts as reported:

  • Qwen3.6 27B (local-only manifests) sweeps the 20–24 GB tier — Q5: best F1 ever measured on the harness (.3573), zero hallucinations, best DE F1; Q4 clean after audit. Proposal: Q5 → rank 2, Q4 → rank 1 — blocked on productizing (no download: block / upstream sha256 / license review; the #48 item-2 bar below).
  • qwen3.5-4b-ud-q4kxl FAILS its §9 bar (issue #53's candidate): fewer real hallucinations than the bundled qwen3-4b-instruct-q4 (2 vs 3) but F1 .2728 vs .3277 — a loss larger than the verbosity confound (below) plausibly explains at this size — and qwen3-4b-instruct-2507 (F1 .3613, 1 halluc) dominates both. Phase-29 status quo stands on quality grounds.
  • qwen3.5-2b-ud-q4kxl should not be recommended anywhere: worse F1 than the 0.8B and the worst unanswerable-discipline of all 13 models (4–5 real hallucinations); the 0.8B remains the honest floor.
  • qwen3.5-9b-ud-q4kxl does not clear the strict 8B bar (edges Ministral on EM/F1 within tolerance but fell once for the en-contract-penalty invoice-distractor trap where Ministral's record is clean); tester proposes rank 1 under Ministral's rank 2.
  • qwen3.5-35b-a3b-ud-q4kxl is hallucination-clean after audit (0 real vs the incumbent MoE's 2, EM parity, F1 gap within confound territory) — rank deferred to the §3/§4 speed rows, which is exactly the axis its 3B-active architecture should win.
  • Scorer confound + fixes (do BEFORE canonizing numbers): token-F1 inversely tracks answer length (Qwen3.5 house style answers 125–215 chars vs Gemma/Qwen3.6's 87–93), so F1 partly measures style, not knowledge — read EM + audited hallucinations as primary for cross-family calls, or add a length-normalized column; and the refusal detector missed four abstentions across the runs (incl. a German "kein/keine … erwähnt" negation family) — extend the phrase list + rescore via the §2 rescore.mjs flow (no model re-runs needed). (Detector fix DONE 2026-08-03 — v3 phrase list + split-negation patterns, all four dumps rescored and the flips audited item-by-item; see §9.3 "Scorer v3". v4 on 2026-09-27 (#517) added the sentence-scoped German "not stated" forms and re-scored every dump; see §6.6 "#512 amendment". The length-normalized column remains a nice-to-have; EM + audited hallucinations stay the primary cross-family read.)

What the runs do NOT cover (why ranks are still unmoved): owner ratification of a tester-machine run as the §9 record; the §3/§4 speed/RSS sweep (decides the 35B-A3B and supplies the measured peak RSS any RAM-line retune needs); the §9.1 through-the-app smoke (abort, lock/quit teardown, thinking-mode toggles — the eval harness exercises the RAG path, not the app UI); and committed raw results. The runs DO constitute strong informal b9849 load+stream evidence for every model they scored.

Field signal on the 4B (issue #53, 2026-07-11) — recorded as eval input, NOT a promotion: a tester on a weak 16 GB laptop (weak iGPU) reports qwen3.5-4b-ud-q4kxl at ~2 tok/s with usable quality as the best speed/quality trade-off of the catalog on that class of machine — the 16 GB recommendation (Ministral 8B) is roughly twice the compute per token there, and the fast-tier 2B/0.8B give up more quality than they save. Running through the app is also an informal load+stream datapoint for b9849 (the §9.1 smoke on this project's drive is still owed). Two mechanics facts for the eventual promotion (verified against recommendModelIdByRam, recorded in the manifest): rank 1–2 wins nothing (qwen3-4b takes ≤12 GB on the rank/size tiebreaks, Ministral keeps 16–20 GB), and rank ≥ 3 also steals 16/20 GB from Ministral (both carry recommended_ram_gb: 16) — so a low-end-only promotion must retune recommended_ram_gb from the real peak-RSS measurement, or land with the signal-aware picker follow-up (issue #53 option 2: feed the Diagnostics benchmark's measured tok/s — persisted with its measuredModelId since issue #52 — into the recommendation, capturing the weak-16 GB-laptop case without misranking capable 16 GB machines). (Update 2026-07-11: the tester eval above scored the 4B and it FAILS its quality bar against qwen3-4b-instruct-q4 — so if that run is ratified, the #53 case reduces entirely to the compute axis the quality harness doesn't measure, i.e. option 2, not a rank edit.)

Issue #48 (2026-07-10) extends this wave's scope, still under the same gate: the fast-tier qwen3.5-2b-ud-q4kxl / qwen3.5-0.8b-q6 have no incumbent to displace (low-risk promotions once evaled), and the eval should record context length and thinking-mode support as first-class criteria alongside grounded QA / citations / speed — the Qwen3.5 generation's native 262k window and hybrid thinking are product-relevant differences the §2 score alone does not capture (the shipped recommended_context_tokens stays the safe local budget either way; a promotion may raise it deliberately, per the D69/#43 context policy). Candidates that exist only as local manifests elsewhere (e.g. a Qwen3.6 27B) need productizing first: a download: block, a real upstream sha256, and a license review — same bar as the wave above.

Thinking-checkpoint criterion for structured surfaces (STR-1 review §5.4, 2026-07-20): Qwen dropped hybrid thinking with the 2507 refresh — Instruct and Thinking are now SEPARATE checkpoints, and an enable_thinking template kwarg is moot on a split checkpoint. The #50 lesson ("the model reasons anyway despite the kwarg and burns the extract token budget") generalizes: for the app's grammar/extract/locate surfaces (D55 responseSchema consumers — categorizer, enricher, both locate passes, the ingest extract pass), the robust control is which checkpoint the catalog recommends, not a template kwarg. When ratifying this wave, record each manifest's observed thinking-mode behavior as a first-class criterion for structured-surface suitability (extend the two §9.1 thinking checkboxes' findings to the extract/locate implications), and keep structured-surface calls pinned to non-thinking behavior (a thinking-only checkpoint pays the #50 escalated-retry cost on every ingest chunk). Since wave R80 (issue #80, 2026-08-09) the router's skill-pointer classification (analysis/classify.ts) is a further D55 responseSchema consumer on this list — single-shot, temp 0, tiny enum, run only on the #54-class/low-confidence trigger turns; a thinking checkpoint that burns the 48-token budget on reasoning simply degrades it to none (no offer — the honest fallback), so it fails soft, but the criterion above still applies. Owner-run follow-up eval: the classifier's real-model precision on the promoted catalog is deliberately NOT gated in-repo (the in-repo gate is the deterministic trigger boundary + the prefer-none prompt); the extract-router.test.ts #80 golden set (bilingual trigger asks + near-miss distractors) doubles as the eval input — run it against each promoted checkpoint and record per-model offer-precision/none-rate here when ratifying a wave.

9.1 Manual smoke checklist — b9849 runtime + Qwen3.5 load (REQUIRED; not CI)

This is a human pre-promotion gate (offline / network / real GPUs can't run in CI). Record results in BUILD_STATE. Capture tokens/sec + peak RSS where the existing manual harness (§3/§4, benchmark-speed.ps1) supports it.

1. Fetch/install the b9849 runtime (fetch-runtime), per build:

  • Windows Vulkan/full · [ ] Windows CPU safety-net · [ ] macOS arm64 (Metal) · [ ] Linux Vulkan/full · [ ] Linux CPU safety-net

2. Old models still load on b9849 (regression):

  • qwen3-4b-instruct-q4 · [ ] ministral3-8b-instruct-2512-q4 · [ ] gemma4-12b-it-qat-q4 (if the machine has the RAM) · [ ] embedding (multilingual-e5-small-q8) + reranker (bge-reranker-v2-m3) sidecars still load on b9849 — or explicitly record if deferred to a later phase (these were last verified on b9585; the F16 choice is documented in model-policy.md).

3. New Qwen3.5 models load on b9849:

  • qwen3.5-4b-ud-q4kxl · [ ] qwen3.5-9b-ud-q4kxl · [ ] qwen3.5-27b-ud-q4kxl (32 GB+ machine) · [x] qwen3.5-35b-a3b-ud-q4kxl (32 GB+ machine — PASSED 2026-08-09, all item-4 legs; see the §9.3 smokes record)

4. For each Qwen3.5 smoke, through the APP (not raw llama.cpp):

  • start the model via the AI Model screen
  • one normal chat prompt streams a coherent answer
  • one document-grounded prompt (if documents are available) answers from the corpus
  • streaming begins and can be aborted mid-stream
  • lock / quit teardown leaves no llama-server sidecar running
  • Deep/Thorough mode toggles enable_thinking correctly (reasoning frames appear)
  • Balanced/non-thinking mode disables thinking where supported (esp. the ≤9B models, which default reasoning OFF unless enable_thinking=true)
  • no mmproj/projector is required for text-only chat (these are text-only manifests)

6. Vision sidecar (Qwen2.5-VL-3B) on b9849 — DONE 2026-07-01 (the gap that shipped the salad bug): The original §9 checklist omitted the vision sidecar (items 2–4 cover chat + embedder/reranker only). A large real image then produced multilingual token-salad on b9849 — root cause = b9849's n_slots = 4 + unified KV starves a large image's ~1700–3000 vision tokens; fixed with --parallel 1 (VISION_SLOT_ARGS). Full record: architecture.md §3 (RUNTIME-5) + BUILD_STATE. Re-smoke this after ANY future pin bump — a tiny fixture is NOT sufficient (the salad only appears above ~1000 vision tokens):

  • through the APP, analyze a LARGE photo (≥1536 px long side) → COHERENT description
  • analyze a SECOND large image on the same warm sidecar (no restart) → still coherent (guards the KV-reuse/oversubscription path)
  • the sidecar stderr shows n_slots = 1, kv_unified = false and NO failed to find a memory slot / failed to process image lines

5. If UD-Q4_K_XL fails to load on b9849 but plain Q4_K_M loads: add the experimental qwen3.5-27b-q4km.yaml / qwen3.5-35b-a3b-q4km.yaml fallback (hashes recorded in the manifest templates in the wave plan), keep UD-Q4_K_XL as the preferred quant. Do NOT add a fallback pre-emptively.

9.2 Phase-30 "big slot + embeddings" plan — RETIRED unimplemented (2026-07-12; D38–D43 disposition)

The standalone plan (docs/big-slot-embeddings-plan.md, drafted 2026-06-11; deleted 2026-07-12 — full text: git show 1e5d17e:docs/big-slot-embeddings-plan.md) was retired without implementation: neither track had started, and the facts moved underneath it (the b9585→b9849 pin bump, the Qwen3.5 wave, the §9 tester evidence). Disposition of its decisions:

  • D38 (Track A candidate set: Gemma 4 26B-A4B / Mistral Small 3.2 24B / Granite 4.0 H-Small) — SUPERSEDED, none ever fetched. The §9 tester eval answered Track A's question ("is anything above the 12–14B tier worth recommending?") with different candidates: Qwen3.6 27B sweeps the 20–24 GB tier and the 35B-A3B challenges the MoE incumbent. The live big-slot work is the §9 promotion pipeline (BUILD_STATE §5 item 8); fetching the old candidate list would duplicate it. (Update 2026-07-23: partially overtaken — the Gemma 4 26B-A4B has since been fetched, hash-verified, and CLI-load-smoked as part of the Gemma 4 QAT wave (§9.3, issue #82), which puts it IN the §9 promotion pipeline as the headline 24 GB challenger. The D38 disposition itself stands: Track A as drafted was never run; the candidate re-entered through the front door — an official Google QAT quant with a verified hash — not via the retired plan.)
  • D39 (inclusion bar: a big model must beat the incumbent at usable speed, or be a clear GPU-only ceiling) — CARRIED FORWARD: restated as §9's "must beat" table.
  • D42 (eval-set hardening) — STILL NEEDED, merged into §5 item 8 step (a): the tester run confirmed the scorer can't separate strong models (length-confounded F1 + refusal-detector gaps, §9 "Scorer confound").
  • D43 (MoE RAM from weight-file size + KV headroom, not mmap-undercounted RSS) — STILL OPEN, carried into item 8's §3/§4 speed/RSS step (the 27B/35B RAM lines are placeholders).
  • D40/D41 (Track B — the default-embedder swap) — DEFERRED post-MVP, decisions unmade. Durable facts for whoever reopens it (registration: BUILD_STATE §5 item 4):
    1. Start with a 384-dim drop-in (reindex only, no storage change); 1024-dim models (~2.7× vector-blob storage, a heavier embedder) are a separate, later decision. The schema already supports a different-dimension embedder mechanically (per-row dimensions, id-scoped search) — the real work is the retrieval A/B plus the Phase-17 reindex UX (an embedder change must honestly prompt "your documents need re-indexing"; id-scoping already prevents silent vector-space mixing).
    2. Adoption bar: a measurable win on the hardened eval set — a default-embedder swap invalidates every user's existing index, so the bar is higher than for a chat model, and it gets more expensive the larger the install base (an argument for deciding early post-MVP).
    3. Compat hazard: the E5 q8_0 conversion CRASHED the old b9585 runtime (binary_op: unsupported types … q8_0) — the reason E5 + the reranker pin F16. Re-verify this hazard class on the current b9849 pin before any embedder work; test candidate GGUFs as F16 first.
    4. Re-verify the candidate landscape at reopen time — the plan's pick (Granite Embedding R2 small, ~97M, 384-dim, Apache-2.0) dates from 2026-06.
    5. A materially better retriever may change whether the bge reranker still earns its CPU cost — re-measure rerank-on/off on the new retriever (rag-design §11).
  • D1 rider — UNCHANGED, now recorded solely in rag-design §10: a prefix-using embedder with a measurable relevance floor re-opens D1 (unified auto-RAG chat).

9.3 Gemma 4 QAT wave — PENDING candidates (2026-07-23, issue #82)

Four gemma4-family chat manifests joined the catalog as pending benchmark candidates — official Google QAT Q4_0 GGUFs around the shipped Phase-29 winner gemma4-12b-it-qat-q4, added manifest-only, rank 0, not bundled, never auto-recommended (model-policy.md "Gemma 4 QAT wave" carries the full research record; wave tracking: issue #82). The promotion gate is the same as the Qwen3.5 wave above — the local, offline German/English grounded-QA eval (§2) + the speed/RSS sweep (§3/§4) + the §9.1 manual smoke, per size; public scores do not count.

Candidate Tier Must beat (to earn a recommendation_rank > 0)
gemma4-e2b-it-qat-q4 4B low-end qwen3-4b-instruct-q4 (bundled default) AND qwen3.5-4b-ud-q4kxl (rank 3) — the issue-#53 weak-hardware case is the prize.
gemma4-e4b-it-qat-q4 8B ministral3-8b-instruct-2512-q4 (Phase-29 tier winner) and qwen3.5-9b-ud-q4kxl (rank 3) on the §2 axes.
gemma4-26b-a4b-it-qat-q4 MoE (headline) qwen3.6-27b-q4 (rank 3, the 24 GB pick) and gemma4-12b-it-qat-q4; also decides whether either opt-in Qwen MoE still earns its 4–8 GB more disk.
gemma4-31b-it-qat-q4 Dense ceiling (opt-in) the Qwen3.6 27B pair — AND gemma4-26b-a4b-it-qat-q4: if the MoE matches its quality, drop the 31B before it ever ranks.

The §9.1 checklist applies per size (read its items 3/4 as "the wave models"), with one wave-specific addition from the 2026-07-23 smokes: E4B and 26B-A4B think BY DEFAULT (reasoning arrives on the reasoning_content channel first — unlike the shipped 12B), so the per-size smoke MUST verify enable_thinking: false actually suppresses reasoning — Balanced mode and the #50 extract path depend on it (see the STR-1 §5.4 thinking-checkpoint criterion recorded at the end of §9's main body: structured surfaces need pinned non-thinking behavior). (Correction from the 2026-07-30 run: the shipped 12B ALSO thinks by default on b9849 linux-vulkan (--jinja --reasoning-format deepseek) — the "unlike the shipped 12B" contrast did not reproduce and was likely win-vulkan/0.1.48-specific or stale; the suppression requirement itself is what matters, and it holds for every size. See the wave outcome below.)

Smoke state at wave open (2026-07-23, DIY test drive, 0.1.48 portable + b9849 win-vulkan): E2B + E4B in-app smoke PASSED (owner); 26B-A4B loads + answers via CLI but needs a ≥24 GB machine for in-app use + peak RSS (a 16 GB box mmap-thrashes at ~170 s/reply — the RAM gate works); 31B un-smoked (same dense arch string as the 12B — lowest risk). All four hashes are real HF-LFS OIDs, independently re-verified against the HF tree API + resolve-endpoint headers at merge review (PR #83); E2B/E4B/26B-A4B additionally confirmed by fetch + on-disk SHA-256. RAM lines are ESTIMATES pending the §4 peak-RSS measurement (each manifest carries its recalibration note).

Wave outcome — RATIFIED (owner, 2026-08-03). The full §2 + §3/§4 + thinking + §9.1 evidence for all four sizes landed 2026-07-30 (contributor run: i9-9900X, 128 GB, RTX 3090, Ubuntu 22.04.5, pinned b9849 linux-vulkan, repo base 7b0203c5; raw files committed via PR #92 — eval/results/i9-9900X-gemma4wave-vulkan-*, i9-9900X-{vulkan,cpu}-speed.csv, gemma-thinking-i9-9900X-*.json; full tables in the issue-#82 comment). Anchor calibration against the committed 2026-07-09 run held (gemma4-12b F1 delta .0007; qwen3.6-27b-q4 byte-identical), so the two i9 runs are comparable, and both are hereby ratified as the §9 record (BUILD_STATE item 8 step (b)), with the detector-v3 rescored CSVs as the canonical numbers (step (a) — see "Scorer v3" below). Decisions against the must-beat table above, each recorded next to the rank in its manifest:

Candidate Decision Basis (rescored numbers)
gemma4-26b-a4b-it-qat-q4 rank 2 — ranked runner-up / MoE speed alternative EM parity with the 24 GB pick qwen3.6-27b-q4 (.9765 both), ZERO audited hallucinations (both), ~4× its decode (tg 155.8 vs 40.1 t/s vulkan; 15.6 vs 2.8 cpu) at 2.5 GB less disk — but F1 .3307 vs .3523 keeps the Qwen the tier pick (both families share the terse house style, so the §9 length confound does not explain the gap). Never the auto-pick while a rank-3 model fits (pinned in committed-catalog.test.ts). (#378: the quality part of this basis is an F1 delta; read it beside mean_answer_chars, re-read pending as an owner call, §5.)
gemma4-31b-it-qat-q4 rank 0 forever — DO NOT PROMOTE Issue #82's drop condition is met: ties the 26B-A4B within .003 F1 (.3334 vs .3307; both 0 hallucinations, both the same two cautious DE over-abstentions) while decoding 4.2× (vulkan) / 6× (cpu) slower at +3.3 GB disk. Stays selectable as the Apache-2.0 GPU-box quality ceiling; catalog removal deliberately not taken (shipped in v0.1.55). Amended 2026-11-20 (§6.8): the ordinary rank stays 0, but it carries card rank 3 and is the pick on a 24 GB card, on the 2026-11 answer-quality study (94.6).
gemma4-e4b-it-qat-q4 rank 0 — missed the 8B bar F1 .2999 vs Ministral .3111 / qwen3.5-9b .3152 / qwen3-8b .3262; hallucination-honest after audit (1 real). (#378: an F1-delta basis; read it beside mean_answer_chars, re-read pending as an owner call, §5.)
gemma4-e2b-it-qat-q4 rank 0 — gated on the owed weak-hardware datapoint (resolved 2026-08-09: the #153 leg landed and promoted it to rank 3 — see §6.5 "#153 amendment") F1 .3373 edges the bundled qwen3-4b (.3277) with equal audited hallucinations (3) and the fastest cpu decode measured (24.3 t/s tg) — but qwen3-4b-2507 keeps the tier quality lead (.3613, 1 real), Deep failed the flip rule at this size (7/8 vs Balanced 8/8), and the issue-#53 weak-16 GB-box measured-tok/s leg is still owed. That datapoint decides (wave follow-up issue). (#378: the quality part of this basis is an F1 delta; read it beside mean_answer_chars, re-read pending as an owner call, §5.)
qwen3.5-35b-a3b-ud-q4kxl (§9's deferred-to-speed rank) rank 1 — ranked MoE alternative The §9 bar ("beat qwen3-30b-a3b-q4 on speed OR quality by enough") is met on both axes: 0 real hallucinations vs the incumbent MoE's 2 at EM parity (quality), and the 3B-active speed case confirmed (tg 140.9 t/s vulkan / 12.1 cpu vs the dense 27B-Q4's 40.1 / 2.8). (Residual settled: its §9.1 in-app smoke PASSED 2026-08-09 — see the smokes record below.)

Nothing in the run contradicts the §6.4 promoted ranks — where the eval is clear it agrees at the top end (the Qwen3.6 pair still leads the quality table on the rescored numbers).

Thinking per size (2026-07-30): all four wave sizes (and the 12B control) think by default on the raw b9849 linux-vulkan server and suppress cleanly with enable_thinking: false (0 reasoning chars, content intact) — the #50 short-cap empty-content class reproduces only in raw-default mode, which the app never sends, and the #50 extract path is safe on every size. Deep-vs-Balanced (8-item set, committed JSONs): E4B / 26B-A4B / 31B all 8/8 vs 8/8 (flip rule satisfied); E2B Deep 7/8 (train-arrival arithmetic slip) — flip rule says NO for E2B. supports_thinking_mode stays true on all four (the mechanism verifiably works; E2B's Deep value is recorded here and in its manifest). The 12B-contrast correction is noted at the checklist paragraph above.

§4 RSS / RAM lines (2026-08-03 decision): lines KEPT, measured values recorded per manifest. The in-app/vulkan peaks confirm the committed lines (26B-A4B 14.28 GiB → min 20 ✓; 31B 17.78 → 24 ✓; E2B 4.40 cpu → 8 ✓; E4B 7.32 cpu → 12 ✓; qwen3.6-27b-q4 16.87 → formula-exact 20 ✓; Q5 19.38 → 23 ≤ 24 ✓; 9B 6.57/7.93 → ≤ 12 ✓; 4B 3.44/4.22 → 8 ✓; 35B 21.46 → 25 vs 24, within the basis question). The Linux pure-CPU max-RSS values (26B 27.5 GiB, 31B 36.2, 27B-Q4 26.9, 35B 32.4) count mmap-resident weight pages and are NOT comparable to the Windows-PeakWorkingSet basis the catalog lines were calibrated on — the same sweep read the 27B-Q5 (19.6) BELOW the Q4 (26.9), a page-cache artifact, so no line is retuned from that basis. A Windows-basis re-measure is the recorded follow-up; a cpu-only 24 GB box running the 27B-Q4 is acknowledged tight.

§9.1 smokes (2026-07-30, through the real UI via CDP, b9849 linux-vulkan): 26B-A4B and 31B PASS every leg (start / stream / grounded+cited / mid-stream abort / stop+quit teardown / Deep on + Balanced suppressed; in-app peaks 14.28 / 17.78 GiB) — closing the two open per-size smokes; E2B/E4B were owner-PASSED 2026-07-23 (win-vulkan) and this run adds the missing linux legs via harness+eval. The still-owed §6.4 smokes for the promoted set also PASSED: qwen3.5-9b, qwen3.6-27b-q4, qwen3.6-27b-q5 — all legs, in-app peaks 6.57 / 16.87 / 19.38 GiB. No llama-server survived a stop or quit in any smoke. Open smokes after this wave: the 35B-A3B (rank 1, no auto-pick exposure) — tracked in the follow-up issue. (Closed 2026-08-09, below.)

§9.1 smoke — qwen3.5-35b-a3b-ud-q4kxl (2026-08-09, through the real UI via CDP, b9849 linux-vulkan): the last owed promoted-set smoke, run on the same rig + reusable eval drive as the 2026-07-30 evidence run (i9-9900X, 125.5 GB, RTX 3090, Ubuntu 22.04.5, dev build of repo head at f2a152df; issue #95 item 4). PASS on every leg: in-app checksum verify of the 22.2 GB sha256-pinned weight (81 s); start via the AI Model screen (spawn-to-running 14 s, real llama-server sidecar on the 35B GGUF, GPU backend shown in the chat header); normal chat prompt streams coherently; document-grounded ask in "Ask my documents" mode answers from the corpus with a correct [S1] citation; mid-stream abort (stream ended 203 ms after Stop); Deep shows the reasoning line, Balanced suppresses it cleanly (0 reasoning surfaced — consistent with the §9.3 thinking table); stop teardown and quit-while-running teardown both leave NO new llama-server (asserted twice; a pre-existing orphaned sidecar from an earlier unrelated session was recorded and excluded). Sidecar peak VmHWM 22.07 GiB (Linux basis, consistent with the 21.46 GiB vulkan peak above; the Windows-basis question is unchanged). Weights were already on the eval drive from the 2026-07-30 run; the in-app SHA-256 verify this run re-confirmed the manifest pin, so no re-download was performed.

Scorer v3 (step (a), 2026-08-03): the refusal detector missed 9 genuine abstentions across the two i9 runs (4 in 2026-07-09 incl. the "kein/keine … erwähnt" family; 5 in 2026-07-30: "keine spezifische Information", "kann … keine … finden", "I do not have information", "do not state", "there is no … mentioned"). ABSTAIN_PHRASES was extended and split-negation ABSTAIN_PATTERNS added (tests/eval/text.mjs, regression-pinned with the verbatim run answers in score.test.ts — including the audited REAL hallucinations that must stay non-matches), and eval/rescore.mjs re-ran over all four dumps. Effect audited item-by-item: the two i9 runs flip EXACTLY the nine audited items (no answerable-item flips); the committed i7 rescore changes one cell (qwen3-8b over-abstain .0118→.0235 — an answerable refusal previously read as plain wrong); devbox is byte-identical. Canonical rescored deltas vs the raw CSVs: qwen3.6-27b-q4 hallucinations .0667→0 (both runs), qwen3-8b .2→.1333, qwen3.5-35b-a3b .0667→0, qwen3.5-2b .3333→.2667 (its audit's "4–5 real" resolves to 4), E2B .40→.20 (3 real), E4B .1333→.0667 (1 real). EM/F1/citation columns are abstention-independent and unchanged.

9.4 Qwen3.8-27B wave — measured, PENDING ratification (2026-08-15)

Unsloth published Qwen3.8-27B-GGUF (dense 27B, vision-language upstream, thinking on by default, arch string qwen35) and four quants were measured the same day on the i9-9900X + RTX 3090 box: Q4_K_M, UD-Q4_K_XL, Q5_K_M, Q6_K. No manifests yet, no ranks moved — this section records the evidence; productization (manifest + hash + license review) and the §9.1 in-app smoke are open follow-ups. Text-only measurement; the upstream mmproj/vision side was not exercised (same posture as the qwen3.6-27b chat manifests).

Runtime caveat: measured on the b10430 ubuntu-vulkan release (not the b9849 pin) — the arch loads on b9849-era builds (qwen35), but the speed rows are NOT directly comparable to the b9849 CSVs and live in their own file: eval/results/i9-9900X-vulkan-b10430-speed.csv.

Quality (§2 harness, one combined 4-model run; raw files eval/results/i9-9900X-qwen38-vulkan-{quality.csv,quality-rescored.csv,items.jsonl}): all four quants land inside a .0026 F1 band — quantization does not move this eval.

Model mean F1 EM halluc abstain(unans) vs qwen3.6-27b-q4 (.3523)
qwen3.8-27b-q4 .3500 .9765 0 1.0000 −.0023 (inside cross-run noise)
qwen3.8-27b-ud-q4kxl .3507 .9765 0 1.0000 −.0016
qwen3.8-27b-q5 .3523 .9765 0 1.0000 ties; qwen3.6-27b-q5 (.3573) stays the table lead
qwen3.8-27b-q6 .3503 .9765 0 1.0000 −.0020

Zero hallucinations and perfect unanswerable-abstention on ALL four quants (the only other models with that profile: qwen3.6-27b-q5, gemma-4-26b-q4, and post-rescore qwen3.6-27b-q4

  • qwen3.5-35b-a3b). Thinking suppresses cleanly via chat_template_kwargs.enable_thinking: false (the harness's Balanced-mode default; verified — reasoning lands on reasoning_content and content stays intact). Determinism note: a repeated single-model q6 run differed by ±.002 F1 (Vulkan reduction nondeterminism); immaterial at the decision scale.

Speed/RSS (§3/§4, b10430 vulkan, each quant measured solo from a ≤45 °C GPU): rows in i9-9900X-vulkan-b10430-speed.csv. Method notes that matter for reproduction: tg is highly thermally sensitive on this box (Q6 dropped 31.7→23.6 t/s when run 4th in a back-to-back sweep — GDDR6X memory-clock throttle), so per-quant cool-start runs are the recorded numbers; pp512 under-reads on Vulkan because the burst is shorter than the boost-clock ramp (reps climb monotonically), so the pp512 column is the median of 3 reps after an in-invocation pp2048 warm-up, while pp2048/pp8192/tg are plain llama-bench averages of 3.

Quant pp512 pp2048 pp8192 tg128 peak VRAM bench / server 8k ctx peak RSS min RAM
Q4_K_M 1085 1208 1168 39.9 17.1 / 17.2 GiB 17.16 GiB 21
UD-Q4_K_XL 997 1096 1060 35.0 17.9 / 17.9 GiB 17.92 GiB 21
Q5_K_M 1057 1134 1097 35.9 19.5 / 20.0 GiB 19.70 GiB 23
Q6_K 985 1122 1092 31.7 22.2 / 22.7 GiB 22.54 GiB 26

qwen3.8-27b-q4 reproduces the qwen3.6-27b-q4 envelope almost exactly (tg 39.9 vs 40.1, peak RSS 17.16 vs 16.87 GiB) — same tier, same formula minimum. Q5_K_M out-decodes the smaller UD-Q4_K_XL (35.9 vs 35.0 t/s; K-quant kernel efficiency), which weakens the UD quant's case at this size. Q6_K fully fits a 24 GB GPU at ctx 8192 (22.7 GiB peak VRAM, no spill) — a genuine new option the 3.6 wave never had measured. CPU leg (Q4_K_M, -ngl 0, same build): pp512 118.4 / pp2048 120.1 / pp8192 118.3 / tg 2.83 t/s — the qwen3.6-27b-q4 CPU envelope reproduced (tg 2.79 on b9849); peak-RSS cells left empty (not re-measured on the CPU basis — the §9.3 Windows-basis standing rule applies before any manifest carries a number).

Wave outcome — RATIFIED (owner, 2026-08-16). The provisional read became the decision, as a full generational handover (owner call at ratification, one step beyond the default demote-to-rank-2 option): qwen3.8-27b-q4 rank 3 takes 24 GB, qwen3.8-27b-q5 rank 3 takes ≥32 GB, and the Qwen3.6 pair drops to rank 1 (below the gemma rank-2 runner-ups; still ranked + selectable; its Q5 keeps the all-time F1 record .3573 — recorded honestly in both manifests, the handover is the §6.4 generational call, not a quality verdict). qwen3.8-27b-q6 enters at rank 0 BY DESIGN — the q5 sibling wins the ≥32 GB RAM tier (faster at equal quality) and Q6_K's real niche (fully fits a 24 GB GPU at ctx 8192) is not expressible in the RAM-tier picker; it stays the selectable "24 GB GPU quality ceiling" (the gemma4-31b precedent). UD-Q4_K_XL earns no manifest (out-decoded by the larger q5 at equal quality). Productization discharged at ratification: all three manifests carry real HF-LFS hashes independently confirmed by on-disk SHA-256, and the apache-2.0 license review is recorded per manifest (full record: offline-intelligence-private/legal/ model-licensing-qwen38-addendum-2026-08-16.md). Mapping pins updated in benchmark.test.ts + committed-catalog.test.ts (new Qwen3.8 wave block). §9.1 smoke: see the wave smoke record below.

§9.1 smokes — all three quants PASSED (2026-08-16, through the app's real IPC/runtime path via CDP/Playwright _electron, dev build of this branch, i9-9900X + RTX 3090, drive runtime = the pinned b9849 linux-vulkan): the smoke drive's runtime is the b9849 pin, so this ALSO discharges the §9.4 "b10430 measurement basis" runtime-compat caveat — the pinned binary loads and serves the qwen35-arch GGUFs. Per quant (q4 / q5 / q6): in-app SHA-256 verify of the manifest-pinned weight (66 / 76 / 90 s) then start via the app's model path (useModel, GPU backend, real llama-server sidecar); balanced chat streams coherently with ZERO reasoning frames (suppression verified); Deep surfaces reasoning frames (34 / 36 / 35); grounded ask answers from an imported document with the exact fact and a correct [S1] citation (DE); mid-stream abort ends the stream in 5 / 4 / 3 ms; sidecar VmHWM 17.14 / 19.68 / 22.52 GiB (Linux basis — consistent with the §4 llama-server peaks); stopRuntime teardown leaves no chat sidecar and quit-while-running teardown leaves no llama-server of any role (embeddings / reranker sidecars legitimately idle past a chat stop and are excluded from the stop leg only). Text-only chat needed no mmproj on any quant.

MTP speculative decoding — measured 2026-08-17; ADOPTED 2026-08-19 for the Q4/Q5 manifests (issue #182); both hardware gates PASSED 2026-08-19. Adoption record: architecture.md "MTP speculative decoding — design record (issue #182, §1–§7)". The two manifests carry speculative_decoding: mtp; the runtime gates the flags on a probed GPU with the weight + 3.5 GiB free VRAM and falls back to the plain GPU rung otherwise. Issue gate 3 (CPU-only path) is closed by construction: the runtime drops the flags off-GPU. The RAM/VRAM rows below and in the manifests stay the PRE-MTP measurements until re-measured with the flag on.

Gate results (2026-08-19, i9-9900X + RTX 3090, drive runtime = the pinned b9849 linux-vulkan; Wi-Fi off, each timed run from a ≤45 °C GPU):

  • §2 grounded-QA re-run with MTP on, both quants: score parity HELD. Run per quant with HILBERTRAUM_EVAL_SPECULATIVE=mtp under its own machine label; the flag pair was verified on every scored server's argv, and a standalone b9849 spawn of the same weight logged draft acceptance = 0.81 with no blk.64.nextn.* "unused tensor" warnings, so the head was live, not a no-op. Against the committed pre-MTP baseline: qwen3.8-27b-q4 mean F1 .3499 vs .3500, qwen3.8-27b-q5 .3518 vs .3523 (f1_de .3532/.3568 both exactly reproduced; f1_en −.0004/−.0014), EM .9765, citation-correct .9882, grounded .9765 all unchanged, and the two hard metrics held on both quants: hallucinations 0, unanswerable-abstention 1.0000. Every delta sits inside the ±.002 §9.4 determinism floor, and the parity also spans the build difference (baseline measured on b10430, this re-run on the b9849 pin). Item audit: 92/100 (q4) and 91/100 (q5) answers byte-identical; each changed answer is a near-tie token flip (rephrase or citation formatting) with the same facts and the same abstention decision. Raw files committed: eval/results/i9-9900X-qwen38-mtp-q{4,5}-vulkan-{quality.csv,items.jsonl}.
  • §9.1 smoke legs with the flag on, b9849 pin, both quants PASSED (through the app's real IPC/runtime path via CDP/Playwright _electron, dev build of the #191 branch, same driver shape as the 2026-08-16 wave smokes). Per quant (q4 / q5): rung 1a taken (log shows Speculative decoding enabled (MTP draft head) and started via rung 1a (GPU auto-offload + MTP speculative decoding) (backend: gpu); sidecar argv carries the flag pair); full offload with 24 GB headroom, no spill: peak VRAM 19.7 / 21.5 GiB (pre-MTP server peaks 17.2 / 20.0 GiB, so the draft head cost ~2.5 / ~1.5 GiB here); balanced chat streams coherently with ZERO reasoning frames; Deep surfaces 32 / 31 reasoning frames; grounded DE ask answers with the exact fact and a correct [S1] citation; mid-stream abort ends the stream in 3 / 3 ms; sidecar VmHWM 17.14 / 19.68 GiB, byte-for-byte the pre-MTP §9.1 record (the draft head and its KV live in VRAM), recorded only: no recommended_min_ram_gb touched; stopRuntime leaves no chat sidecar and quit-while-running leaves no llama-server of any role. Fall-through + re-arm also exercised (q4, a shim binary rejecting --spec-type): rung 1a fails with error: invalid argument: --spec-type, the model comes up on plain rung 1 at backend: gpu, gpuAutoDisabled stays false, the next start in the same session skips 1a with latched off for this session by an earlier attempt, and Diagnostics' "Try GPU again" re-arms the rung (a fresh 1a attempt on the following start). Teardown clean.

The measurement record, unchanged: the Qwen3.8 GGUFs ship a trained-in draft head (blk.64.nextn.* — 15 tensors the server loads and ignores by default; visible as "unused tensor" warnings in every §4 log). --spec-type draft-mtp --spec-draft-n-max 2 activates it with no extra files and measured +38–45% server-level decode on the i9/3090 (Q4_K_M, b10430 vulkan, steady-state temp-0 completions: ~25 → 35.3 prose / 36.6 code t/s, draft acceptance 77–91%). Verified facts an adoption must respect: (1) works on the b9849 pin too (functionally verified); (2) costs ~2 GiB VRAM (draft head + its KV; the --spec-draft-type-k/v q8_0 + --cache-type-k/v q8_0 quartet recovers ~1.6 GiB) — Q4/Q5 keep 24 GB headroom, Q6_K + MTP does not fit 24 GB at ctx 8192; (3) breaks temp-0 byte-reproducibility (batched-verification near-tie flips; distribution-equivalent output — the §2 harness must be re-run as the adoption gate); (4) draft depths n=3/4 neither break nor help (n=4 acceptance falls to 64%) — the "n=4 emits junk" claim circulating publicly did not reproduce on this stack; n=2 is the pick. -np 1 showed no throughput effect at ctx 8192 (default n_slots=4, unified KV) — true as written, and not the reason the app adopted it on 2026-09-07 (#319): what the four slots cost is MEMORY (1,347 MiB of recurrent state on the 27B), which decides whether the model fully offloads at all. See the §6.6 2026-09-07 amendment.

9.5 The Qwen3.8 wave lost its upstream files (2026-08-20, issue #196)

What happened. Four days after the §9.4 promotion, unsloth restructured unsloth/Qwen3.8-27B-GGUF for their Dynamic 3.0 rollout and deleted the plain static K-quants. All three files the wave pins return HTTP 404 (verified 2026-08-20 with HEAD requests on the exact manifest URLs); the repo now publishes UD-* files plus legacy Q4_0/Q4_1/Q8_0 — different weights, different hashes. Hash pinning did its job: we can never silently receive substituted weights. We also cannot fetch these exact files again.

Blast radius, measured not assumed. Every committed download.url in the catalog was re-checked the same day (28 URLs, HEAD + redirects): only the three Qwen3.8 manifests are dead. The Qwen3.6 pair is intact — URL alive AND the upstream LFS OIDs still equal the committed hashes (5ed60d0a… / cfecab16…), so the tier fallback below rests on a live, unchanged source. Drives that already carry a Qwen3.8 weight are unaffected in every way: the local file still matches the pinned SHA-256, verification passes, the model starts, and MTP speculative decoding (§9.4 addendum) still applies.

Decision (interim, 2026-08-20). The measurements of §9.4 stand — nothing about the models changed, only their obtainability — so the manifests are kept as installed-base records with the dead URL, hash and size intact (option 2 of issue #196, the posture prior waves used for weight changes), plus a new machine-readable download.withdrawn note. Two consequences:

  1. Ranks. qwen3.8-27b-q4 and -q5 go rank 3 → 0 (selectable, never auto-recommended — the existing rank-0 convention, cf. the q6 sibling and gemma4-31b). The §9.4 generational handover is reverted: qwen3.6-27b-q4 retakes 24 GB and qwen3.6-27b-q5 retakes ≥32 GB at rank 3. Rationale: a recommendation the user cannot act on is worse than a slightly-older recommendation they can — and the Qwen3.6 pair is the best-measured pair on this harness whose weights can still be downloaded (q5 still holds the all-time F1 record .3573). The §6.5 stepped picks move with it (≥32 GB crawl now lands on qwen3.6-27b-q4).

  2. No estimated successors. The UD-Q4_K_M / UD-Q5_K_M / UD-Q6_K candidates are NOT productized here. Manifest numbers are measured, never estimated, and the successor files need the full per-quant wave on the i9-9900X + RTX 3090 rig (§9.4 method): SHA-256 on disk, §2 grounded-QA vs the committed baseline, §3/§4 speed + peak VRAM/RSS at ctx 8192, §9.1 in-app smokes on the b9849 pin. One extra gate for the successors: Dynamic 3.0 publishes the MTP module as a SEPARATE file (MTP/mtp-Qwen3.8-27B-Q4_0.gguf, 1.37 GB), so the speculative_decoding: mtp claim — which asserts a draft head inside the same GGUF, with no --model-draft — must be re-verified per successor file and dropped if the modules are no longer in-GGUF. Verified upstream facts as of 2026-08-20 (HF LFS metadata), so the wave starts from data rather than a re-lookup:

    successor candidate size (bytes) LFS OID (= SHA-256)
    Qwen3.8-27B-UD-Q4_K_M.gguf 16,464,440,224 322e194ff79741c7baa497c240f677f54b201b0efab44ca8e50f122b39123482
    Qwen3.8-27B-UD-Q5_K_M.gguf 19,771,509,664 2de73110cb254cbf09b54b717578dadff12ef1194e7271527e68202f39ba4bfd
    Qwen3.8-27B-UD-Q6_K.gguf 21,983,677,344 c9c206812fbe4ac7b76a729e25928b63f2ae89d37f69da7a71c20aec763cd436

    These are upstream metadata, NOT a promotion: a hash only becomes a manifest pin after the file is downloaded and hashed on disk (model-policy.md's checksum-honesty rule).

Product change shipped with this record (so the failure is legible instead of an HTTP 404): the manifest field download.withdrawn — see model-policy.md "Withdrawn upstream sources (download.withdrawn)" for the schema, the planner status, the in-app copy and the fetch-script behaviour. License posture is unchanged (same upstream repo, apache-2.0); nothing was redistributed, so no DRIVE-NOTICES regeneration is implied.

Successor wave: MEASURED, ranks RATIFIED (2026-08-20, issue #196, PR #199; i9-9900X + RTX 3090). All three candidates ran the full per-quant protocol the interim record demanded: SHA-256 confirmed on disk against the LFS OID, §2 grounded-QA on the b9849 drive runtime (Wi-Fi off, cool GPU, own CSV stems i9-9900X-qwen38ud-*), §3/§4 on the b10430 basis with the §9.4 method notes (per-quant cool starts, warm pp512 median of 3), and the §9.5 in-GGUF gate: the MTP draft head is PRESENT in all three files (spawned with the #182 flag pair on the b9849 pin, draft acceptance logged, no unused-tensor warnings), so Dynamic 3.0's external-MTP packaging does not apply at these sizes.

successor mean F1 (vs withdrawn) tg (vs) pp512w/2048/8192 peak VRAM plain / MTP peak RSS min RAM
qwen3.8-27b-ud-q4km .3529 (.3500) 32.4 (39.9, −19%) 1044/1102/1070 16.9 / 18.5 GiB 16.56 GiB 21
qwen3.8-27b-ud-q5km .3511 (.3523) 34.5 (35.9) 1039/1096/1062 20.0 / 21.3 GiB 19.64 GiB 23
qwen3.8-27b-ud-q6k .3518 (.3503) 32.6 (31.7) 978/1093/1061 21.8 / not opted in 21.99 GiB 26

EM .9765, citation-correct .9882, hallucinations 0 and unanswerable-abstention 1.0000 held on all three (the §9.4 profile intact). MTP acceptance on the successors: 0.79 (q4km) / 0.67 (q5km), lower than the withdrawn files' 0.77–0.91 band at the q5 end, still a net decode win. Two product findings: the UD-Q4_K_M decode regression (−19%) erases the §9.4 speed tie with qwen3.6-27b-q4 (which now out-decodes it 40.1 vs 32.4), and UD-Q6_K strengthens the 24 GB-GPU niche (21.8 GiB peak leaves 2.2 GiB headroom where the withdrawn file left 1.3). qwen3.8-27b-ud-q5km reproduces the withdrawn file's envelope (quality inside tolerance, VRAM identical, −4% tg).

Ranks RATIFIED (owner, 2026-08-20): the full §9.4 generational handover is restored with the successors. qwen3.8-27b-ud-q4km rank 3 takes 24 GB and qwen3.8-27b-ud-q5km rank 3 takes ≥32 GB; the Qwen3.6 pair returns to rank 1. The owner call: the quality differences across these quants sit inside cross-run uncertainty, and the newest generation is preferred on overall capability; the q4 successor's measured decode regression is recorded in its manifest and accepted knowingly. qwen3.8-27b-ud-q6k stays rank 0 by design (the "24 GB GPU quality ceiling" selectable, unchanged reasoning from §9.4). Two consequences of that order, stated here rather than left to be rediscovered: the three withdrawn manifests are kept, not retired — rank 0 with their dated download.withdrawn note, so a drive that already holds one still verifies, starts and keeps MTP (this wave's answer to the retire-or-keep question model-policy.md defers to the promoting wave), and the §6.5 stepped pick now steps a crawling ≥32 GB box down to qwen3.8-27b-ud-q4km at 32.4 t/s rather than to qwen3.6-27b-q4 at 40.1 — the step-down path follows rank, so it inherits the ratified preference for the newer generation over the faster file.

§9.1 smokes on the b9849 pin, through the app's real IPC path (same driver as the wave smokes; run with Wi-Fi ON as a recorded deviation, the user needed the link and the offline property was already established by the §2 legs): per successor (ud-q4km / ud-q5km / ud-q6k), in-app SHA-256 verify + start via useModel, balanced chat zero reasoning frames, Deep surfaces reasoning frames, grounded DE ask exact fact + [S1], mid-stream abort ≤5 ms, stopRuntime and quit-while-running teardowns clean; the MTP successors additionally verified rung 1a selection with the code-owned flag pair on the sidecar argv (peak VRAM 19.0 / 21.4 GiB with the head live). VmHWM 16.54 / 19.62 / 21.97 GiB, consistent with the §4 numbers above.

9.6 The gemma4-12B checkpoint was re-uploaded, not deleted (2026-08-20, issue #201)

What happened. gemma4-12b-it-qat-q4 pins google/gemma-4-12B-it-qat-q4_0-gguf/gemma-4-12b-it-qat-q4_0.gguf. On 2026-07-17 Google pushed repo commit 29d09777 — "Upload validated QAT GGUF checkpoint (280 sequence length, corrected vocabulary)" — replacing the file's bytes at the same path. The URL therefore stayed alive (302 → CDN, no 404) while serving a checkpoint the manifest's sha256 does not match: the in-app downloader and both fetch-models twins would pull ~7 GB and then fail verification, with a message the user cannot act on. Drives already carrying the old weight were unaffected — their local file still matched the old pin.

This is the quiet counterpart to §9.5's loud failure, and it is exactly the class the §9.5 sweep did not test: it checked liveness catalog-wide and hash equality for the Qwen3.6 pair only, so this drift went unseen for five weeks (found by the 2026-08-20 docs/code audit, finding B-1). The prevention landed with the finding: model-policy.md "Re-verifying the catalog against upstream" now makes the periodic check compare the upstream LFS OID, not just the status code — and records the trap that makes step 2 easy to get wrong (a redirect-following HEAD returns the CDN's ETag, never the LFS OID, so every HuggingFace manifest reads as a false mismatch; read x-linked-etag / x-linked-size off the huggingface.co 302, or the tree API's lfs.oid / lfs.size).

The upstream numbers, re-derived by both methods 2026-08-20 (they agree, and they agree with the on-disk hash of the downloaded file):

committed before this wave corrected checkpoint
sha256 faff1a63667fac17ac5e777f47114688fcefea96e220e211aaa8d62c2c4561f1 93567e57a8fe10b23569b9d9ec38cd005deedf71e29477c421a4b83f418a538b
size_bytes 6975877728 6975879296 (+1,568)

The wave (i9-9900X + RTX 3090, 2026-08-20). "Corrected vocabulary" is precisely the kind of change that can move tokenization-sensitive scores, and this model's rank-2 standing rests on the Phase-29 verdict — so parity was treated as a result to be measured, not an assumption. Both checkpoints ran back-to-back, same harness, same day, temp 0 (Wi-Fi on, a recorded deviation from the §0 convention per the owner's standing instruction for this box). The old pinned file was re-hashed the same day and still equalled faff1a63…, so the comparison is between exactly the two checkpoints in question.

old (pinned) corrected delta
mean F1 .3399 .3399 0
EM / citation-correct / grounded .9765 / .9882 / .9765 identical 0
abstain(unans) / hallucination .9333 / .0667 identical 0
f1_de / f1_en .3470 / .3293 identical 0
peak RSS @ ctx 8192 (b10430 basis) 7,917,560 kB 7,917,516 kB −44 kB
peak VRAM @ ctx 8192 9,720 MiB 9,720 MiB 0

All 100 of the §2 answers are byte-identical between the two checkpoints — not "within tolerance", identical strings. The re-typed vocabulary tokens are provably inert for this model's §2 behaviour, so the rank-2 standing carries over on evidence. (Both runs also match the committed post-rescore baseline .3399.) The §9.1 in-app legs all pass on the b9849 pin, run against a local, temporary, since-reverted manifest pin of the new hash: in-app SHA-256 verify + GPU start in 30 s, balanced chat streams with zero reasoning frames, Deep surfaces 221 reasoning frames (the flipped supports_thinking_mode: true behaviour reproduces on the corrected file), grounded DE ask answers with the exact fact and a correct [S1] citation, mid-stream abort ends the stream in 4 ms, sidecar VmHWM 7.53 GiB, stopRuntime and quit-while-running teardowns clean. Raw rows: eval/results/i9-9900X-gemma4fix-{old,new}-vulkan-{items.jsonl,quality.csv}.

Two observations kept because they look like defects and are not.

  1. Loader warnings. The corrected file emits two control-token override warnings the old file does not (control-looking token '</s>' was not control-type … will be overridden, same for <|tool_response>; the old file: zero such warnings). This is the vocabulary correction being visible at load — llama.cpp re-types those tokens, and neither plays any part in our chat-template path. Inert, not a regression.
  2. Template-less /completion junk. A raw /completion call with no chat template returns junk on both checkpoints identically — pre-existing instruction-tuned Gemma template dependence, unrelated to the correction. The §2 harness and the app both use the chat-template path.

Memory basis, stated so it is not mistaken for a retune. The absolute RSS numbers above sit on a different measurement basis than the historic ~10.6 GiB the recommended_min_ram_gb: 14 / recommended_ram_gb: 24 lines derive from. Per the §9.3 Windows-basis standing rule this wave implies no RAM retune; what it establishes is that the substitution does not move the envelope.

Decision (owner, 2026-08-20): repoint the manifest IN PLACE — both sha256 fields and size_bytes — rather than entering a successor id. This deliberately departs from the §9.5 / issue-#196 precedent, and the reason is that the two situations differ where it matters: there the files were deleted, so the withdrawn manifests had to stay as installed-base records; here the file was superseded at the same path, and the wave measured the two checkpoints as indistinguishable on every surface we ship. A successor id would therefore put two provably indistinguishable entries in the catalog — the cost the #196 posture buys nothing against.

Accepted cost, stated plainly: a drive that already holds the old checkpoint now reports checksum_failed against the new pin and heals by re-downloading ~7 GB. The blast radius is small — bundled_on_preconfigured_drive: false, and the model is not in the --with-assets default set — so no preconfigured drive ships the stale bytes. Recorded for users in known-limitations.md ("Model catalog & downloads") and in CHANGELOG.md, since a model that was downloadable now needs a re-download for anyone who already had it. No interim download.withdrawn note was set: the evidence was in, so the fix landed directly.

License posture unchanged — same repo, same vendor QAT Q4_0 quantization, same Apache-2.0 card tag, text-only use (the repo's mmproj vision file is still deliberately unreferenced). Nothing was redistributed, so no DRIVE-NOTICES regeneration is implied.


10. Skills extraction & real-model smoke (skills-remediation T1, audit §7)

Two offline guards for the skills extract/analysis paths — one always-on, one opt-in — added by skills-remediation Phase T1. They close the two audit §7 test-blindness classes: committed extractor fixtures were synthetic and post-hoc (built to match the parser, so every real-layout incident — INVOICE-TOTALS-1, the HVB zero-transactions case, the §5.3 NBSP/Unicode family — slipped through), and NO skill path was ever exercised against a real model (the same class that shipped the RUNTIME-5/6 vision salad).

10.1 Real-layout fixture corpus + output-snapshot guard (always on, in npm test)

tests/fixtures/real-layouts/corpus.ts is the single committed home for the extractor incident-class fixtures — constructed AT/DE/CH bank statements + invoices (never real user documents, special characters written as \u escapes so a git/editor normalization can't silently defeat the incident class) carrying the layouts that actually broke: NBSP / narrow-NBSP thousands grouping, U+2212 / en-dash minus signs, the German Summe / Summe netto / Endbetrag / Rechnungssumme totals labels, SEPA rows, dd.mm.yy + cross-year dates, and wrapped descriptions. tests/integration/skills-extractor-corpus.test.ts runs the corpus through the REAL production extractors (the same currency-vote / date-order / anchor inference the tool does) and asserts the parsed figures, AND pins a per-fixture hash of the full extractor output in extractor-output.snapshot.json, keyed by BANK_EXTRACTOR_VERSION / INVOICE_EXTRACTOR_VERSION. Each entry also stores an input hash so the guard can tell a corpus edit apart from an extractor change: an output change on UNCHANGED fixture input means the extractor moved, and MUST bump the version; an output change because a fixture was edited needs no bump. Any output change FAILS the default suite until the snapshot is regenerated — and regeneration itself REFUSES to write when the output moved for unchanged input without a version bump, so the rule cannot be silenced by regenerating alone:

UPDATE_EXTRACTOR_SNAPSHOT=1 npx vitest run tests/integration/skills-extractor-corpus.test.ts

This is the mechanical backstop for the repo rule "every extractor behaviour change bumps the version by exactly 1 so stale rows re-extract" — no model, no network.

10.2 The opt-in real-model smoke (SKILLS_SMOKE_MODEL)

tests/e2e-model/skills-smoke.test.ts, the same env-gated pattern as the vision / gpu / rerank smokes (§8.1) — describe.runIf keeps it COLLECTED (the full-suite guard) but SKIPPED in CI, so the green gate stays zero-model / zero-network:

# from the repo root; <drive root> holds runtime/llama.cpp/<os>/
$env:SKILLS_SMOKE_MODEL = "<chat .gguf>"
$env:SKILLS_SMOKE_ROOT = "<drive root>"
npm test -- tests/e2e-model/skills-smoke.test.ts

It drives the REAL production answer paths against a local chat GGUF (CPU-pinned, --device none): the invoice + bank THIRD MODE (grounded-data — the model NARRATES the deterministically-verified extract with the figure echo appended verbatim beneath) over the real-layout corpus, plus one German whole-document minutes turn. It asserts STRUCTURE + FIGURES (the third mode engaged; the deterministic totals / cashflow echo rides under the model answer; whole-doc coverage is capped + not truncated; end-of-transcript items present) — never prose / wording. This is the autonomous stand-in for the manual GUI smoke of the three complaint flows (bank statement, invoice, minutes). Both variables are required (the smoke skips cleanly without them); HILBERTRAUM_LLAMA_BIN is an optional dev override for the server binary.


11. Translation model (TranslateGemma 12B) — TG-6 measurements + the promotion bar

The translation role (design record in architecture.md "Translation sidecar — design record") is a THIRD benchmark axis, separate from the chat catalog (§1–§7) and the vision sidecar (§8): a different role (translation), served by its OWN lazy llama-server on the raw /completion endpoint (NO --jinja, --chat-template gemma, --parallel 1, --ctx-size 4096; since issue #42 the device posture follows gpuMode/gpuAutoDisabled — GPU auto-offload by default, --device none when forced to CPU). The §11.2 numbers below are the CPU-decode measurements (recorded under the original TG-2/TG-6 CPU pin); the GPU posture's tokens/sec is the open §11.4 re-smoke. The only shipped model is translategemma-12b-it (mradermacher Q4_K_M, 7.30 GB, sha256 b7aac4b4…a528). Numbers below are the real b9849 Vulkan-pin measurements captured by the TG-6 run of the manual smoke + llama-tokenize (drive root junctioned to D:\, 2026-07-05).

11.1 The manual smoke harness (HILBERTRAUM_TRANSLATEGEMMA_SMOKE)

tests/manual/translategemma-smoke.test.ts, the same env-gated pattern as vision/gpu/rerank/skills (§8.1, §10.2) — SKIPPED in CI (zero model/binary/network). It composes LlamaServer with the SHIPPING translationServerArgs(device) and drives the SHIPPING prompt builder + /completion reader, so it proves model + prompt + endpoint fidelity on the real pin AND records the calibration numbers. The device posture defaults to the shipping 'auto' (GPU auto-offload); set HILBERTRAUM_TRANSLATEGEMMA_SMOKE_DEVICE=cpu to re-measure the forced-CPU posture the §11.2 numbers were recorded on:

$env:HILBERTRAUM_TRANSLATEGEMMA_SMOKE = "<root with runtime/llama.cpp/<os>/llama-server + models/{translation,embeddings,chat}/*.gguf>"
cd apps\desktop
npx vitest run tests/manual/translategemma-smoke.test.ts

Legs: (1) load on the pin (#22908 risk); (2) /props chat_template = gemma (V1 reconcile); (3–6) DE↔EN sanity + verbatim identifiers + injection-resistance + no <end_of_turn> leak; (7) sidecar peak RSS; (8) per-language round-trip for the curated 10; (9) Gemma tokens-per-word (input via /tokenize per source lang; output per source word into the heavy targets); (10) co-residency peak RSS (translation + E5 + a resident chat). GATE: if the pin can't load or /completion breaks (#20305-adjacent), STOP — do not ship. (Tokens-per-word amortized over realistic-length prose is measured with llama-tokenize directly — the per-window planner operates on hundreds of words, so the short in-smoke sentences over-state the ratio; §11.2 uses the amortized numbers.)

11.2 Measured (real b9849 Vulkan pin, CPU decode)

Datum Value Note
Weight translategemma-12b-it.Q4_K_M.gguf — 7.30 GB Gemma license; downloadable behind the license-ack gate; NOT bundled
Peak RSS (sidecar alone) ≈ 9.3 GiB --device none, ctx 4096 (PeakWorkingSetSize; TG-2 saw ≈9.5)
Peak RSS (co-resident) ≈ 13.2 GiB translation ≈9.2 + E5 embedder ≈0.14 + a 4B chat ≈3.9, all warm at once — the doc-task materialize shape (D9)
Cold load ≈ 26–37 s warm OS cache ~26 s; cold-from-USB ~37 s (TG-2)
CPU decode ≈ 3–4 tok/s (nominal) ranged 1.1–4.4 across the TG-6 run under machine load; TG-2 clean run 3.7–4.0
Input tok/word (Gemma, prose) en 1.11 · de 1.43 · nl 1.65 · uk 2.13 · pl 2.19 · cs 2.26 llama-tokenize over realistic office prose; a token-dense 20-word invoice line peaks ~2.8
Output tok/source-word (prose) en→de 1.39 · de→pl 1.79 · de→uk 1.90 · de→cs 1.96 word-sparse German source → token-dense target, the worst case; dense short samples reach ~3.06
Fidelity (curated 10) round-trip OK for all ten; invoice no. + model code verbatim; numbers LOCALIZED; injection resisted; no stop-token leak the recorded evidence the widened TranslationLangCode cites

Issue #31 (2026-07-07) widened the SHIPPED language set from these curated 10 to the 51-code WMT24++ production tier (architecture.md "Translation sidecar" record, issue-#31 bullet). The fidelity row above remains the LOCAL evidence for the original 10; the widened 41 ship on the model's own WMT24++ evaluation (12B: MetricX-24 3.60 / COMET22 83.5). The smoke's calibration leg still measures the 10 (SMOKE_LANGS) — a 51-language sweep at ~3–4 tok/s CPU would run for hours; add a sample there to promote a widened language into the measured set. The tokens-per-word planner ceilings stay safe on the widened space-less scripts (ja/zh/th/…): approxTokenCount charges those per-character, which over-counts vs the real tokenizer — the same over-chunk-never-overflow direction.

The load-bearing TG-6 finding — the Qwen-era planner constants were unsafe on the Gemma tokenizer. The chat path's 1.3 input / 2.0 output tokens-per-word (measured on Qwen3-4B, carried as "conservative defaults" through TG-3) are HALF the real Gemma weight (up to 2.26 input / 1.96 output on realistic prose, higher on dense content). Left unfixed, a full ~1,150-word window (what the chat estimate implied) would have been ~3,200+ input tokens ALONE — blowing past both the 2K trained input AND the launched 4096 context (silent input/output truncation). TG-6 replaced them with measured-then-rounded-UP ceilings (TRANSLATION_INPUT_TOKENS_PER_WORD = 2.5, TRANSLATION_OUTPUT_TOKENS_PER_WORD = 3.0, doctasks/translation.ts — a translation-specific input constant, NOT the shared chat-model SUMMARY_TOKENS_PER_WORD) so a window can only ever OVER-chunk (harmless), never overflow. Consequence: **690-word windows** at ctx 4096 (more, smaller than the old estimate; windowMaxTokens ≈ 2,071), the honest cost of the heavy tokenizer. Over-chunking is the only failure mode; the doc-task suite's "fit property" proves input estimate + output cap ≤ the usable context at every context size.

#512 amendment (2026-09-27): the constants are 2.8 in / 3.1 out. The translategemma smoke prints RAISE on b9849 and on b11146 alike because its short 19–23-word samples reach 2.79 input / 3.06 output tokens per word. Those are the short-sample peaks already recorded above, not a prose rate; realistic prose stays at ≤ 2.26 / ≤ 1.96. The owner raised the constants anyway, on the curated-10 basis (the other 41 languages were not measured), as a deliberate margin for token-dense text. At ctx 4096 the D4 clamp now binds at 642 words (the context split would allow 643) with windowMaxTokens 1,998; a full window of ~2.8 tok/word text is ≈ 1,950 real input tokens with the scaffold, under the trained 2K (it was ≈ 2,080 at 690 words). The cost is about 7 % more windows per document. Against the measured 2.79 / 3.06, the smoke's verdict for both constants becomes SAFE.

Decisions revisited at TG-6:

  • D8 (GPU) — TG-6 kept the CPU pin for v1 (~3–4 tok/s tolerable for a BACKGROUND doc-task with per-window progress + instant cancel; the smoke drive was Windows Vulkan where #25142, the parallel-translation hang, was the live risk; GPU deferred, not rejected). Superseded by issue #42 (2026-07-09): the sidecar now honours gpuMode/gpuAutoDisabled per cold start (GPU auto-offload by default) with a forced-CPU fallback + session latch on a GPU fault — see §11.4 for the ladder and the OPEN GPU-decode re-smoke. #25142 stays contained by --parallel 1 in both postures. The per-window request timeout stays at the CPU-sized 45 min (DEFAULT_REQUEST_TIMEOUT_MS): a ~2,000-token full window at the observed-worst ~1.1 tok/s is ~30 min, so 45 min never false-kills a live slow CPU decode while still bounding a true hang (user cancel stays instant; on a GPU decode the bound is simply generous). #605 (2026-10-08): a hung sidecar now ends much sooner. The stream has liveness clocks: 2 min with no token, 10 min with no progress per 512-token prefill batch, 2 min of total silence, and 3 min for the response headers. The hung sidecar is restarted for the window's retry. The 45-min cap remains only for a decode that is alive but too slow. The calibration is in architecture.md, translation record, "#605 amendment".
  • D9 (chat-during-translation relaxation) — KEEP serialization. The co-residency measurement is the reason: translation ≈9.2 GiB + a resident chat + embedder already reaches ≈13.2 GiB with a 4B chat; a 12B chat (≈6.5 GiB) pushes the pair PAST a 16 GB machine. Letting chat DECODE during a translation would put two large models under active compute + full RAM at once — infeasible on the target hardware. The doc-task lane + the view-job docTaskBusy guard stay.
  • min-RAM (D10): recommended_min_ram_gb = 13, recommended_ram_gb = 24 (PR #30, 2026-07-07 — corrected from the TG-6 initial 17/32). recommended_min_ram_gb is the HARD start gate (registerModelIpc §11.4 refuses a model whose min exceeds the machine's RAM), and the catalog convention — every chat manifest and the vision role model (§4 / §8.4 PROD-1) — is that this gate is the model-alone floor: the §4 rule (peak + ~3 GiB headroom, rounded up) applied to TranslateGemma's OWN peak RSS 9.22 GiB ⇒ 9.22 + 3 = 12.22 → 13. That lands with the rest of the catalog (ministral 8.7→12, gemma4-12b 10.6→14) and, crucially, clears the gate on a standard 16 GB machine. The co-residency floor (translation ≈9.22 + E5 ≈0.14 + a small 4B chat ≈3.89 = 13.24 GiB, excluding the Electron shell + OS) belongs in recommended_ram_gb, not the hard gate — a 12B resident chat (≈6.5 GiB more) pushes the pair toward ~24. On a 16 GB box that co-residency pressure is handled exactly as for vision (§8.4): the chat sidecar's idle-teardown + the RAM-best-fit picker, not by blocking the model from ever loading. Why the change: the original 17 baked the co-residency floor into the hard min — the only manifest to do so — which locked translation out of every 16 GB machine even though the model alone fits with headroom. The D9 serialization decision above (chat does not decode during translation) is what keeps the co-resident case safe; the hard gate does not need to. Regression is guarded by tests/integration/committed-catalog.test.ts ("RAM start-gate invariants").

11.3 The promotion bar — what a future translation candidate must beat

Same discipline as §9 (the Qwen3.5 wave) and §8.3 (vision): public MT benchmark scores are NOT a promotion signal here. WMT24++ MetricX/COMET (4B 5.32/80.1, 12B 3.60/83.5, 27B 3.09/84.4) is why the 12B was chosen over the 4B, but a NEW candidate (a TranslateGemma 4B/27B — manifest-only follow-ups per the plan's O3/§6 — or a successor family) earns recommendation_rank > 0 ONLY by beating the shipped 12B on the LOCAL evidence:

  1. The TG-6 smoke passes on the pin — loads, /completion clean (no #20305/#22908), the curated 10 round-trip with verbatim identifier/number preservation, injection-resistant, no stop-token leak.
  2. Tokens-per-word re-measured for its own tokenizer (the planner constants are model-specific — a different tokenizer needs its own llama-tokenize sweep; do NOT inherit the 2.8/3.1).
  3. Peak RSS (sidecar-alone AND co-resident) measured → its own recommended_min_ram_gb.
  4. CPU tok/s measured → the per-window timeout + the D8 GPU decision re-run for that model.
  5. Translation quality judged on the SAME per-language round-trips (fidelity, localization, injection-resistance) — a smaller model must not regress German/Slavic/Cyrillic fidelity, a larger one must justify the RAM/latency it costs.

A candidate that only looks better on paper stays recommendation_rank: 0 (manual, never auto-recommended, never bundled) until the local evidence gives it a real rank. Image translation (the model is image-text→text; mmproj projectors exist) stays out of scope (the plan's §6): a later Images-screen integration, not a benchmark axis here.

11.4 GPU offload (issue #42) — the device ladder + the OPEN GPU-decode re-smoke

Issue #42 (2026-07-09) pulled TG-6's deferred D8 forward. As built (translation/runtime.ts, regression-pinned in translation-runtime.test.ts's "GPU device ladder" suite):

  • Signals: the sidecar reads the SAME Settings callbacks the chat ladder gets (gpuMode + gpuAutoDisabled, one shared gpuSignals object in main/index.ts) — re-read per cold start, so with the 2-min idle teardown a Settings flip takes effect on the next translate, no restart.
  • Postures: allowed ⇒ translationServerArgs('auto') — NO device args (the pin's defaults -ngl auto + --fit on, VRAM-aware offload; unchanged from b9849 to b11146, re-checked against --help 2026-10-13, #660; a GPU-less machine lands on CPU exactly as before, though its load log still claims offloaded N/N layers, so since #671 the start's own GPU buffers say where it ran). gpuMode: 'off', a persisted gpuAutoDisabled, the session fallback latch, or (since #473) the headroom gate choosing the processor (no full fit beside the chat model, or a chat start pending) ⇒ translationServerArgs('cpu') (--device none — never -ngl).
  • Fallback: a non-bind-race GPU start failure retries ONCE at forced CPU within the same start; a mid-session crash of a GPU-composed sidecar arms the same session latch (the chat §5.3 auto-fallback shape). Only the final CPU rung failing arms the permanent startFailed latch (F-7). The latch is session-only and never writes the global gpuAutoDisabled — a 12B translation fault must not force the (smaller) chat model into compatibility mode; chat's own ladder owns that flag.
  • #25142 containment: --parallel 1 ships in BOTH postures — the upstream hang was under parallel Vulkan translation load; translation stays strictly sequential.
  • Cold-start observability (issue #42 reopen, 2026-07-10): the runtime parses the server's own load log (load_tensors: offloaded X/Y layers to GPU on stderr — the only place the real --fit outcome is reported; /props does not carry it) and (a) logs every successful cold start ("Translation sidecar started" with posture + the layer split, symmetric with the chat ladder's "started via rung …" line), and (b) exposes it as TranslationRuntime.deviceStatus() → getAppStatus().translationDevice → the Translate screen's muted #36-style device hint. The hint's PARTIAL-offload form ("{done}/{total} layers — about processor speed", tooltip naming the cause + remedy) is the point: without it a --fit partial offload is indistinguishable from "GPU translation not working". Last-known values survive the idle teardown (live: false) so a finished run stays explainable. #671 (2026-10-13): the split alone is no evidence of a card. TranslateGemma's load log reads offloaded 49/49 layers to GPU with no usable device and under --device none, every buffer on the processor (b11146 and b9849, measured), so the runtime reads the log with the chat runtime's placement parser and records whether a buffer landed on a graphics device (gpuBuffers). A start that put none there shows the processor form, and the Performance row shows no split for it (architecture.md translation record, "#671 amendment"). Pinned in translation-runtime.test.ts ("cold-start device observability", three real captures), core-model-ipc.test.ts (the status feed), and TranslateScreen.test.tsx (the hint forms).

Field datapoint (issue #42 reopen — v0.1.46, RTX 3090 24 GB, Linux/Vulkan, b9849, translategemma-12b-it.Q4_K_M, the shipping translationServerArgs('auto') at ctx 4096):

  • ~13 GB VRAM free → full offload, 7.8 GB VRAM, 75.7 tok/s decode / 140 tok/s prompt — vs the §11.2 ~3–4 tok/s CPU calibration (≈20× decode).
  • VRAM contention: with a large chat model resident (gemma-4-26b-q4, ~16 GB), --fit squeezes TranslateGemma into the ~7 GB remainder → partial offload at roughly CPU speed, silently. The split is pinned per COLD START — freeing VRAM mid-session helps only once the 2-min idle teardown forces a fresh fit. This is the case the observability bullet above makes visible; known-limitations.md (Document translation) records the user-facing shape + remedy.
  • #473 (2026-10-12): because that squeezed fit ran at about processor speed, a translation start now uses the card only when it fully fits beside the chat model, and otherwise runs on the processor (architecture.md GPU record §9). The gate judges with the manifest's estimate, calibrated on a full-offload capture of this sidecar (b11146, RTX 3080 Ti): 6,956 MiB of weights + 736 KV + 119 compute = 7,811 MiB on the card, 787.69 MiB of weights host-mapped — estimate 8,892 MiB (1.14×).

OPEN — the GPU-decode re-smoke (owner, PAID/GPU drive). The §11.2 tokens/sec are CPU numbers; no GPU decode of TranslateGemma has been measured on the owner harness yet — the community datapoint above answers the architecture-risk question, but the recorded §11.2-grade evidence should still come from the owner run. On a drive with the pinned binary (b11146) + the TranslateGemma GGUF and a real GPU:

$env:HILBERTRAUM_TRANSLATEGEMMA_SMOKE = "<root with runtime/llama.cpp/<os>/llama-server + models/translation/*.gguf>"
# default device posture = 'auto' (the shipping GPU auto-offload); no extra env needed
cd apps\desktop
npx vitest run tests/manual/translategemma-smoke.test.ts

Record here: tokens/sec per leg (vs the ~3–4 CPU), peak RSS/VRAM split, cold-load time, and whether --fit partial offload engages beside a resident chat model (the D9 co-residency shape — the field datapoint above already demonstrates both sides of it). Until this lands, the ladder's safety net (CPU fallback + session latch) is what ships the risk down: a machine where GPU translation misbehaves degrades to exactly the TG-6 CPU behavior after one failed start.


12. Document redaction / edit locate pass — gold set + the real-model manual harness

The format-preserving document transforms (redaction v2 + targeted edits — architecture.md "Skills — design record" §21/§22/§23, beta-feedback wave 1) rest on a LOCAL-MODEL locate pass: the model proposes spans/edits, the app VERIFIES each verbatim and splices mechanically (it never generates output text, D73). Two guards, the same split as §10 (skills) and §8/§11 (vision/translation): a deterministic CI gold set that pins the PIPELINE, and an opt-in real-model harness that measures the MODEL's locate quality — public NER/instruction-following scores are not a promotion signal here.

12.1 The CI gold set (always on, zero model / zero network)

tests/fixtures/gold-set/legal-corpus.ts holds SYNTHETIC, lawyer-shaped German documents (a Vollmacht, a Mandantenbrief carrying names/addresses/IBAN/email/phone/dates — never real user data, same rule as the §10.1 real-layout corpus), each with the exact model reply a scripted (mock) runtime replays. tests/integration/skills-gold-set.test.ts drives them through the redaction and edit pipelines at the pure level (redactWithEntities / verifyAndSpliceEdits, which expose the drop-unverifiable count + the span union), and the edit case also through the run seam with the scripted runtime, incl. the Phase-9 same-format DOCX round-trip (the redaction run seam is covered by skills-redaction.test.ts). It pins the STRUCTURAL guarantees only: verbatim verify, every-occurrence sweep (D75), occurrence precision (D76), the drop-unverifiable path, per-char masks preserving line length (D74), and every non-document.xml DOCX part byte-identical (D77). It never asserts model judgement — the scripted reply IS the "model", so this proves the app around the model, not the model.

12.2 The real-model manual harness (PAID_*, not CI)

A human pre-promotion gate — a real chat GGUF must actually FIND the names/addresses in these documents before we claim the locate pass earns its keep. This is a PAID_* manual harness on the smoke drive (a locally provisioned drive with the b9585/b9849 binary + a real chat GGUF; the D:\ root convention of §8/§10.2/§11.1), run offline, results recorded in BUILD_STATE. There is no committed e2e-model file yet (the pipeline is exercised end-to-end by the gold set with a scripted runtime); until one is added, run it by hand through the APP per the checklist below.

Acceptance bar — the locate pass, over the §12.1 gold documents through the running model:

  • names + street addresses located — the Vollmacht's Maria Huber / Johann Berger / Ringstraße 12 and the letter's Elisabeth Klein / Hauptstraße 5 / Franz Gruber are all proposed (the deterministic floor cannot find these — the model must).
  • steerability holds — with "…, keep city names" the city (Wien / Linz) is NOT proposed; widening/narrowing the instruction changes what is proposed, never what the app interprets.
  • sweep coverage — a name reported once is masked at EVERY occurrence in the saved file (D75).
  • a dense, multi-window document is covered (#622) — the gold documents above fit one short window, so they never exercised the reply room. Redact a document of many records (e.g. 50 register entries, each with a name, an address and a company) on the smallest supported context (4,096) and count the names still visible in the saved copy: none. Before #622 a 768-token reply cap left 8 of 10 such names visible while the run reported success (architecture.md Skills record §21 "#622 amendment").
  • no hallucination reaches the output — anything the model proposes that is not present verbatim is dropped and counted; the saved bytes outside a mask are byte-identical to the source.
  • the regex floor still runs — IBAN/email/phone/date are masked whether or not the model ran; model-missing DEGRADES to the floor with the honest note, never a silent partial.
  • the edit locate pass — "Vollmachtgeber → Vollmachtgeberin incl. the article" changes only the anchored occurrences (the defined-term line stays), no whole-document regeneration (#23).

12.3 End-to-end eyeball (owner manual harness — POSIX + a running model)

The real-app "redact + edit a DOCX and a PDF and look at the result" eyeball needs a running model AND is POSIX-only (the screenshot-verify / electron-eyeball path is nix+xvfb; this is a Windows dev box) — so it is an owner manual harness, not run in CI. Through npm run dev with a chat model started on the AI-Model screen:

  1. Import a DOCX and a PDF that carry names + addresses + an IBAN (a copy of the §12.1 fixtures saved as real .docx / .pdf works).
  2. In chat, ask to redact each ("Entferne alle Namen und Adressen, die Stadt darfst du behalten"), confirm the export, save the copy.
  3. In chat, ask a targeted edit on the DOCX ("Ändere Vollmachtgeber zu Vollmachtgeberin samt Artikel"), confirm, save.

Acceptance (the #22/#23 criteria):

  • names + addresses masked; the kept city survives; IBAN/email/phone/date masked by the floor.
  • the redacted .docx opens in Word with styles/numbering/tables/headers intact; only the masked text changed (a diff of the extracted text shows only the located spans changed).
  • the PDF/.txt output preserves line layout (per-char █), extraction-faithful.
  • the edit changed ONLY the requested occurrences — no rewritten paragraphs, no hallucinated prose.
  • the run bar shows the honest report (counts, dropped-unverifiable, "review before sharing").

Status (2026-07-07): the CI gold set (§12.1) is committed and green. The real-model harness (§12.2) and the e2e eyeball (§12.3) are deferred to the owner — a real chat model + a running app (and, for the eyeball, a POSIX host) are required and neither can run in CI on this Windows dev box. The run-bar wiring itself is covered by the descriptor/i18n-parity + SkillRunBar renderer tests (architecture.md §21/§22 "Tests"); no renderer surface changed in Phase 10.