Repository navigation
tests: lane-core conformance suite and decode invariant ledger - #4472
Merged
Merged
Conversation
…, reproducible, stops and malformed parents Host tests over the fake target for the gaps in the serial/tree/resume conformance ledger (research rank 0): - fresh and resumed serial decode: the same tokens and reason, plain and drafted, greedy and keyed, and the cache the fresh decode's after every step (one-token rounds: the same digest every step); existing tests pinned tokens; - tree windows (suffix-match grafts beside the head's chain), fresh and resumed, emit the plain run's tokens with branch rows verified, the cache checked every step, so rejected tree rows never stay (rollback_test runs chains); - the same request twice, plain, chain and tree, greedy and keyed: the same tokens, steps, drafts and cache; - eos reached part way and max_new end drafted and plain replies with reasons stop and length at the plain length; - a parent at or after its child is ParentAfterChild at accept.depths and refused by windows.build before any backend round; a valid tree builds with its row parents and depth-keyed positions. No engine code changes. Registered in lanes.zig's test block (test-shared-lane-regressions-host).
…t pin each C1 fresh = resumed, C2 tree = chain = plain, C3 reproducible greedy and keyed, C4 stops, C5 ties and non-finite logits, C6 malformed parents refused, C7 off-path state guarded: for each, the existing tests that already pin it (what each asserts) and the new conformance_test rows, then what the host cannot pin (device arithmetic, a backend's own non-finite argmax, multi-rank agreement). Later decoding PRs cite its rows.
8 tasks done
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 this changes
Every speed change we land has to keep each output bit. This adds a host conformance suite that pins the decode invariants those changes depend on, and a ledger that says, for each invariant, which tests already pin it and what only a device can check.
zig/src/core/lanes/conformance_test.zig(181 lines, five tests on the real lane engine over the fake target, checking the fake's cache against a fresh decode after every step):max_newend a drafted reply where the plain decode ends, with its stop reason;docs/conformance-ledger.md: seven invariants (C1-C7), the existing tests for each with what they assert, the new rows, and what can't be pinned on the host (non-finite logits through the engine, device bytes, multi-rank agreement).No engine code changes.
Checks
zig fmt --checkandzig ast-checkpass; the new file is 181 lines.zig build test-shared-lane-regressions-host: rc 0.