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

ModuleV3Outputs

ModuleV3Outputs​

class max.pipelines.lib.ModuleV3Outputs(next_token_logits, logits=None, logit_offsets=None, hidden_states=None)

source

Bases: object

The outputs a ModuleV3 text model’s forward returns.

ModuleV3PipelineModelWithKVCache maps each field to the ModelOutputs field of the same name. A field left None is not a graph output.

Parameters:

hidden_states​

hidden_states: Tensor | None = None

source

Hidden states, when the model returns them.

logit_offsets​

logit_offsets: Tensor | None = None

source

Row offsets into logits, shape [B + 1]; set with it.

logits​

logits: Tensor | None = None

source

All or variable logits, shape [T, V], when the model returns them.

When None, next_token_logits also serves as ModelOutputs.logits.

next_token_logits​

next_token_logits: Tensor

source

Last-token logits, shape [B, V].