Repository navigation
Conversation
The use contract can now require that the learner's and the engine's log probabilities agree on the tokens a rollout took, per token or as a path log ratio. A new Invar.Paths module measures both sides exactly from FP32 words, refuses pairs whose token path, distribution rule or forward weights differ, and lets a declared correspondence relate genuinely different weights. History admission derives the same observations from each generation's samples and probability artifact, and use inspect/admit attach them through the history options, so a history report and a use decision share one comparison. Probability artifacts move to v6 and record the adapter identity each optimizer step actually used; current words are therefore bound to the forward weights that produced them. The three relations are exposed as training-path-words, training-path-token-log-gap and training-path-log-ratio, with the learner side named explicitly. Signed-off-by: bohaotu <bohaotu@pony.ai>
History.paths paired each workload name with a whole role list, so a one-step two-input run only passed because the first step's current words equal the proximal words, and reference observations were dropped. It now pairs each name with its own proximal and reference observation, maps the cohort by the request's behavior version rather than the generation index, and leaves per-step current observations out of the claim because their weights differ from the behavior policy by construction. rollouts uses the same behavior version. The path implementation check no longer compares the adapter digest, which is policy content rather than implementation identity, and honors declared transfers. Reference observations now carry the request's reference adapter on both sides. The probability artifact's per-step policy is required to equal the applied step's before digest in both runtime and history admission, the path rule records truncation, negative path budgets are rejected, unknown path inputs are refused, and use accepts --history-log. The path contract fixture now runs two optimizer steps with learner-scored references, and the new tests pin reference identities, per-step policy binding, adapter-independent path implementation, and unknown inputs. Signed-off-by: bohaotu <bohaotu@pony.ai>
Collaborator
Author
|
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.
Why
The use contract can already require a candidate implementation to reproduce the reference, but the training-inference gap — the learner and the engine scoring the same rollout tokens — was only a diagnostic summary in a history report. #79 turns it into a declared, replayable claim: a contract can now require that the two sides agree on those exact paths, either bit for bit, per token, or as a whole-path log ratio.
What
Invar.Pathsmodule. A path observation carries the token path and prompt split, the distribution rule (temperature, logprobs, truncation), the forward-weight identity (frozen base + trainable adapter), the implementation identity, the FP32 words and their provenance. Comparisons are exact, onRationalwords; zero support is represented explicitly.training-path-words,training-path-token-log-gapandtraining-path-log-ratio, each naming thelearnerside.use preparepredicts thepath-execution-report-authenticityandpath-behavior-measurementpremises, plus an optionalforward-weight-correspondence.History.pathsexposes them per sample.use inspectanduse admitattach them through the--history-*options (including--history-run), so the report and the decision run the samemeasure/judge.currentwords are bound to the forward weights that produced them. The first step must use the update's starting policy.unknownfinding instead of an accidental admission.Validation
cabal test: all suites pass, including 11 new tests intest/Paths.hs(exact comparison, cancellation, incomparability, zero support, correspondence, scoped claims, admitted-update observations, per-step adapter identity).test/types.sh ghcexit 0; confidence checker: 122 bounds checked, 14 invalid inputs refused.fourmolu --mode check,hlint src test app,cabal check: clean.invar use admit --history-runreturnedadmitted_under_declared_reliancewith a contract whose generated pair and training paths use the initial checkpoint.Refs #79.
The documented limits stay: a pair with unbound different forward weights is
unknownuntil #84 declares the conversion/correspondence; the correspondence itself is recorded, not authenticated.