<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/backend/config.py#L198-L211) |

Disable flash attention.

    tf.keras.config.disable_flash_attention()

Flash attention offers performance optimization for attention layers,
making it especially useful for large language models (LLMs) that
benefit from faster and more memory-efficient attention computations.

Once disabled, supported layers like `MultiHeadAttention` will not
use flash attention for faster computations.