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
ReturnLogits
ReturnLogits
class max.nn.ReturnLogits(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Which logits a transformer model returns per sequence.
LAST_TOKEN returns only the final position’s logits, VARIABLE
returns return_n_logits trailing positions, and ALL returns
every position.
ALL
ALL = 'all'
Return every token’s logits.
LAST_TOKEN
LAST_TOKEN = 'last_token'
Return only the final token’s logits.
VARIABLE
VARIABLE = 'variable'
Return return_n_logits trailing positions’ logits.