dflash: let the log-SNR input opt into graph reuse - #124
Merged
Conversation
The input inherited the default can_reuse() == false, so turning on log-SNR conditioning rebuilt the whole decoder graph for every ubatch. v_feat is a function of n_tokens and n_seqs_unq, which llm_graph_params::allow_reuse already compares, and of min/max_log_snr, which are fixed per model. So the input can reuse whenever those checks pass. Acceptance is unchanged at 65.891%, mean length 3.58, on the same drafter and prompts.
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.
Cherry-picks bri-prism's 9ed9b9b, which landed on the #123 branch after the PR was merged and is not in prism-v7.
The merged #123 left the log-SNR graph input on the default can_reuse (false), so any conditioned drafter graph is rebuilt every ubatch. This lets the input opt into reuse: v_feat is a pure function of n_tokens and n_seqs_unq, both already compared by llm_graph_params::allow_reuse, plus min/max_log_snr which are fixed per model. Discussed and re-validated in #123 (comment) (acceptance 65.891%, mean length 3.58, unchanged).
Verified here: cherry-pick applies clean on prism-v7 (post #121), builds on macOS, Metal GATED_DELTA_NET suite passes.