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 function

sort_buf_descending

def sort_buf_descending[dtype: DType, out_idx_type: DType](mut buf_keys: TileTensor[dtype, Storage=buf_keys.Storage, address_space=buf_keys.address_space, linear_idx_type=buf_keys.linear_idx_type, element_size=buf_keys.element_size], mut buf_ids: TileTensor[out_idx_type, Storage=buf_ids.Storage, address_space=buf_ids.address_space, linear_idx_type=buf_ids.linear_idx_type, element_size=buf_ids.element_size], vocab_size: Int)

Sort each batch separately in descending order using parallel merge sort.