IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Python class

LogProbabilities

LogProbabilitiesโ€‹

class max.pipelines.context.LogProbabilities(token_log_probabilities, top_log_probabilities)

source

Bases: Struct

Log probabilities for an individual output token.

This is a data-only class that serves as a serializable data structure for transferring log probability information. It does not provide any functionality for calculating or manipulating log probabilities - it is purely for data storage and serialization purposes.

Parameters:

token_log_probabilitiesโ€‹

token_log_probabilities: list[float]

source

Probabilities of each token.

top_log_probabilitiesโ€‹

top_log_probabilities: list[dict[int, float]]

source

Top tokens and their corresponding probabilities.