Skip to content

feat(cli): larql vindex3 observe — a prompt in, a run record out - #486

Merged
chrishayuk merged 1 commit into
mainfrom
v3-observe-cli
Sep 20, 2026
Merged

chrishayuk merged 1 commit into
mainfrom
v3-observe-cli

Conversation

@chrishayuk

Copy link
Copy Markdown
Owner

What

The verb over V3-OBS-1 (#484) and V3-STREAM-1 (stacked; this PR is based on v3-stream-1 and retargets to main once that merges).

larql vindex3 observe <container> (--prompt TEXT | --tokens IDS) --record run.jsonl
    [--generate N] [--backend production|reference] [--basis-dims 3 --basis-seed …]
    [--basis-rows rows.json --basis-id NAME] [--top-k 10] [--run-id ID]

Tokenises with the container's own tokenizer (or takes ids), prepares the image once, steps every token through the canonical decode session with the lossless recorder and the stats observer attached, optionally continues greedily with those positions observed too, writes the record as JSON lines, and prints the ids that ran, the provenance fingerprint, the log hash and the final position's top candidates with log-probabilities (a full log-softmax over the real final logits). Supplied basis rows are hashed into the record. Never a logit lens, never a second traversal.

Evidence

Four end-to-end tests on the encoded fixture (record verified with the declared events; greedy continuation as further positions; supplied rows honoured and width-checked; every refusal names its cause). Real run: Gemma 3 4B IT, The capital of France is Paris.\n\nParis, a 2070-event record over 10 positions with 68 carrier writes per position, the frozen Gemma topology.

Gates

fmt, clippy (larql-cli), the four CLI tests; docs/cli.md row added.

The verb over V3-OBS-1 and V3-STREAM-1: tokenise the prompt (or take
ids), prepare the image once, step every token through the canonical
decode session with the lossless recorder and the stats observer
attached, optionally continue greedily with those positions observed
too, write the record as JSON lines, and print the ids that ran, the
provenance fingerprint, the log hash and the final position's top
candidates with log-probabilities. Seeded or supplied projection basis.
Never a logit lens, never a second traversal. Four end-to-end tests on
the encoded fixture; Gemma 3 4B "The capital of France is" -> " Paris"
with a 2070-event record over 10 positions.
@chrishayuk
chrishayuk merged commit 1c89eef into main Sep 20, 2026
17 checks passed
@chrishayuk
chrishayuk deleted the v3-observe-cli branch September 20, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant