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
LogProbabilities
LogProbabilitiesβ
class max.pipelines.context.LogProbabilities(token_log_probabilities, top_log_probabilities, sampled_token_ids)
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:
sampled_token_idsβ
Sampled token at each position, whose probability is in
token_log_probabilities.
token_log_probabilitiesβ
Probabilities of each token.
top_log_probabilitiesβ
Top tokens and their corresponding probabilities.