Introduce Qwen 3.8 Flash Next - #36497
JustinTong0323 wants to merge 11 commits into
Conversation
Co-authored-by: Qiaolin-Yu <90088090+Qiaolin-Yu@users.noreply.github.com> Co-authored-by: ch-wan <54331508+ch-wan@users.noreply.github.com> Co-authored-by: ispobock <26454835+ispobock@users.noreply.github.com> Co-authored-by: JustinTong0323 <115166877+JustinTong0323@users.noreply.github.com> Co-authored-by: samuellees <26428561+samuellees@users.noreply.github.com> Co-authored-by: YAMY1234 <74099316+YAMY1234@users.noreply.github.com> Co-authored-by: yhyang201 <47235274+yhyang201@users.noreply.github.com> Co-authored-by: yizhang2077 <25844240+yizhang2077@users.noreply.github.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com>
…(GB10 / DGX Spark) (#37068)
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…ISION) on qwen4-main-squashed (#38121) Co-authored-by: Yangmin Li <yangminl@nvidia.com> Co-authored-by: rdxa <rdxa@rdxa-int-spark-01.yvb.moe> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Alison Shao <54658187+alisonshao@users.noreply.github.com>
…in fused softmax routing (fixes GB10 NEXTN collapse) (#38308) Co-authored-by: YAMY <74099316+YAMY1234@users.noreply.github.com>
|
@mochgolf Same finding on our side — we opened #38144 with an exact fallback for the threshold-bin overflow in Validated on 8×A800 (SM80), qwen3.8-flash-next TP8, against current
Happy to fold this into your candidate if you already have one in flight — the repro and regression test are in the PR. |
|
@kun10 Reproduced the same assert ( #38180 adds a startup validation that rejects Making the write plan tolerate unaligned prefixes would be the deeper fix, but the guard unblocks mixed-chunk users in the meantime. |
…Triton + radix) (#38290) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Backport of sgl-project#36811 (as carried in sgl-project#36497 c8457de). Plain softmax routing has no correction bias, but the JIT router took a required bias tensor, so the caller built one: every routing call ran torch.zeros(num_experts, fp32) plus its fill kernel purely to satisfy the signature. Qwen3.8-Flash-Next routes 512 experts on all 48 layers with SGLANG_OPT_USE_JIT_KERNEL_FUSED_TOPK on by default, so that is 48 allocations and 48 fill launches per forward. Measured on A100-80GB at 370 us per forward -- 1.2%-3.7% of a decode step depending on its length, and the shorter the step the larger the share. The kernel now takes HAS_BIAS as a constexpr and keeps the zero in registers when there is none, and the bias may be fp16/bf16 as well as fp32 (a bf16 correction bias no longer needs a host-side cast). Verified on A100 (sm80): topk_ids identical and weight max|diff| = 0 against the previous zero-bias path at M = 1, 8, 64, 512, 8192 with 512 experts / top-10; the upstream unit suite passes (42 tests). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QGAy9m3Q2VxMk5LLamv7HG
|
merged in #37500 |
Mixed chunked prefill injects running decode rows into an EXTEND batch (ForwardMode.MIXED) with prefix_len == seq_len - 1, which is almost never a multiple of indexer_compress_ratio. That violates the ratio-aligned prefix invariant the compressed QSA write plan relies on, and torch._assert_async((prefix_lens % ratio == 0).all()) in _qsa_build_write_plan fires device-side, killing every TP rank (reported in the PR sgl-project#36497 thread; reproduced on 8x A800 SM80 TP8: 32x device-side assert, all ranks). - Startup: _qwen4_exp_overrides declares enable_mixed_chunk=False via declare_resolution for compressed QSA (the spec/dllm hook pattern); the publish gate's resolvable_fields whitelist does not admit enable_mixed_chunk as a model-overridable declaration, so it cannot ride the returned overrides dict. - Runtime: QwenSparseAttnBackend raises NotImplementedError on ForwardMode.MIXED so the assert can never be reached from any path. - Pure-CPU regression test: MIXED batch raises with the disable directive; DECODE batch unaffected. Verified on 8x A800 TP8: startup warning, health 200, 720s mixed load ok=1329 fail=0, negative control (no flag) ok=911 fail=0.
Mixed chunked prefill injects running decode rows into an EXTEND batch (ForwardMode.MIXED) with prefix_len == seq_len - 1, which is almost never a multiple of indexer_compress_ratio. That violates the ratio-aligned prefix invariant the compressed QSA write plan relies on, and torch._assert_async((prefix_lens % ratio == 0).all()) in _qsa_build_write_plan fires device-side, killing every TP rank (reported in the PR sgl-project#36497 thread; reproduced on 8x A800 SM80 TP8: 32x device-side assert, all ranks). - Startup: _qwen4_exp_overrides declares enable_mixed_chunk=False via declare_resolution for compressed QSA (the spec/dllm hook pattern); the publish gate's resolvable_fields whitelist does not admit enable_mixed_chunk as a model-overridable declaration, so it cannot ride the returned overrides dict. - Runtime: QwenSparseAttnBackend raises NotImplementedError on ForwardMode.MIXED under the same condition as the write plan (qsa_profile is None or variant == compressed), so the ratio assert can never be reached. Tokenwise QSA is unaffected: it never enters the write plan and compress_ratio == 1 makes the alignment trivially hold, so its MIXED batches are not rejected. - Pure-CPU regression test: MIXED batch raises with the disable directive for compressed QSA; tokenwise MIXED and DECODE batches are not guarded. Verified on 8x A800 TP8: startup warning, health 200, 720s mixed load ok=1329 fail=0, negative control (no flag) ok=911 fail=0.
Motivation
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Missing
run-cilabel -- add it to run CI tests.Latest PR Test (Extra): ❌ Blocked --
run-ciis required first.Latest PR Test (AMD ROCm 7.2): ➖ No AMD PR run found for this commit.