For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
ring_accepted_lengths
ring_accepted_lengths()β
max.pipelines.speculative.gated_delta_rollback.ring_accepted_lengths(window_lengths, num_accepted, num_draft_tokens)
Returns accepted_lengths(), zero for a row the verify committed.
A row longer than the verify window was committed by the verify itself at its last real token, so the rollback neither replays nor folds any of it.
-
Parameters:
-
- window_lengths (TensorValue) β
[batch]row lengths of the verified sequence, from_window_lengths(). - num_accepted (TensorValue) β
[batch]accepted draft tokens per request. - num_draft_tokens (TensorValue) β Scalar
K, zero on a prefill.
- window_lengths (TensorValue) β
-
Returns:
-
[batch]int64 row counts the rollback applies. -
Return type: