Repository navigation
EXL3 Flash Next: deep prefill (3/8) - #1443
BlivionIaG wants to merge 119 commits into
Conversation
a23cd77 to
0b8304d
Compare
|
The prefill speedup is impressive: the 16k-token prompt goes from 56 s to 10.5 s. The blocker is arithmetic. The deep path is on by default for segments of 512 rows or more ( Keeping cache states on the step grid ( To land:
Once prompt rows match decode, the grid is no longer needed for exactness. The ring, overlap and prefetch work can stay as it is. |
3011ec2 to
8f85bfb
Compare
8f85bfb to
5207d74
Compare
4d106ad to
505a649
Compare
6ff3191 to
e3788fc
Compare
# Conflicts: # zig/tests/fixtures/gradient-serving.tsv
# Conflicts: # zig/tests/fixtures/gradient-serving.tsv
|
First-token time and decode with deep prefill off and on, on Time to first token, 64-token greedy reply, cold, seconds:
All nine requests have the same token hash ( Decode is unchanged. Aggregate tok/s from
Slowest first-token time among the four streams: code 2.41 / 2.16 / 2.19 s, chat 3.58 / 3.57 / 3.64 s (not a claim; they are within the spread between arms elsewhere). The cell's title says 8192; the prompt in these requests is 6144 tokens and the table is for that. For reference, #1441's cold 6144-token first-token time was 73.45 s, measured on #1441's own binary and server, not in this cell. |
# Conflicts: # docs/kernel-contract.md # zig/tests/cuda/contract_limits.zig # zig/tests/fixtures/gradient-serving.tsv
# Conflicts: # zig/tests/cuda/contract_limits.zig # zig/tests/fixtures/gradient-serving.tsv
…rid, as this branch's signature has it
…ot-nov12 # Conflicts: # CHANGELOG.md
…ot-nov12 # Conflicts: # CHANGELOG.md
…ot-nov12 # Conflicts: # CHANGELOG.md
…ot-nov12 # Conflicts: # CHANGELOG.md
…ot-nov12 # Conflicts: # CHANGELOG.md
…ot-nov12 # Conflicts: # CHANGELOG.md
|
Thanks. This is in good shape. Prompt rows now match decode, the snapshot grid is gone after your restores with it off, the tensor parallel cell turned out to be a harness mismatch and now passes, the filtered contract shows every kernel green with the planted controls red, and the first token and decode tables show the speedup without changing a single token. The float64 partials and single rounding match the decode path too. The head you are about to push picked up a few merges of main and a release after those device runs and checks, so we will run the device check on our side on that head instead of asking you to repeat it. We will confirm CI there as well. Two smaller things. First, you said the reduced branch and two chunk settings do nothing and offered to remove them. Since they do not change tokens we are happy to keep them, but if you would still rather drop them that is fine by us too. Second, please check that only main's copy of the profile setting (TF_FLASHNEXT_PROFILE) is left on the final head. Your earlier note said this slice's copy was gone, but the patch series we read still shows it. If both are there, please drop the extra row, doc line and test case.
|
Current head:
5415afbd81. Main90b4fae62d,bafe3e07cb,948e748584,d001c28f29and release09a9eb3317were merged after the checks and device measurements below; those device measurements were not repeated on this head. CI completed without reported failures on this head.What this changes
Segmented deep EXL3 prefill with TP prefill partials in float64, and prompt-state restore at any row (the snapshot grid is gone).
9d2bd21f28; over it this PR adds 12 non-merge commits (deep prefill, TP prefill dispatch, prefill settings registration and tests, FP64 TP prefill partials with a typed all-gather and one rounding at the finish, snapshot-grid removal, rotate-contract fault handling).6c5cef8941, merged through484437b6ac.atc overlap --jsonagainst four known peers (Flash Next TP=2 on CUDA: head and rollback graphs replay, and one-row split lanes skip the interleave copies #2837, flashnext cuda: the opt-in --tp 2 decode graph (TF_FLASHNEXT_DECODE_GRAPH=1) serves again instead of failing its first plain round #2980, flashnext cuda: the opt-in --tp 2 decode graph takes the dense split and keeps its graph across drafted verifies #2982, flashnext: the MTP head's streams by row through the lease's pages, no per-lane block outside the pool (#2444 P3, F2 part c) #2992) only, run on the integrated stack before the latest merges of main; not a global clearance. Conflicting files: Flash Next TP=2 on CUDA: head and rollback graphs replay, and one-row split lanes skip the interleave copies #2837 2, flashnext cuda: the opt-in --tp 2 decode graph (TF_FLASHNEXT_DECODE_GRAPH=1) serves again instead of failing its first plain round #2980 6, flashnext cuda: the opt-in --tp 2 decode graph takes the dense split and keeps its graph across drafted verifies #2982 8, flashnext: the MTP head's streams by row through the lease's pages, no per-lane block outside the pool (#2444 P3, F2 part c) #2992 6. Owner composition agreements exist for flashnext cuda: the opt-in --tp 2 decode graph (TF_FLASHNEXT_DECODE_GRAPH=1) serves again instead of failing its first plain round #2980, flashnext cuda: the opt-in --tp 2 decode graph takes the dense split and keeps its graph across drafted verifies #2982, flashnext: the MTP head's streams by row through the lease's pages, no per-lane block outside the pool (#2444 P3, F2 part c) #2992; my notice on Flash Next TP=2 on CUDA: head and rollback graphs replay, and one-row split lanes skip the interleave copies #2837 is unanswered.Checks before the release merge
f654c5b60d. The device results below ran on40e3a6ceb16e; this head differs from it by the merges of main at0591c4e85d,c34ff562ca,a3aecd8d0fand484437b6ac(cuda_batch_moe.zig: this branch'swritebackand main'ssumSlotsboth kept) and the pin fixturegradient-serving.tsv. The device cells were not repeated on this head.python3 tools/pr_check.py --base <main> --pr 1443: exit 0, 0 errors, 0 warnings; lean 339 vs 341 on main, 0 new.zig fmt --check zig: clean.test-cuda-host,test-exl3-cuda-host,test-flashnext-exl3-host,test-exl3-prompt-host,compile-flashnext-host,test-flashnext-memory-host,test-qwen-serving-host,test-lane-api-hostandtest-lanes-seepass on Darwin arm64 on the EXL3 Flash Next: draft lane guard for offloaded experts (8/8) #1446 head, which contains this head; the Linux host suite is CI's.-Dtarget=x86_64-linux-gnu): exit 0 on the EXL3 Flash Next: draft lane guard for offloaded experts (8/8) #1446 head, which contains this head (build only, no GPU executed on this head).Device results on
40e3a6ceb16eTwo 16 GB sm_120 GPUs, Linux x86_64, checkpoint above. One run per cell unless stated.
fast-equal,fast-resume(45 kept states bit-equal),fast-mixedand the TP prefill cells pass at TP=1 and TP=2; TP=2 deep equals TP=1 deep, bit for bitREDUCED_BRANCH,TWO_CHUNKkernel-contract exl3 flashnext(filtered)Not run or open
Receipt
turboderp/Qwen3.8-Flash-Next-exl3at69e33439ae950f17bcbe95c98f117d80f759ab6d.flashnext_exl3_prefill.cu(+425),exl3_candidate.cu(+114),contract_tppf_controls.cuh(+275, new),contract_controls.cu(+3). The filtered contract above covers them.Profile setting check
The final head has one
TF_FLASHNEXT_PROFILEregistration inzig/src/platform/environment.zig, the same entry as main. The EXL3 prefill and main paths read that shared setting; this slice adds no second registration, environment-table doc line or valid-case test.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. Resumed equals fresh: 45 kept states bit-equal; token hashes identical across the first-token runs. Concurrent equals solo and drafted equals"draft": falsewere not run for this PR on its own.--drafter, no slower than without it. Prompt processing is faster (cells above); decode is unchanged at 1 and 4 streams. Main refuses this checkpoint (n/a).