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.

Replaces topk_gpu, which is pathological when k β‰ˆ N (e.g. the k = N = 2048 DeepSeek-V3 / MiniMax-M3 indexer config). For N > 2048 a streaming variant folds TILE-wide tiles into a running top-TILE champion, selecting K ≀ TILE out of arbitrarily large N.

comptime values​

PERSISTENT_TOPK_MAX_N​

comptime PERSISTENT_TOPK_MAX_N = Int(2048)

Functions​