Python module
response
Standardized response object for Pipeline Inference.
LogProbabilities
class max.pipelines.response.LogProbabilities(token_log_probabilities: list[float], top_log_probabilities: list[dict[int, float]])
Log probabilities for an individual output token.
token_log_probabilities
token_log_probabilities
Probabilities of each token.
top_log_probabilities
top_log_probabilities
Top tokens and their corresponding probabilities.
TextResponse
class max.pipelines.response.TextResponse(next_token: int | str, log_probabilities: LogProbabilities | None = None)
A base class for model response, specifically for Text model variants.
next_token
next_token
Encoded predicted next token.
log_probabilities
log_probabilities
Log probabilities of each output token.
-
Type:
LogProbabilities | None
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!