Shortcuts

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.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources