{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/5"}],"enrichment":{"capability":"Provides optimized GPU implementations of scaled dot-product attention (FlashAttention and FlashAttention-2) that reduce memory usage and improve speed compared to standard attention, with support for NVIDIA CUDA and AMD ROCm.","skillfed_tags":["gpu-acceleration","transformer-optimization","attention-mechanism"],"use_cases":["Accelerate training and inference of large language models and transformers on NVIDIA A100, RTX 4090, H100, or AMD MI200/MI300 GPUs","Reduce memory consumption during attention computation, enabling longer sequences or larger batch sizes on the same hardware","Implement causal attention for autoregressive language model generation with improved efficiency","Deploy transformer models with lower latency by replacing standard PyTorch attention with optimized FlashAttention kernels"],"what_it_does":"FlashAttention is a GPU-accelerated library that implements fast, memory-efficient exact attention mechanisms for transformer models. It provides optimized kernels for scaled dot-product attention that reduce memory I/O and improve computational efficiency on modern GPUs. The package includes FlashAttention-2 (optimized for Ampere, Ada, and Hopper architectures) and a beta FlashAttention-3 for Hopper GPUs, with support for both NVIDIA CUDA and AMD ROCm backends.\n\nThe library integrates with PyTorch and einops, exposing functions like flash_attn_func and flash_attn_qkvpacked_func that drop in as replacements for standard attention. It supports various attention patterns including causal masking, sliding window attention, multi-query and grouped query attention, dropout, rotary embeddings, and ALiBi. Installation requires compilation against your GPU toolkit, which adds setup complexity but is necessary to generate hardware-specific optimized code.","worth_installing":"Yes, if you have a supported GPU (Ampere, Ada, Hopper for CUDA; MI200/MI300 for ROCm) and are training or deploying transformer models where attention is a bottleneck. The high install friction (compilation, GPU toolkit requirements) is justified by significant speed and memory gains. Not worth installing for CPU-only workflows or unsupported GPU architectures (e.g., older Turing GPUs without FlashAttention 1.x)."},"id":"flash-attn","links":{"html":"https://skillfed.io/packages/flash-attn","md":"https://skillfed.io/packages/flash-attn.md","pypi":"https://pypi.org/project/flash-attn/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-11","license_spdx":null,"license_treatment":"permissive","name":"flash-attn","python_support":"supports_current","summary":"Flash Attention: Fast and Memory-Efficient Exact Attention"},"popularity":{"monthly_downloads":484138,"position":6407,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.8.3.post1"}
