Repository navigation
Optimize Weaver tree construction and verification - #3
Merged
Merged
Conversation
Fuse selected-node materialization and frontier publication, compile candidate gathering into the indexed step, and skip the inherited draft sampler that Weaver does not consume. Add a CUDA parity and graph-replay benchmark against the legacy path.
Allocate tree-structure buffers at the configured draft depth, use the direct parent-walk builder, skip inverse-series squaring beyond the reachable tree depth, and use the measured four-warp output launch.
ry2009
changed the base branch from
ry2009/weaver-runtime-maxwins-20260730
to
main
August 4, 2026 21:03
- Fuse Weaver frontier selection, materialization, and cache publication into GPU kernels. - Keep verification outputs and DFlash cache finalization GPU-resident. - Defer committed sequence-length synchronization with reusable pinned host buffers. - Remove legacy Weaver branches, runtime toggles, and experiment-only benchmarks. - Improve seed-0 throughput from 284.23 to 306.54 TPS, a 7.85% speedup.
Fuse Weaver verification and GPU-resident DFlash finalization
improve weaver
hikettei
marked this pull request as ready for review
September 8, 2026 11:21
hikettei
approved these changes
Sep 8, 2026
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.
Scope
This draft is the complete checkpoint-compatible Weaver runtime handoff for Yuma. It is intentionally based on
mainso every implemented speedup is visible in one checkout.1. Tree construction
Measured on the frozen Weaver runtime path:
1994.8 -> 1495.2 us171.83 -> 176.40 tok/s(+2.66%)2. GDN tree verification
The selective-BF16 fixed-context test used one frozen checkpoint and 192 contexts:
+0.00137660[-0.00368479, +0.00643563]3. Compact non-greedy verification
target_only: sample from the target, follow the matching child when present, otherwise emit from the remaining target masstraversal: sample sibling order without replacement and apply corrected residual updates[tree_nodes, vocab]proposal scratch from target-only verificationEstablished microbenchmark evidence:
Validation
py_compile, andgit diff --checkpassClaim boundary
The only established end-to-end gain in this draft is the +2.66% tree-construction result. Compact verification has a strong stage-level result but still needs the final corrected temperature-1 paired E2E gate. Selective BF16 has fixed-context non-inferiority evidence but also needs E2E timing before enablement.
Training changes, checkpoint averaging, Pairgram/bigram scorer experiments, RoPE/SwiGLU architecture changes, and data work are excluded because they are Yuma's separate training track or are not drop-in runtime optimizations.
CI States
Latest PR Test (Base): ❌ Missing
run-cilabel -- add it to run CI tests.Latest PR Test (Extra): ❌ Run #31362252682