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

GenerateResult

GenerateResult​

class max.pipelines.lib.generate.GenerateResult(sequences, logits=None, log_probs=None)

source

Bases: object

The result of generate().

Parameters:

log_probs​

log_probs: list[LogProbabilities] | None = None

source

Each row’s log probabilities, as GenerateIterator.log_probs, when requested.

logits​

logits: list[ndarray[tuple[Any, ...], dtype[float32]]] | None = None

source

Each row’s next-token logits, as GenerateIterator.logits, when requested.

sequences​

sequences: list[list[int]]

source

Each row’s prompt followed by its new tokens, in input order, as in Hugging Face generate.