Repository navigation
qwen-decode --build-ahead: measured −7.8 % (w1) / −5.7 % (w4) on the pair (PR6c, stacked on #1832; default stays off) - #1834
Merged
Conversation
PR6 part c, measurement half. QwenTensorParallelDecodeBench takes buildsAhead modes beside the control modes (build-ahead with folded control only) and runs each through the real driver and native executor, after one warm run; every run of every mode must retire the same tokens, so the bench also checks build-ahead against read-then-build on real ranks. The log line carries build_ahead=0|1. The product still keeps it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…doc comment Behaviour-neutral: - QwenTensorParallelBatchSession.DecodeInput gains `rows`; the read tokens' vocabulary check runs once before the per-session loop (it checked every token once per session, before any page was reserved either way), and `submitted` is set in the same switch as the input. - CBv2OwnedRequestState: validateBatchRow's doc comment had ended up above submitBatch's; it is back on its function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 5, 2026
Review of #1830-#1834, N1: in the continuation branch a failing read of the previous step left pending pointing at it, so the cleanup read it a second time and never drained the step already built ahead (probe: submit 4, read 3, read 3). pending now becomes the newer step before the read. Tests: aReadFailureWhileTheNextStepIsBuiltDrainsTheNewerStepOnce (red before: step 6 read twice, step 7 never; green after); the pending-failure test now checks every submitted step is read exactly once and the failed one never (N2); a built-ahead EOS leaves exactly one discarded forward (N4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 5, 2026
…s no device frontier Review of #1830-#1834, N5 and the device-read gap: - aNativeLaneRetiresAfterABuiltAheadEOS: a native lane whose EOS is read after its next step was built retires as a clean EOS with exactly one discarded forward; red without the schedule's EOS rule. - CBv2StageKVHost.submittedDeviceFrontierReads counts the frontier checks a submitted frame reads from the device; the token-identity suite asserts none on a paged host (GPU) and that the counter is live on a contiguous one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qwen-decode keeps #1820's --backend jaccl and --layer-strides beside --build-ahead; the bench takes both layerStride and buildsAhead (the logic measured on the pair at 21:24-21:30Z). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
changed the base branch from
perf/tp-qwen-build-ahead-native
to
dev
November 5, 2026 22:39
This branch had an error being deployed
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.
Stacked on #1832 (← #1830). PR6 part c: measure build-ahead on the pair. The product default stays off. Turning it on means setting
QwenTensorParallelBatchSettings.buildsAhead = true, which addsqwen-tp-batch-build-ahead-v1to the load agreement. A pair with one Mac on an older build would then refuse to load. That's a release decision, so it's left out of this PR.What
QwenTensorParallelDecodeBench.pair(…, buildsAhead: [Bool])runs each control mode × build-ahead mode through the real driver and native executor, after one warm run. Every run of every mode must retire the same tokens, so the bench also checks build-ahead against read-then-build on real ranks. Build-ahead runs with folded control only.darkbloom-cluster-tp-check qwen-decode --build-ahead 0,1(log linebuild_ahead=0|1).overnight/tp-perf/bin/ahead-ab(interleaved0,1/1,0invocations, widths 1 and 4).buildsAheadinto both the driver and the native executor.Measured (M5 Ultra pair, 2026-11-05 21:24–21:30Z, Mac A load 2.8–4.2)
Qwen 3.8 27B,
tp-check qwen-decodeover JACCL, sealed sums, product stride 8, synthetic 64-token prompt. The tool build was this stack plus #1820's tool options merged locally.Same token digest in every run of both modes (
e9a24766…,5a19c6dc…). The expectation was 8–10 %. Width 1 lands at the low end, width 4 below it: the token-boundary idle is a smaller share of the longer step.GPU suite (entry 11, same window):
buildAheadDecodeTakesTheReadThenBuildTokensAndLogprobsplus the native selection suites passed 4/4 on the GPU with a paged host.No changelog fragment while the product default is off. The bench and tool changes are developer-only.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Update (22:08Z)
adcd1b2fae, then merged Qwen TP native executor: submit and read decode steps in two phases (PR6a, stacked on #1830) #1832's second review fixes (5678d8337b).nice -n 19: 94 CPU tests pass (driver, settings, schedule-adjacent, batch drivers, sampling, native build-ahead token identity, native EOS retirement), and the plan checks pass.