
Optimizing Attention Flash
If you're working with transformer models and hitting memory walls or slow attention computations, this skill gives you the Flash Attention implementation that delivers 2-4x speedup and 10-20x memory reduction through IO-aware tiling. The example code shows PyTorch 2.2+ integration using the native scaled_dot_product_attention function, which automatically uses Flash Attention when available. It's straightforward: drop in your query, key, and value tensors on CUDA with float16, and you're done. The skill has passed security audits from Gen Agent Trust Hub, Socket, and Snyk, and with 27.7K GitHub stars on the parent repo, it's clearly battle-tested. Worth having if you're training or running large language models.
- skills.sh installs
- 332
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill optimizing-attention-flash --agent claude-codeInstalls into .claude/skills of the current project.
Files
If you're working with transformer models and hitting memory walls or slow attention computations, this skill gives you the Flash Attention implementation that delivers 2-4x speedup and 10-20x memory reduction through IO-aware tiling. The example code shows PyTorch 2.2+ integration using the native scaled_dot_product_attention function, which automatically uses Flash Attention when available. It's straightforward: drop in your query, key, and value tensors on CUDA with float16, and you're done. The skill has passed security audits from Gen Agent Trust Hub, Socket, and Snyk, and with 27.7K GitHub stars on the parent repo, it's clearly battle-tested. Worth having if you're training or running large language models.
Browse the repository on GitHubSponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Category
- Data Science & ML
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Figma331
- Zapier Workflows330
- Scikit Survival329
- Axolotl328
- Developer Growth Analysis328
- Alphafold Database326
- Llm App Patterns326
- Gh Fix Ci325
- Pyhealth325
- Scanpy325
- Aeon324
- Web To Markdown322
- Biomni321
- Constitutional Ai321
- Nanogpt320
- Sglang320
- Uspto Database318
- Receiving Code Review317
- Transformer Lens Interpretability317
- Skypilot Multi Cloud Orchestration316
- Llava315
- Mdr 745 Specialist315
- Create Pr314
- Fda Database313