Flash Attention

Enables fused transformer attention (PyTorch scaled_dot_product_attention, the flash-attn library, optional H100 FP8 and sliding windows) so long sequences use less GPU memory and less wall time. Use for training or inference past about 512 tokens, attention OOMs, or Ampere-or-newer SDPA backends. Not for CNN or UNet blocks, CPU-only training, or float32 attention. Never assume Volta V100 kernels exist.

Kayforkind 2921493 3 files · 20.3 KB Updated

File contents

Kayforkind/skill-slice commit 292149356a

Frequently asked questions

npx skillmds@latest add kayforkind/flash-attention