optimizing-attention-flash SKILL.md skillA
This file is byte-identical to the first copy the registry indexed, one of 3 indexed copies. Same content hash, so the same checks give both the same grade.
optimizing-attention-flash from orchestra-research/ai-research-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add orchestra-research/ai-research-skills/optimizing-attention-flash@v1.0.0Pins v1.0.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- orchestra-research/ai-research-skills
- Path
10-optimization/flash-attention/SKILL.md- Versions recorded
- 5
- Latest version
- v1.0.0, committed Nov 20, 2025
- First version recorded
- Nov 19, 2025
- Size
- 10,201 bytes
- Repository stars
- 13,718
- License
- MIT
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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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+)**: ```python 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)**: ```bash pip install flash-attn --no-build-isolation ``` ```python from flash_attn import flash_attn_func # q, k, v: [batch, seqlen, nheads, headdim] out = flash_attn_func(q, k, v, dropout_p=0.0, causal=True) ``` ## Common workflows ### Workflow 1: Enable in existing PyTorch model Copy this checklist: ``` Flash Attention Integration: - [ ] Step 1: Check PyTorch version (≥2.2) - [ ] Step 2: Enable Flash Attention backend - [ ] Step 3: Verify speedup with profiling - [ ] Step 4: Test accuracy matches baseline ``` …
Read the whole file at its exact version.
How to install
mdr add orchestra-research/ai-research-skills/optimizing-attention-flash@sha256:e0c1da83766332e0The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_clfb7j7cuou6fsfx)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Nov 19, 2025 and Nov 20, 2025, more than one a day.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.0.0 latest | 2025-11-20 | 0a9ded4 | 10,201 B | A | view · diff |
| v1.0.0 | 2025-11-20 | 72c8b2c | 10,187 B | A | view · diff |
| v1.0.0 | 2025-11-20 | 51fc3a3 | 10,186 B | A | view · diff |
| v1.0.0 | 2025-11-20 | 81c38fe | 10,185 B | A | view · diff |
| v1.0.0 | 2025-11-19 | bd4461f | 10,184 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (10201 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
orchestra-research/ai-research-skills · 13,718 stars · license MIT · pushed 2026-10-11 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_clfb7j7cuou6fsfx GET https://markdownregistry.com/api/v1/resolve?ref=orchestra-research/ai-research-skills/optimizing-attention-flash GET https://markdownregistry.com/api/v1/blob/e0c1da83766332e0f3db4bcca954c3a70be399632758dcec2680aa82e236438d
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from orchestra-research/ai-research-skills
Every file in orchestra-research/ai-research-skills