feat(cli): larql vindex3 observe — a prompt in, a run record out - #486
Merged
Merged
Conversation
chrishayuk
force-pushed
the
v3-observe-cli
branch
2 times, most recently
from
September 20, 2026 14:28
601c0ce to
6e34a2f
Compare
chrishayuk
force-pushed
the
v3-observe-cli
branch
from
September 20, 2026 14:41
6e34a2f to
4939706
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The verb over V3-OBS-1 (#484) and V3-STREAM-1 (stacked; this PR is based on
v3-stream-1and retargets to main once that merges).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.mdrow added.