Repository navigation
xpu(flashnext): serve Qwen3.8 Flash Next (qwen4_exp) at TP={1, 2, 4} with host-RAM PLE and MTP - #3587
Conversation
|
/atc depends 3586 |
|
Stacked follow-up performance PR opened at #3603 ( |
|
Thanks @supernovae. Flash Next on XPU is well split, with every file under 600 lines, and the PLE warm-up overlap and the 24/24 alone and serial checks up to 262,144 tokens are thorough. Two things only you can do. Move the new direct
|
|
@ashhart Updated
Verified with |
cdc1c77 to
de88692
Compare
|
Thank you @supernovae. Both asks are resolved: the new XPU_* reads now go through the startup parser with valid and invalid coverage, and One thing on our side:
|
de88692 to
2bef6bc
Compare
|
Thanks @supernovae. To get this moving, we rebased this onto the finished #3586 ourselves, keeping your commits as they were, and fixed its Windows test build the same way (one commit keeping the Linux-only XPU startup calls in the test off Windows; production code unchanged). It is in the landing queue now; nothing is needed from you.
|
|
Sounds good! look forward to seeing this land - looking forward to benching/tuning Nemotron / LFM3 / Gemma 4 or Qwen3.8-27B long-context attention tuning on the B70. |
|
Thanks @supernovae. The startup-parser and explicit TP1 asks remain resolved, and this head's files match the series we already prepared with the Windows host-test guard. Nothing new is needed from you. Current main has moved again, leaving five integration conflicts for us to reconcile while preserving both sides; the accepted device receipts and their limits remain credited.
|
2bef6bc to
503d267
Compare
Keep actual XPU startup calls behind the Windows compile-time guard: they instantiate Linux Level Zero loading, mmap and signal code. Preserve the existing environment assertions on every host and every Linux assertion unchanged.
…with host-RAM PLE and MTP
Follow main 3c29352 and its candidate-row handoff when verify and verifyTree move to runner_tree.zig. Keep candidate harvesting on step and every verify before its existing sync. Normalize the merged environment-test table and shorten two inherited header comments to the required limit.
503d267 to
2e32728
Compare
|
Thank you @supernovae. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
What this changes
Before: the XPU backend refused
Qwen3.8 Flash Next(qwen4_exp). After:xpu-flashnextandtensorfold-native serverunQwen3.8 Flash Next(mlx-q4g32) acrossTP={1, 2, 4}on Intel Xe2 GPUs over Level Zero P2P collectives (19.79 GiBVRAM/GPU at16kcontext,23.81 GiB/GPU at the full262,144native window on 4× Arc Pro B70) with host-RAMmmapPLE4-gram tables (29.80 GiB), Layer-48 MTP speculation, shared-roundverifyMultiup to 32 streams, and prompt snapshot caching.xpu-qwen27-tpcb4ec7660d570b71283d3301f83d7f342aa83ba2; own commitcb4ec76..9d930a9).atc overlap --json:0conflicts againstorigin/main(6bc82acac41737e7159f2b597b562d12bf437291) at2026-11-16T15:37:38Z(conflict: "clean",conflictFiles: 0).Checks on this head
9d930a92a01827423647c3049a39c11f3001dfc9python3 tools/zig/lean_check.py, on the base and on this head:221on base (6bc82ac) — inherited,221on head (9d930a9),0new.zig fmt --check build.zig zig&git diff --check: passpython3 tools/pr_check.py --base origin/main:0errorspython3 -m unittest discover -s tools/zig -p build_options_test.py(5/5) &host_tests_test.py(13/13): passzig build xpu-flashnext xpu-native test-flashnext-xpu-host test-draft-xpu-host test-xpu-refusal-host test-slide-xpu-host -Doptimize=ReleaseFast -Dngen-include=<ngen>: all steps pass (0failed;ocloccompiles all 36flashnextXe2 kernels at 128 GRF/thread with0spills)zig build -Dxpu-contract=true xpu-kernel-contract-limits xpu-contract-run:9/9pass,5/5controls red,0limit problemsumask 0022 && zig build -Dfixed-cpu test --test-timeout 20m:696/696steps succeeded (0failed)zig build -Dfixed-cpu test-kernel-contract test-golden test-gradient-serving test-qwen-serving-host test-server-security test-pull-security fuzz-cortheon:62/62steps succeeded;317/317tests passedM1–M5), CUDA (sm_*), HIP (gfx*), and Windows GPU checks (Linux 4× Intel Arc Pro B70 host only).Receipt
mainrefusesqwen4_expon XPU; existing XPUQwen3.8-27B(TP=1) verified unchanged againstmainin parent slice 2 (token_sha/ greedy tokens32/32identical,34.1vs34.1 tok/sdecode,2,051vs2,044 tok/sprefill).tensorfold-native serve) and standalonexpu-flashnextforqwen4_exp(mlx-q4g32), plusxpu_lane.zigsub-batchverifySharedfor drafting engines implementingverifyMulti.qwen4_expvia existing--tp {1,2,4}(defaults to4on 32 GB cards when--tpis unset/default so the~79.2 GiBdevice weights fit across 4 cards);--visionis explicitly refused until an XPU vision tower is added.6bc82acac41737e7159f2b597b562d12bf437291, head9d930a92a01827423647c3049a39c11f3001dfc9, Zig0.17.0,ocloc 26.27.039122(-device bmg), Linux7.3.0-10-genericx86_64, AMD EPYC Turin (91 GiBDDR5 RAM), 4× Intel Arc Pro B70 (0xe223, 32 GB GDDR6 each, 230 W). Checkpoint:TensorFold/Qwen3.8-Flash-Next-MLX-4bit-MTP@2b170fa6309d5d1ee380b35636075fac7945f286(105.43 GiB:19.79 GiBVRAM/GPU at16kctx,21.77 GiB/GPU at135kctx,23.81 GiB/GPU at full262,144native ctx +29.80 GiBPLEin host DDR5 RAM).TP=4across 4× Arc Pro B70 from512through the full262,144(256k) native context window and1..32concurrent streams; could not run single-cardTP=1/TP=2full-model load (requires>80 GiB/>40 GiBVRAM per card), Metal, CUDA, HIP, or Windows GPU.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false:bench_concurrent.py --levels 1,2,4,8,16,32 --tokens 64 --reps 3 --alone --serial: all 24 cells (1, 2, 4, 8, 16, 32streams ×code/chat×T=1.0/0.0) pass withfailed=0, alone.unequal=0, serial.unequal=0.xpu-flashnextraw context sweep across512, 1k, 2k, 4k, 8k, 16k, 32k, 64k, 128k, 192k, and 256k (262,080 + 64 = 262,144):MTP == serial: true(0diff) at every depth, plusXPU_VERIFY_TEST=1(perfect&wrongdraftsequal to serial: true) and 9/9 exact passkey retrieval across132,380served tokens.maindoes not supportqwen4_expon XPU;Qwen3.8-27BTP=1parity is posted above.tools/bench_openai.py(--tp 4):bench_openai.py(--tokens 64 --reps 5):fibonacci-raw110.8 tok/s(T=1.0) /112.6 tok/smedian (121.2peak,61 msTTFT) (T=0.0);gpu-chat-no-think96.5 tok/s(T=1.0) /106.9 tok/s(95 msTTFT) (T=0.0).LRUCache,T=0.0, no copy-draft overlap):136.3 tok/s(<1k),125.1 tok/s(4k),125.7 tok/s(16k),124.2 tok/s(64k),113.3 tok/s(132k,passkey=True); multi-turn (MTP + context copy) reaches214.1–253.5 tok/sfrom1kto132k.bench_concurrent.py,T=0.0): steady decode scales114.6(S=1) ->133.6(S=2) ->150.7(S=4) ->172.6–174.7 tok/s(S=8), and143.3–145.0 tok/s(S=32) vs69.4–71.5 tok/splain single-stream decode.TP=4,64-row Xe2 BF16 DPAS + expert-grouped MoE,--prompt-cache-gib 0):512:248.8 tok/s·1k:313.4 tok/s·2k:356.2 tok/s·4k:378.8 tok/s·8k:389.4 tok/s·16k:392.8 tok/s·32k:394.3 tok/s·64k:392.7 tok/s(166.9 sTTFT) ·128k:385.7 tok/s(339.8 sTTFT) ·192k:369.2 tok/s·256k(262,080native window):359.3 tok/s(with prompt cache on, exact snapshot restore TTFT is160 msat66kand139 msat132k).TensorFold/Qwen3.8-Flash-Next-MLX-4bit-MTP(Qwen Community License 1.0); no weights are committed to this repository.Kernel contract, only when a GPU kernel is new or changed
zig/kernels/xpu/flashnext/{flashnext,fn_mixers,fn_moe_head}.cl(36 kernels forqwen4_exp, compiled at-cl-intel-128-GRF-per-thread, subgroup 16,<= 16 KiBSLM,0register spills; replaces none). Agreeing XPU family-kernel contract coverage is part of XPU (Arc Pro B70): Level Zero P2P tensor parallelism (TP=2, 4) for Qwen3.8-27B and Qwen3.8 Flash Next (qwen4_exp) #3583.5/5gate controls +6/6limit controls) run and fail red as planted.SUMMARYline and exit status:xpu-contract-run(exit0):SUMMARY bmg-g31 0xe223 9 kernels: 9 pass gates 1-4, 0 fail, 0 known findings; 5 controls: 5 red as planted, 0 missed; 0 limit problems; gates 5558 ms, limits 1 msM1–M5, NVIDIAsm_80/86/89/120/121, AMDgfx1030/1100/1151/1201.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.--drafter, no slower than without it, greedy and sampled