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

AttentionMaskVariant

AttentionMaskVariant​

class max.nn.attention.AttentionMaskVariant(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

source

Bases: str, Enum

Defines the string mask variant identifiers used in attention configuration.

CAUSAL_MASK​

CAUSAL_MASK = 'causal'

source

CHUNKED_CAUSAL_MASK​

CHUNKED_CAUSAL_MASK = 'chunked_causal'

source

NULL_MASK​

NULL_MASK = 'null'

source

SLIDING_WINDOW_CAUSAL_MASK​

SLIDING_WINDOW_CAUSAL_MASK = 'sliding_window_causal'

source

SLIDING_WINDOW_NONCAUSAL_MASK​

SLIDING_WINDOW_NONCAUSAL_MASK = 'sliding_window_noncausal'

source

TENSOR_MASK​

TENSOR_MASK = 'tensor_mask'

source