torch.nn.attention
This module contains functions and classes that alter the behavior of torch.nn.functional.scaled_dot_product_attention
Utils
Context manager to select which backend to use for scaled dot product attention. | |
This module contains functions and classes that alter the behavior of torch.nn.functional.scaled_dot_product_attention
Context manager to select which backend to use for scaled dot product attention. | |
An enum-like class that contains the different backends for scaled dot product attention. |
Register the callable that activates a flash attention impl. |
Activate into the dispatcher a previously registered flash attention impl. |
Return the names of all available flash attention implementations. |
Return the currently activated flash attention impl name, if any. |
Restore the default FA2 implementation |
This module implements the user facing API for flex_attention in PyTorch. | |
Defines bias subclasses that work with scaled_dot_product_attention | |
Variable-length attention implementation using Flash Attention. |