perf(qwen35): batch draft projections across lanes for concurrency - #651
Open
Graffioh wants to merge 12 commits into
Open
perf(qwen35): batch draft projections across lanes for concurrency#651Graffioh wants to merge 12 commits into
Graffioh wants to merge 12 commits into
Conversation
Graffioh
force-pushed
the
codex/draft-projection-batching
branch
from
August 24, 2026 06:36
c136c86 to
98896bf
Compare
Graffioh
force-pushed
the
codex/draft-projection-batching
branch
2 times, most recently
from
August 24, 2026 09:17
9608985 to
fae03e7
Compare
Graffioh
force-pushed
the
codex/draft-projection-batching
branch
3 times, most recently
from
August 24, 2026 13:28
f1c85e0 to
21b3aef
Compare
Restore the paged-attention C ABI through a separate tree entry point. Reject unsupported GDN variants, initialize root-only chain trees, and size draft metadata from graph capacity.
Keep GDN journals inside the result buffer, restore the 10-source tensor layout, validate every tree destination before mutation, and allow selector widths that use the CPU top-k fallback.
Add fixed-width DFlash2 concurrent decoding for Qwen3.8 and batch the shared dense draft projections across active lanes. Keep convolution, cache updates, RoPE, masks, and attention lane-local. Preserve transactional state promotion and fixed-chain validation through C6.
Graffioh
force-pushed
the
codex/draft-projection-batching
branch
from
August 24, 2026 13:33
21b3aef to
e272492
Compare
Graffioh
marked this pull request as ready for review
August 24, 2026 17:37
Contributor
There was a problem hiding this comment.
1 issue found across 64 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="server/test/test_batched_gdn.cpp">
<violation number="1" location="server/test/test_batched_gdn.cpp:73">
P2: In test_cpu_gdn_support_matrix the active op is built with n_tokens=2 yet active_slots has only 1 element. GGML construction asserts the active-slot ids tensor matches n_tokens*n_seqs (as run_gdn does with n_seqs for n_tokens==1, and as the sibling tree/tree_persist helpers assert), so on the --cpu path this GGML_ASSERT aborts the test instead of printing the support-matrix result. Size active_slots to n_tokens.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Validate singleton selector vocabularies and token IDs before codebook gathers. Reject unsupported GDN output layouts on Vulkan, and use overflow-safe ceil division in paged attention.
Preserve paged-KV allocation order across rollback and destroy draft graphs before park frees their weights. Reject invalid GDN replay layouts and malformed SWA metadata. Exercise both grouped and scalar GDN dispatch paths.
# Conflicts: # server/src/draft/draft_gguf_loader.cpp
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.
Stack
This PR contains the exact current #642 history through
308f630f, followed by two separate commits:bb65ab93—perf(qwen35): batch draft projections across lanes for concurrencyf1c85e05—refactor(qwen35): rename GDN journal to replay logThe projection commit is patch-equivalent to the original
98896bf8; its object ID changed only because the stack moved onto the current #625 and #642 heads. The replay-log rename stays separate, so the performance change is not folded together with unrelated cleanup.Summary
SWA layers: 5/5 (window=2048).The previous path ran each lane's dense draft backbone in a separate graph. The packed path combines projection columns and removes repeated MMQ launches without sharing lane state.
Projection A/B
This matched A/B isolates the unchanged #651 projection patch against its #642 parent. Warm medians exclude the first speculative round; each run generated a fixed 64-token output.
C1 is neutral. C2 and C3 reduce complete-round latency by 4.3% to 6.8%. The R9700 C3 rocprof trace reduced MMQ launches from 336 to 196 (-41.7%) and MMQ device time from 11.938 ms to 6.103 ms (-48.9%).
Verification
git range-diffreports both perf(qwen35): batch draft projections across lanes for concurrency #651 commits patch-equivalent across the final restack.308f630f, the final qwen35: batch DFlash2 decode for Qwen3.8-27B concurrency #642 head.e0647848.git diff --check.The refreshed Qwen3.8 concurrency matrix is reported on #642. #654 is stacked on this PR and adds sampled concurrent speculation.