harness: the multi-turn recall gate, and its README row

Twenty turns of a transcript that outgrows a 32 768-token ring, streaming off
against --kv-resident, a fact planted at turn 2 asked at turn 20; the off arm
must hit the cache and the on arm must stream, or the run is not a reuse test.
This commit is contained in:
C_Tamas committed 2026-10-24 20:23:24 +07:00
1 parent e54e570bf1
commit a886d2a6ec
2 files changed
+254

No files matched your search

+1
View File
@@ -41,6 +41,7 @@ and `agentreplay.py` need `python3`. Scripts find each other through `$(dirname
| `kv-resident-vs-stock.sh` | The shipped comparison, paired: interleaved ABBA rounds of this build with `--kv-resident 32768` against the stock 1.10.0 image without it, one cold start per request (a second request in one process starts from a partly filled ring, a different workload). One paired delta a round, reported as the mean, the per-round values and a t interval; `ROUNDS` sets the resolution (~2.8% at 2, ~2.0% at 4). Every start is asked `/tokenize` for the canonical 16 110-token prompt and must answer that count, and every response's `usage.prompt_tokens` must agree again with `cached_tokens` 0, so both arms are provably on the same input. |
| `kv-union.sh` | How large a KV streaming ring has to be: the union of distinct blocks one `kv_resolve` launch selects, at 64k/128k-token prompts, climbed from the 32 768-token floor (8 192 blocks — the smallest ring this box runs and one the engine does not raise) until no launch overflows. Reports resolves, lookups, misses, the largest single-launch union and prefill wall time, plus the overflow refusal verbatim; its last arm decodes a sparse prompt whose ~34k-token history already exceeds the floor ring and compares with streaming off (no `--kv-resident`), and refuses to pass unless the ring actually evicted (misses above the peak union). Pressure is the context: the short-context points of the record are gone because a 4k/16k context fits the floor ring and streams nothing. |
| `kv-parity.sh` | That a `--kv-resident` ring covering the group's context changes no output byte and streams nothing: one server per arm, a dense and a sparse prompt with no flag and with `--kv-resident 4096` (its `--max-model-len x --max-num-seqs`), compared byte for byte, plus `--profile-ops` proving `kv_resolve` is never issued and the startup line saying nothing streams -- the base engine's path. |
| `kv-multiturn-recall.py` | Whether a planted fact survives twenty turns of a conversation whose history outgrows the ring: one server per arm, the same transcript with streaming off and with `--kv-resident 32768` under `--max-model-len 65536`, a code planted at turn 2 and a surname at turn 5 asked at turn 20 (~49k prompt tokens there), the answers checked value by value. Refuses to pass if the off arm did not hit the cache on nearly every continuing turn (a cold prefill is not a reuse test) or if the on arm streamed nothing. Started and killed per arm, nothing else signalled. |
| `kv-stage-parity-64k.sh` | Phase 2's prefill staging: streaming off (no `--kv-resident`) against `--kv-resident 32768` (the floor, 8 192 blocks) on a ~64k-token document, so every prefill chunk past 32 768 tokens has a history the ring cannot hold and must take the one-layer stage view instead of resolving; byte-identical output, the staged-copy trace counted and checked in layer order, and both arms' VRAM split printed. This is the shape that caught the §60 staged-prefill defect; a run that takes the ring instead of the stage fails. |
| `statsdump.py` | Records `/stats` to a JSONL file, one row per poll (`--every`, default 1 s), so the dashboard's figures can be read back over time on a machine without a Prometheus scraper. A row is the engine's snapshot verbatim plus the poll's time `t` and the gap since the last good poll `dt_s`; nothing is derived. The file is appended to and rotated at `--max-mib` (default 256, five generations). A failed poll leaves no row; a run that wrote no row, or can no longer write its file, exits 1. The key is taken from `--api-key` or `RADIANCE_API_KEY`. |
| `oracle.sh` | Every op compared against libref on the operands the model issued, which rad-kbench cannot do: its operands are its own (dense, rank 2), while the engine's are arena slices and weights loaded from a file. Starts its own server on :8302. Read it for `MISMATCH` lines, and for `NOT CHECKED` lines naming rows whose weight layout has no published inverse and so cannot be compared. |