IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

max.pipelines.context.TokenSlice

TokenSlice​

max.pipelines.context.TokenSlice

source

Type alias for arrays containing token IDs as 64-bit integers.

A TokenSlice represents a contiguous sequence of token IDs, typically used for representing portions of text that have been tokenized. This is the fundamental data type for token-based operations in MAX pipelines.

alias of ndarray[tuple[Any, …], dtype[int64]]