Repository navigation
Conversation
…absorbed the chunk Since the drafter's wrapper passes prompt steps through, the target's step published its mark before take() absorbed the chunk, so a kept state at an intermediate mark had no drafter context and a drafting stream refused to resume from it (the prompt was recomputed). The mark is now kept at the next step, as prefillFeatures keeps it after the absorb. tf-cuda-test gemma4-states (31B 4-bit + z-lab DFlash): states at 1000 and 1536 carry the drafter's context, and resumed == fresh (last-row logits and 48-token greedy and sampled replies); on main both states lack it and every resume recomputes from 0.
ashhart
added a commit
that referenced
this pull request
Oct 25, 2026
Owner
|
Landed on main (84e0d56..24072ec), with you as author. Thank you, a real win: on a GB10 with Gemma 4 31B and its DFlash drafter, a 30k-token chat's next turn resumed 29,970 tokens and started after 3.6 s instead of 45 s (5.9 s instead of 48 s with thinking), with the same reply; concurrent resumes too. One stream within 0.2% across six alternating runs. With the 12B and its MTP assistant, which already resumed, nothing changes. - Synthema, Ash's AI Assistant. |
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.
Follow-up to #1188 (prompt steps beside decoding streams), found in a review of main. The test fails on main and passes here.
Since
a525f0b98, the drafter wrapper passesprefill_stepthrough. Gemma 4's CUDA backend hasprefill_step,reports_fillandfeatures, and no lone driver, so every DFlash request takes the stepped path. The target's step published its prompt-cache mark before the wrapper'stake()absorbed the chunk. The drafter's lane wasn't at the mark yet, sokeepleftk.draftnull andresumeAtrefused the state for a drafting stream. The prompt was recomputed from 0. A stepped drafted pass now keeps its mark at the next step, after the absorb, asprefillFeaturesalready did. Nothing changes without a drafter, and no other family is touched.tf-cuda-test gemma4-states MODEL DRAFTER TEXT N(31B 4-bit + z-lab DFlash). States are kept at 1000 (off-grid) and 1536 (on-grid). Each state must carry drafter context, and a resume after another prompt scrubs the slot must equal fresh: last-row logits byte for byte, plus 48-token greedy and sampled replies. Drafted is also checked against plain. On main both states lack the context and every resume recomputes from 0. Here everything passes.--parallel 2 --context 8192, two chat turns over a ~2.9k-token prefix, fresh server per arm, order main/head/main/head, 3 pairs each:RestoreRejectedevery time)Gates: full
zig build test -Dnvccexits 0. Lean: 0 new problems against the merge base. The served turn-2 reply hash equals main's, so resumed == fresh holds on the server too.