Skip to content

perf(dflash): split-chain fast rollback with F32 SSM checkpoints (+29% decode)#506

Open
Amidwestnoob wants to merge 2 commits into
Luce-Org:mainfrom
Amidwestnoob:perf/dflash-split-chain-fast-rollback-main
Open

perf(dflash): split-chain fast rollback with F32 SSM checkpoints (+29% decode)#506
Amidwestnoob wants to merge 2 commits into
Luce-Org:mainfrom
Amidwestnoob:perf/dflash-split-chain-fast-rollback-main

Conversation

@Amidwestnoob

@Amidwestnoob Amidwestnoob commented Jul 10, 2026

Copy link
Copy Markdown

Summary

  • add layer-split F32 SSM checkpoint capture and fast pure-chain rollback for DFLASH
  • keep production tree verification fail-closed and reject sibling/non-chain geometry before execution
  • add a CPU-only root-inclusive pure-chain guard regression test

Benchmark

Controlled dual-GPU A/B/A benchmark on two RTX 3090 24 GB cards using the same pinned models, prompt, generation length, power/thermal conditions, and layer split (--target-gpus 0,1 --target-layer-split 12,11). Each block used one discarded warmup and five measured runs.

Metric Baseline Candidate Delta
Median decode throughput 22.76 tok/s 29.41 tok/s +29.22%
Median wall time 24.895 s 22.560 s -9.38%
Prompt processing ~95.4 tok/s ~95.4 tok/s flat
Acceptance rate 42.4% 37.2% -5.2 pp
Average commit 7.76 5.95 -1.81

All 15 measured runs produced byte-identical 256-token output:

1653a412811d3b87e26aab900e801b411fd68f9214b512ae984db6404b82204f

A1/A2 baseline drift was 0.48%. Maximum observed GPU temperature was 64 C.

Memory trade-off

The F32 SSM checkpoint storage adds exactly 1,774,190,592 bytes (~1.65 GiB) of persistent GPU memory in the tested split configuration. Both GPUs are required for the tested 27B configuration; a single RTX 3090 is not sufficient.

Safety boundary

  • supports_tree_verify() remains unconditionally false in production.
  • Only the validated root-inclusive pure-chain rollback path is enabled.
  • Sibling, malformed-root, skipped-parent, cyclic/forward-parent, out-of-range, truncated, and null geometry is rejected before the execution sentinel.
  • Fast rollback is opt-in through DFLASH_SPLIT_FAST_ROLLBACK and requires successful capture validation.
  • Temporary evidence instrumentation is excluded from this commit.

Verification

  • rebased onto current upstream main at 5e302cbb483819cd21e72f5dd8becaa609eca8cf
  • preserved upstream fix(qwen35): route non-tree GDN capture through persist buffer (src[7]) #469 non-tree GDN persist-buffer routing through src[7]
  • full Release CUDA 8.6 build and link: passed
  • current upstream test suite: 15/15 passed, including CUDA and the pure-chain guard
  • rebased-candidate dual-GPU validation: passed; 43/43 fast rollbacks succeeded with zero fallback
  • rebased validation produced the same generated suffix hash as the controlled benchmark
  • controlled A/B/A benchmark: 18/18 isolated processes passed, including warmups
  • no OOM, CUDA, fallback, tree-path, output-parity, or thermal failures

Scope

Measured on the exact dual-RTX-3090 configuration above with a 1,024-token prompt and 256 generated tokens. No performance claim is made for single-GPU execution, sibling-tree verification, other models, or other hardware.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread server/src/qwen35/layer_split_forward.cpp Outdated
Comment thread server/CMakeLists.txt
Comment thread server/src/qwen35/qwen35_layer_split_dflash_target.cpp Outdated
Comment thread server/src/qwen35/layer_split_types.h Outdated
@davide221

Copy link
Copy Markdown
Contributor

@Amidwestnoob thanks for the contribution, please review and fix cubic reviews

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