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 function

split_state_outputs

split_state_outputs()​

max.pipelines.lib.request_state.split_state_outputs(outputs, return_logits, return_hidden_states)

source

Splits a decoder graph’s flat outputs into the role’s and the state.

The role’s outputs are the next-token logits, then the logits and their offsets when variable or full logits are returned, then the hidden states when they are.

Returns:

The role’s outputs and the state outputs that follow them.

Parameters:

Return type:

tuple[Sequence[Any], Sequence[Any]]