optimizing-attention-flash
CommunityAccelerate transformer training & inference
Software Engineering#pytorch#gpu memory#flash attention#llm performance#transformer optimization#inference speed
Authorkwasi-cpu
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill significantly speeds up transformer models and drastically reduces their memory footprint during training and inference, especially for long sequences.
Core Features & Use Cases
- Speed & Memory Optimization: Achieve 2-4x speedup and 10-20x memory reduction for attention mechanisms.
- Versatile Support: Works with PyTorch native SDPA, the
flash-attnlibrary, H100 FP8, and sliding window attention. - Use Case: When training a large language model with sequences longer than 512 tokens and encountering GPU memory errors, or when needing to speed up inference for real-time applications.
Quick Start
Integrate Flash Attention into your PyTorch model by replacing standard attention with torch.nn.functional.scaled_dot_product_attention and ensuring your PyTorch version is 2.2 or higher.
Dependency Matrix
Required Modules
flash-attntorchtransformers
Components
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: optimizing-attention-flash Download link: https://github.com/kwasi-cpu/hermes-agent/archive/main.zip#optimizing-attention-flash Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.