AI EngineeringTeX

Flash Attention

by Orchestra-Research

Flash Attention is an AI Engineering skill for Claude Code, published by Orchestra-Research in AI-Research-SKILLs.

11.6K stars844 forkson Orchestra-Research/AI-Research-SKILLsAdded 2026/08/12+1% in starsRepository updated 2026/06/16
aiai-researchclaudeclaude-codeclaude-skillscodexgeminigpt-5grpohuggingfacemachine-leanringmegatronskillsvllm
Install in seconds
Install Flash Attention
Copy Flash Attention into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/Orchestra-Research/AI-Research-SKILLs/tree/main/10-optimization/flash-attention ~/.claude/skills/flash-attention

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/Orchestra-Research/AI-Research-SKILLs.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
10-optimization/flash-attention/SKILL.md in Orchestra-Research/AI-Research-SKILLs
Installs to
~/.claude/skills/flash-attention
Collection
One of 50 skills cataloged from this repository
Category
AI Engineering2451 skills

What Flash Attention does

Flash Attention optimizes transformer attention with Flash Attention for faster inference and lower memory use. Use it for long sequences, GPU memory pressure, or when enabling PyTorch SDPA or flash-attn features.

Flash Attention is cataloged under AI Engineering on DirSkills. Flash Attention comes from a repository tagged ai, ai-research, claude, claude-code and claude-skills.

Documentation

README

Flash Attention - Fast Memory-Efficient Attention

Quick start

Flash Attention provides 2-4x speedup and 10-20x memory reduction for transformer attention through IO-aware tiling and recomputation.

PyTorch native (easiest, PyTorch 2.2+):

import torch
import torch.nn.functional as F

q = torch.randn(2, 8, 512, 64, device='cuda', dtype=torch.float16)  # [batch, heads, seq, dim]
k = torch.randn(2, 8, 512, 64, device='cuda', dtype=torch.float16)
v = torch.randn(2, 8, 512, 64, device='cuda', dtype=torch.float16)

# Automatically uses Flash Attention if available
out = F.scaled_dot_product_attention(q, k, v)

flash-attn library (more features):

pip install flash-attn --no-build-isolation

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Flash Attention

  • What else does Orchestra-Research publish alongside Flash Attention?

    Flash Attention is one of 50 skills that DirSkills catalogs from Orchestra-Research/AI-Research-SKILLs, the repository it ships in. Its siblings there include AWQ Quantization, Autoresearch and Axolotl. Each one is a separate skill with its own page in this directory, installs the same way Flash Attention does, and is maintained by Orchestra-Research in that same repository. The rest of the collection is listed on the Orchestra-Research/AI-Research-SKILLs page.

  • How does Flash Attention compare to other AI Engineering skills?

    Flash Attention ranks #332 by stars among the 2451 AI Engineering skills in this catalog. The most-starred ones next to it are Architecture Decision Records, AI-First Engineering and Agentic OS. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Flash Attention against them. Open each page to compare what they document and how they install.

More from Orchestra-Research/AI-Research-SKILLs

Flash Attention is one of 50 skills cataloged on DirSkills from Orchestra-Research/AI-Research-SKILLs.

See all 50 skills
⚙️
3w ago

AWQ Quantization

AWQ Quantization compresses large language models to 4-bit with activation-aware weight selection. Use it to deploy 7B-70B models on limited GPU memory while keeping accuracy loss low.
AI Engineering
11.6K844
🔬
2026/07/19

Autoresearch

Orchestrates end-to-end autonomous AI research projects using a two-loop architecture for rapid experiment iteration and synthesis. Routes to domain-specific skills, supports continuous operation, and produces research presentations and papers.
AI Engineering
11.6K838
🧠
2026/07/19

Axolotl

Comprehensive guidance for fine-tuning LLMs using Axolotl, including YAML configuration, 100+ model support, LoRA/QLoRA, DPO/KTO/ORPO/GRPO, and multimodal training.
AI Engineering
11.6K838
🧪
3w ago

BigCode Evaluation Harness

BigCode Evaluation Harness evaluates code generation models on HumanEval, MBPP, MultiPL-E, and other benchmarks with pass@k metrics. Use it to benchmark coding ability, compare models, and measure multi-language code generation quality.
Quality
11.6K844
🧮
3w ago

Bitsandbytes Model Quantization

Bitsandbytes Model Quantization loads LLMs in 8-bit or 4-bit to cut GPU memory use and fit larger models. Use it for Hugging Face Transformers inference, QLoRA fine-tuning, or 8-bit optimizers when VRAM is limited.
AI Engineering
11.6K844
🛡️
3w ago

Constitutional AI

Constitutional AI trains models with self-critique, revision, and AI feedback to reduce harmful outputs without human labels. Use it when you need safety alignment or a clear set of principles for model behavior.
AI Engineering
11.6K844