PR3: DFlash2 draft backend + length-based speculative switching - #3
Open
Astrangemaninhere wants to merge 4 commits into
Open
PR3: DFlash2 draft backend + length-based speculative switching#3Astrangemaninhere wants to merge 4 commits into
Astrangemaninhere wants to merge 4 commits into
Conversation
added 4 commits
August 30, 2026 23:39
Applied to the PR3 branch from the integration fixes (9bf5135, d4f6e0d): 1. CUDA-graph preparation segfaulted with --spec dflash2: the graph representative wrote dflash_host_ingress unconditionally, but DFlash2 keeps separate dflash2_host_* buffers and dflash_host_ingress is null when only DFlash2 is active. Select ingress/egress by backend and zero DFlash2's pending_features too. 2. --spec auto failed to load because only plan_load resolved it; the planner and loaded model saw SpeculativeBackend::Auto and the startup features mismatch check rejected the weights. registry now resolves auto once up front (resolved_auto_speculative is a public Package static; 35b gets the same hook, auto -> MTP). 3. auto picks the backend from the artifact weights: DFlash2 artifact always DFlash2 (no MTP head), any other artifact defaults to MTP. Verified: dflash2 CLI/serve generation, dflash2 + auto -> speculative= dflash2, base + auto -> MTP.
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.
PR3: DFlash2 draft backend + length-based speculative switching
Background
Adds the DFlash2 draft backend (grouped-query attention draft model) and length-based switching between speculative backends.
Changes
Files
src/ops/launcher/dflash2_*(grouped conv, selector)src/targets/qwen3_6/impl/runtime/dflash2_impl.h(backend)src/targets/qwen3_6/impl/runtime/speculative_target_impl.h(length-based switching)Dependency
Depends on PR1/PR2. Merge after PR2.