Preserve complete sampled conditioning in exact history recovery - #957
bradhilton wants to merge 3 commits into
Conversation
|
Investigation update: later captured refusals were localized without weakening this draft's complete-conditioning guard. The offline literal-thinking renderer fix and preceding-boundary regression are in #967. The ordinary-result STOP-authority gap and successful scoped correction are recorded in #961. A separate explicit sampled-training prototype retains ordinary success first, catches only deliberate source-owned representation refusals, proves the complete native singleton inventory, and joins contiguous sources only with exact full-prefix nesting. Original conditioning, IDs, logprobs, sampled STOP and source order remain mandatory, with actual first-occurrence ownership before float32 finite filtering. This does not turn The latest complete captured CPU validation passed all 31 source encounters from two original histories, including input nonmutation and worker serialization. Of 29 adjacent pairs, 28 were compatible and one was not. It emitted three histories/28,414 tokens versus the previously validated singleton fallback's 31/297,827, preserving 4,139 finite first-occurrence terms and 29 sampled STOP tokens. This is emitted geometry only: the complete singleton proof is still built and retained; speed, memory, GPU fit and numerical training are unmeasured. Result Native partition/subchain recovery and post-render STOP reconciliation remain source-pinned experiment modules. Upstreaming them needs a separately reviewed explicit sampled API with process/thread dispatch and per-model STOP authority; generic SFT/OUTPUT equivalence and the native-only/no-load contract remain separate. This draft's proof requirements are unchanged. |
Captured length-stopped histories can fail rendered mask or message-boundary checks even when their complete sampled request/response chain is retained. Ordinary rendered assembly can also preserve sampled output IDs while changing their original prompt. This adds a bounded exact-source retry that requires the complete original conditioning, output IDs, logprobs and sampled STOP masks before returning.
The retry keeps the entire independently proved closing tail at the sampled-output endpoint. Additional native inter-request context is accepted only through complete nested captured prompts and stays nonsampled with NaN logprobs. Unsupported projections, overrides, incomplete sources, changed tails and non-nested prompts still refuse. Explicit thinking settings remain authoritative; only an absent automatically injected default can be omitted during the private retry. The stopped-message fallback also retains its full-context marker and completed-tail proofs.
This intentionally changes the public sampled-history contract: a recorded logprob cannot be carried across a known different complete token prefix. Explicit template/tokenizer overrides and text-equivalent reconciliation no longer allow that behavior. Three existing tests previously asserted such output; their expectations now assert refusal and retain supported original-conditioning alternatives. For divergent captured prompts,
multi_history=Truewith the defaultreconcile_text_equivalent_tokenizations=Falsepreserves separate histories already produced by the protocol; it does not force every incompatible view to split, and each history must still satisfy the checks. An override that changes sampled conditioning must be removed or replaced with matching source evidence; there is no implicit sample dropping or reconditioning. Missing-only prompt evidence retains the existing fallback and is not certified aligned.The public additional-histories guide now documents migration, including keeping approximate/manual SFT data separate from captured sampled evidence. Refusal messages report only the source message ordinal, prefix lengths and first mismatch offset; they contain no token IDs, request IDs, text or hashes. Five focused API checks and independent source review cover this guidance/error-only follow-up; the strict decision logic is unchanged.
This forward-ports the experiment-tested repair onto current main while preserving its newer Dynamo metadata handling. It does not change
_history.pyor include the separate lineage-attribution proposal in #885. The mask exception discriminator uses the exact built-in error, message and deepest helper code rather than a formatting-sensitive line number.Validation:
Still draft: a subsequent controlled training input reached the guarded exact-source boundary refusal, so the three-case corpus does not establish general full-training coverage. That new case is being investigated separately without weakening the proof. Source review of this disclosed API contract and full project CI remain merge gates. Frozen experiment sources are unchanged by this draft follow-up.