cuda: accelerate long-context B1 indexer and 1M HCA - #763
Open
wangshang23 wants to merge 1 commit into
Open
Conversation
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.
Fixes #762.
What changed
n_comp >= 8192; retain the direct scorer for shorter contexts, qualitymode, and the existing
DS4_CUDA_NO_INDEXER_WMMAescape hatch.shape fits 8192 compressed rows plus the existing 256-row raw reserve.
and direct-vs-WMMA B1 score/top-k equivalence on QAT-format values.
The HCA change does not add a new attention implementation. It keeps the
existing exact score-split path active instead of falling back to the slow
online kernel for the last 256 rows at 1M.
DGX Spark results
Base:
84cc882, NVIDIA GB10 (sm_121), DeepSeek-V4-Flash IQ2XXS Q2 model,Q8-to-F16 weight cache disabled. A/B paths alternate in one process/session,
with 3 warmups and 30 samples each.
At 1M, Nsight Systems attributes the main change to:
78.036 ms-> WMMA scorer48.565 msacross 21 layers.97.286 ms-> exact score-split score+finalize25.400 msacross 20 layers.Full benchmark details and the existing-work audit are in #762. Related #258
uses approximate HISA pruning and is complementary to this full-top-512 flat
scorer optimization.
Correctness
6.10352e-05.0/512.0.0.0469046, RMSE0.00876944, and identical argmax.Validation
Passes on DGX Spark / GB10.
--logprob-vectorscurrently failsshort_code_completionidentically onboth base and PR builds with this GGUF, so it is not a regression from this
change.