IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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​