Add explicit sampled-output STOP certification - #973
Closed
bradhilton wants to merge 3 commits into
Closed
bradhilton wants to merge 3 commits into
bradhilton wants to merge 3 commits into
Conversation
bradhilton
marked this pull request as ready for review
September 25, 2026 14:57
This was referenced Sep 25, 2026
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.
Histories built from recorded completions can omit STOP flags even when the original token IDs and logprobs are available. This leaves training code with incomplete stop labels.
await art.tokenize_sampled(...)runs ordinary tokenization, then checks the recorded prompts, outputs, logprobs and stop evidence. It adds only missing, verified STOP flags and preserves tokens, logprobs, order and original objects. Missing logprobs cannot be certified through placeholder NaNs; explicitly recorded NaNs remain valid evidence.Existing
art.tokenizebehavior is unchanged. Ordinary tokenization errors still propagate; #976 adds a separate native representation for cases that cannot be rendered faithfully.Focused regressions and full CI pass. Independent Astra and Fable source reviews found no blockers. The API requires resolvable tokenizer authority for the recorded model; a different
base_modelcannot substitute for it.Validation details
PASS_WITH_NOTESfor headd3f325dcc; a separate changed-source peer also passed.