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).

Python class

RaggedBatch

RaggedBatch​

class max.nn.graph_groups.RaggedBatch(*args, **kwargs)

source

Bases: GraphGroup[str, TensorType | tuple[TensorType, …]]

The step’s ragged token stream: tokens, row offsets, and friends.

A model whose devices each take their own row offsets holds them as a tuple, one per device.

Parameters:

Return type:

Self

kind​

kind: ClassVar[str | None] = 'ragged_batch'

source

Identifies the feature wherever the group sits in a tree.