DeepSelect: DeepSeek's High-Performance TopK Kernel for DSA
DeepSeek's official org open-sourced DeepSelect on 2026-09-10 (snapshot: 152 stars / CUDA / created and active the same day). It is a high-performance implementation of the TopK kernel used by DeepSeek Sparse Attention (DSA) plus a companion sampler; DSA powers the V3.2, V4 and V4.1 model families, and the README claims a 2~20x speedup over native torch.topk. Version 1.0.0 and bilingual deep-dive algorithm docs landed the same day. This piece explains why TopK becomes the attention bottleneck, how RadixSelect works with its single-pass scan, randomized blocks and threshold convergence, what the expected upper bound on total processed elements actually implies, and why effective memory bandwidth - not FLOPs - is the right metric here. It then focuses on what DeepSelect deliberately does not do: it covers only two workloads, Lightning Indexer (bfloat16, topk capped at 4096) and Sampling (float32, vocab around 128K), and the README advises turning sorted_index off and setting return_value=False when values are not needed. Cold take: 152 stars means very early days; the value is ecological rather than general-purpose.