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
DistributedLogitsPostprocessMixin
DistributedLogitsPostprocessMixin
class max.nn.transformer.DistributedLogitsPostprocessMixin
Bases: object
Mixin providing logits postprocessing for multi-device sharded models.
Requires: self.norm_shards, self.lm_head, self.return_logits, self.devices. Optional: self.return_hidden_states, self.logits_scaling.
devices
lm_head
lm_head: Callable[[list[TensorValue], Sequence[BufferValue]], Sequence[TensorValue]]
logit_softcapping
logits_scaling
logits_scaling: float = 1.0
norm_shards
norm_shards: Sequence[Callable[[TensorValue], TensorValue]]
return_hidden_states
return_hidden_states: ReturnHiddenStates = 'none'
return_logits
return_logits: ReturnLogits