Skip to content

dflash: let the log-SNR input opt into graph reuse - #124

Merged
khosravipasha merged 1 commit into
prism-v7from
logsnr-graph-reuse
Aug 27, 2026
Merged

dflash: let the log-SNR input opt into graph reuse#124
khosravipasha merged 1 commit into
prism-v7from
logsnr-graph-reuse

Conversation

@khosravipasha

Copy link
Copy Markdown
Collaborator

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.

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.
@khosravipasha
khosravipasha merged commit a4f0714 into prism-v7 Aug 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants