← AI-Research-SKILLs

/optimizing-attention-flash

寫程式AI-Research-SKILLsAI翻譯

用 Flash Attention 最佳化 transformer attention,加速 2-4 倍、記憶體減少 10-20 倍。處理長序列(超過 512 token)或遇到 attention 的 GPU 記憶體問題時使用。

安裝次數
995
專案星數
1.4 萬 ★
授權
MIT
專案更新
2026-10-11

怎麼裝

npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill flash-attention

安裝前請先看過原文內容。中文說明是 AI 翻譯,不保證安全。

原文

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.