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 module

max.nn.graph_groups

Graph groups: the named inputs or outputs one model feature brings.

A graph’s output tree is a handful of groups, such as the logits or the hidden states a drafter reads. Each group draws its fields from a fixed set, whatever model it appears in, so the serving engine learns to read a group once, by its GraphGroup.kind, rather than once per model.

Graph groups​

ConvStatesThe short-convolution states a decoder writes back for the next step.
DecoderOutputsA decoder graph's named outputs: its logits, any hidden_states, and any state it writes back.
GraphGroupThe named graph inputs or outputs of one feature, in graph order.
HiddenStatesHidden states a decoder returns for a drafter, a capture, or the next pipeline stage, keyed by the one mode it ran in.
LogitsThe decoder's logits: the next token's, and any others requested.
LogitsNameThe outputs a Logits group can hold.
SparseIndicesThe rows a sparse-attention indexer selected, for a drafter to reuse.