For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo module
topk_bitonic
Block-wide bitonic sort top-k for the MLA/MSA indexer.
This is to replace the two-stage sequential-extraction topk_gpu is pathological when k β N
(near-full sort). A use case of k = N = 2048 is the DeepSeek-V3 / MiniMax-M3 indexer
config.
comptime valuesβ
PERSISTENT_TOPK_MAX_Nβ
comptime PERSISTENT_TOPK_MAX_N = Int(2048)
Functionsβ
- β
persistent_topk_block: Launch block-wide bitonic sort top-k fortotal_seq_lenscore rows.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!