Repository navigation
Conversation
A DSV4 context refuses any partial seq_rm: a compressed block row is derived from a compressor-state ring addressed by pos%state_size, so a token cannot be removed once the rows it wrote have been overwritten. Speculative decoding therefore has to checkpoint and restore the whole sequence state on every draft, and re-evaluate the accepted tokens. Size the rings with the same rollback budget the recurrent caches already use (n_rs_seq): oversizing them by n_rs_seq rows makes exactly the last n_rs_seq positions removable, because their rows have not aliased onto any row that an unfinished block still reads. A compressed row a removed token completed keeps stale contents, but it sits at block index pos/ratio and is not exposed to a token until (pos + 1)/ratio exceeds it, which cannot happen again before that position is re-decoded and rewrites the row. The rings only grow when a rollback budget is requested (n_rs_seq = 0 otherwise), so a context without speculative decoding is unchanged. test-dsv4-rollback decodes a prompt, decodes a wrong tail on top of it, rolls the tail back and replays the real one, and requires the logits to match a context that never rolled back.
|
Hi @YanissAmz, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
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.
A DSV4 context refuses any partial seq_rm: a compressed block row is derived from a compressor-state ring addressed by pos%state_size, so a token cannot be removed once the rows it wrote have been overwritten. Speculative decoding therefore has to checkpoint and restore the whole sequence state on every draft, and re-evaluate the accepted tokens.
Size the rings with the same rollback budget the recurrent caches already use (n_rs_seq): oversizing them by n_rs_seq rows makes exactly the last n_rs_seq positions removable, because their rows have not aliased onto any row that an unfinished block still reads. A compressed row a removed token completed keeps stale contents, but it sits at block index pos/ratio and is not exposed to a token until (pos + 1)/ratio exceeds it, which cannot happen again before that position is re-decoded and rewrites the row.
The rings only grow when a rollback budget is requested (n_rs_seq = 0 otherwise), so a context without speculative decoding is unchanged.
test-dsv4-rollback decodes a prompt, decodes a wrong tail on top of it, rolls the tail back and replays the real one, and requires the logits to match a context that never rolled back.
Overview
Additional information
Requirements