Repository navigation
feat(qwen4exp): exact 4-slot concurrent serving (stacked on #809) - #810
Merged
Merged
Conversation
dusterbloom
added a commit
to dusterbloom/lucebox-hub
that referenced
this pull request
Oct 7, 2026
dusterbloom
force-pushed
the
feat/qwen4exp-concurrency
branch
from
October 8, 2026 09:03
4a5a16f to
40064f0
Compare
Squashed onto main after Luce-Org#774's squash-merge. Per-commit history: dusterbloom/lucebox-hub branch history/qwen4exp-prefix-cache-20261008. Commits: - feat(qwen4exp): reuse cached prompt prefixes across requests - fix(ci): keep the renamed mmid target in the prefix stack - test(qwen4exp): cover model park reload lifecycle - fix(ci): restore the DS4 fused GPU test target - fix(ci): restore DS4.1 width-invariance target
Squashed onto main after Luce-Org#774's squash-merge. Per-commit history: dusterbloom/lucebox-hub branch history/qwen4exp-concurrency-20261008. Commits: - Revert "refactor(qwen4exp): retire the experimental independent-slot concurrency" - fix(qwen4exp): keep multi-slot decode on the QSA reference path - fix(ggml-cuda): range-check the RoPE->PERMUTE->CONT fusion against its inputs - refactor(qwen4exp): batch-invariant multi-slot decode, per-slot prefill - perf(qwen4exp): prefill each slot at the backend chunk size - test(qwen4exp): expect scoped profile restoration after concurrency override
davide221
force-pushed
the
feat/qwen4exp-concurrency
branch
from
October 8, 2026 10:16
40064f0 to
f188102
Compare
3 tasks done
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 the prefix-cache PR (on MTP; PR #774 is merged). Merge order: #808, #809, this. Review only the concurrency work and its merge onto the stack: dusterbloom/lucebox-hub@f89be47...4a5a16f
What
Up to four concurrent sequences for Qwen3.8-Flash-Next on the sequence engine. Each slot has its own KV, recurrent and QSA indexer state. Every slot produces exactly what it would produce alone.
--max-concurrency 1keeps the single-sequence path (MTP, prefix cache). 2..4 enables the sequence engine; more than 4 is refused. No environment variables.--draft/--verify-width > 1together with slots are refused) and the prefix cache stays single-slot: the sequence engine replaces the serial loop that owns both.How it stays exact
indexer_k's last row is the decode graph's permanent scratch row.Tests (gfx1151, UD-Q4_K_XL, strict: bit-exact vs solo, on the full stack)
smoke_qwen4exp_batched M 2050 3072 1: every rowmax_abs_delta=0in the identical and distinct phases; untouched-slot isolation, row permutation and cancel-reset-reuse pass.test_qwen4exp_seq_engine M 32768: N=2/3/4 contract + soak pass, the QSA boundary crossing passes (tokens and indexer state bit-exact), distinct concurrent sequences pass.qwen4exp_concurrency_http.pyagainst default flags: four parallel requests at 2.3K and 16K prompts, 8/8 identical to solo.test_feature_gate,test_server_unit test_qwen4exp,test_qwen4exp_mtp,test_qwen4exp_chunk,test_qwen4exp_prefix_cachepass.Throughput (gfx1151, UD-Q4_K_XL,
--max-ctx 32768, 4,096-row chunks)Above 2,051 tokens of context each slot runs its own QSA forward, so batching adds little to decode there.
Not in this PR
2026-10-07 stacked validation. The cumulative parent at
a93d8befpassed the full gfx1151 HIP/model V7 gate (result sha256:93210dffb2442f36a841a066f10eb298898a84e389b94c55f2993bcde61e66f1). The only follow-up source change restores main's four-line backend-neutral CMake registration fortest_ds41_mmid_width_invariance; the fixture source, runtime, kernels, and model code are unchanged. The exact follow-up tree3bdbeee6compiled and the restored fixture passed on gfx1151 (result sha256:bcb945b7c3d749ac239269f3f7f553bd707d92a977dbba1747089b16b7c1a906;binary sha256:75883d3798beb1a1f68f6b2a3669c855813a84468395c9548a245fc744dfd73f). The #810 candidate at4a5a16f5is byte/mode-identical to that tested tree. The throughput tables above retain their original measurement attribution.This is the exact cumulative source tree covered by those gates.