feat: DFlash support for tensor-parallel Qwen3.6 targets#533
Open
jkyamog wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 24 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
jkyamog
force-pushed
the
feat-qwen35-dflash-tensor-parallel
branch
from
July 16, 2026 20:13
2d32fb7 to
9279619
Compare
jkyamog
force-pushed
the
feat-qwen35-dflash-tensor-parallel
branch
from
July 16, 2026 20:23
9279619 to
c8b3fbc
Compare
Contributor
Author
|
fyi: I have been using this for more than a day, likely used around 20-50M tokens already. So far its been good, saw a parser bug but not related to this PR.
This not too far from my 5090, but the 2x 3090 being 48gb has 2x the context size. |
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.
Extend Qwen3.6 tensor parallelism from target-only autoregressive generation
to DFlash speculative decoding, including the device-local state and transfer
optimizations previously planned as a separate follow-up.
The draft remains on its explicit local device while target verification runs
through the TP meta backend. The change gathers complete target features for
the draft and extends rollback, recurrent state, snapshots, and prefix-cache
restore to split tensors.
Changes
tensors instead of gathering it through host memory.
rank after rollback.
execution.
configurable rollback policy for single-device and layer-split execution.
get_2dand oneset_2dpernon-wrapping run. Long prefills and prefix restores no longer perform two
host/device transfers and stream synchronizations per token.
DFLASH_TP_PROFILE=1.The stacked target branch also contains the review fixes for invalid device
counts, repeated split-state propagation and copies, multi-segment debug
output, legacy callback compatibility, and NaN-safe fallback all-reduce.
Verification
main@f258c4a.tool_calls.26,758-token OpenClaw request. The repeated request's prefill drops from
21.4 s to 0.1 s and produces byte-identical output.
SHA-256
3614d727a950d5416a42b5e0e3713054e59ddc9a0365fb4ac1a2cbd198f5964f,matching the saved pre-optimization and target-only continuation.
plus draft peaked at 15,208/12,640 MiB for Q5 and 20,742/18,176 MiB for Q6
on the two 3090s.
Sustained performance
Hardware: RTX 5090 plus an NVLink-connected RTX 3090 pair at stock power.
Workload: 26,758 prompt tokens, 1,024 generated tokens, 98,304 context, Q8 KV,
Q8 draft, DDTree budget 16, no prefix cache, and a 60-second cooldown between
rows. These are single runs on the final rebased head. Every row uses 98,304
context except the explicitly marked Q6/5090 capacity row.
Q5 performs 192 target forwards for 192 DDTree steps; Q6 performs 190 for
190. The optimized Q5 NVLink phase profile is:
Q5 TP is 3.01x faster than Q5 layer split and Q6 TP is 2.78x faster than Q6
layer split. Direct-P2P and P2P-disabled TP runs for both quants produced the
same byte-identical output hash shown above.
Q5 on one 24 GB 3090 failed while allocating a 1,411 MiB rollback-cache buffer
after reaching 23,286 MiB. The server logged
prefill_failed, but the HTTPlayer returned 200 with empty assistant content and
finish_reason=stop; thaterror-mapping behavior is separate from this TP PR. Q6 on the 5090 aborts with
CUDA OOM at both 98,304 and 65,536 context, but succeeds at 32,768 context with
a 31,569 MiB peak. That constrained run produced the same assistant-content
hash as Q5 on the 5090:
ac5279693a48ecc1b5e19daeadda5872f03bb47e40d589c6a40524db0596ef34.HIP was not compiled on this NVIDIA host because ROCm is not installed. The
new pointer-query calls use the existing CUDA/HIP compatibility header.