refactor(draft): codify proposal row layout#528
Open
dusterbloom wants to merge 1 commit into
Open
Conversation
963f083 to
c3e7014
Compare
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.
Summary
Make the draft proposal-row layout explicit instead of deriving every artifact as seed plus proposals.
This adds a small DraftProposalShape contract with two layouts:
DraftWeights defaults to SeedThenProposals, so existing artifacts keep their current behavior.
Why
The current block_size field is used both as an artifact row count and as a target verification width. Those values are equal for seed-plus-proposal artifacts, but not for proposal-only artifacts: four proposal rows require a five-row target verification batch after the accepted anchor is prepended.
Encoding that distinction as row-layout metadata keeps proposal count and verification width unambiguous without model-name conditionals. No runtime path consumes the new field in this PR; it establishes the shared representation used by follow-up integrations.
Validation
The CPU-only contract test covers:
All passed locally. The test links no GGML or GPU library and is included in both forms of the CMake check target.
No throughput benchmark is included because this PR does not change a runtime graph, kernel, scheduler, or model-loading path.