Repository navigation
pr-set : DSpark speedups and dense attention for 2 to 8 token ubatches (#405 #386 #431), two new CPU / CUDA pins - #461
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…unaligned src1 views off MMVF)
…he recurrent state read in place)
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.
Why
Faster speculative decoding for Inkling 2 in the prebuilt. With the current set, DSpark at Studio's T=1 is only just above plain decode on a B200, and the 3-token verify step is held back by the banded attention, by tiny batched cuBLAS GEMMs and by CPU thread wakeups in the draft graph. No upstream change breaks the current set: this is a feature repin, not a conflict fix.
The set is still ggml-org's aged
b####tag plus the pins inscripts/unsloth/pr-set.json, merged in order.What changes
Three pins move to new heads. Every new head is a fast-forward of the PR's current head (no force-push), authored as Daniel Han, and keeps its upstream merge base (b12818). Two pins are new.
-td/-tbdis given; an all-greedy draft block skips its draws; rejection verification without a full sort and with q indexed by token id; the draft context's feature readback overlaps the target sampling in the serverLLAMA_INKLING_DENSE_NMAX=1restores the old routing)feature-checks.json: #460 ownscuda-few-channel-mm(twotest-backend-opsMUL_MAT filters that select only its new cases). #459 isuncheckedwith its reason: it is a scheduling change with identical results, and the CUDA copy tests already run it as their CPU reference.Evidence
All on a B200 against the current set built on the same tag (b12823):
pin_contractintact,merge_checksclean. Feature-checks coverage ok.verify --cudaon b12823 and b12827: CPU gate build, full CUDA build andtest-chatpass.test-backend-opson CUDA: MUL_MAT 3049, MUL_MAT_ID 1203, PAD 37, GET_ROWS 372, FLASH_ATTN_EXT 4594 (4595 on b12827), FLASH_ATTN_EXT_BANDED 509, CPY 286, DUP 10, CONT 91, all passing. GPU feature matrix 32 of 32.-c 512:-ub 3.-ub 1: PPL string-equal, KLD 0. At-ub 3(the routed path) KLD against the current set is 0.0029 (IQ1_S) and 0.0022 (Q4_K_XL), the size of the existing difference between ubatch sizes.-c 1048576 -ub 1024), 4 prompts x 256 tokens, 3 interleaved rounds. The current set was run twice for the noise floor: per round, the two runs differ by -1.4% to +2.3%, and the gains below show in every round. The host was busy during the run (load 150 to 310 on 192 CPUs, with the lease's own cores idle), so the exact percentages may be somewhat smaller on a quiet host:With the new set, DSpark at T=1 is 1.33x plain decode (1.05x before), and DFlash2 is 1.42x.
Not covered here
HIP, Metal (#431 merges clean but was not compiled here), Vulkan, Windows and ARM legs run only in the nightly. The routing and the banded split were measured on a B200 only for this repin. The few-token paths are not bit-identical to the current set (rounding level, see above); decode and prefill are.
Update: #459 and #460 repinned after review
A second commit (fast-forward) is pinned on each new pin:
test-backend-opscases with strided and misaligned src1 views abort before this commit and pass with it.Evidence on b12823 with both commits: merge sim 45 of 45 on b12823 and b12827 (
pin_contractintact,merge_checksclean);verify --cudapasses with MUL_MAT 3061 (3049 plus the 12 new cases), MUL_MAT_ID 1203, PAD 37, GET_ROWS 372, FLASH_ATTN_EXT 4594, FLASH_ATTN_EXT_BANDED 509, CPY 286, DUP 10, CONT 91, GPU feature matrix 32 of 32. Inkling-2-Mini UD-IQ1_S and UD-Q4_K_XL at the default ubatch and at-ub 3: PPL string-equal to the previous heads, KLD 0. DSpark n_max 2 texts and acceptance are unchanged. b12827 was simmed with the new heads but not rebuilt.