torch.nn.attention.bias¶
Defines bias subclasses that work with scaled_dot_product_attention
CausalBias¶
CausalBias |
A bias representing causal attention patterns. |
causal_lower_right |
Creates a lower-right triangular causal bias. |
causal_upper_left |
Creates an upper-left triangular causal bias. |
CausalVariant |
Enum for causal variants used in attention mechanisms. |