Optimizing Attention Flash

Optimizes transformer attention with Flash Attention for 2-4x speedup and 10-20x memory reduction. Use when training/running transformers with long sequences (>512 tokens), encountering GPU memory issues with attention, or need faster inference. Supports PyTorch native SDPA, flash-attn library, H100 FP8, and sliding window attention.

synthetic-sciences 4ac2f7c 3 files · 23.8 KB Updated

File contents

synthetic-sciences/openscience/tree/main/backend/cli/skills/ml-training/flash-attention commit 4ac2f7c652

Frequently asked questions

npx skillmds@latest add synthetic-sciences/optimizing-attention-flash