$npx skillfedfor your agent

ring-flash-attn

Ring attention implementation with flash attention.

With conditionsPyPI Artificial IntelligenceReleased Sep 2025215.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — ring_flash_attn-0.1.8-py3-none-any.whl
v0.1.8 · released 2025-09-10 · Python >=3.8

Yes, if you are training large language models on multi-GPU clusters and need distributed attention parallelism. The package has low install friction, permissive licensing, and active (though aging) maintenance. However, it is specialized infrastructure code—not a general-purpose library—and requires a distributed training setup with multiple GPUs to be useful. Verify compatibility with your environment before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires multi-GPU distributed setup with NCCL backend; NVLink between GPUs recommended for high performance.
  • Designed for training frameworks with distributed support.
  • Low install friction; pure Python wheel.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2025-09-10 (338 days) · last repo commit 2025-09-10 · 1,044 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 215,903 downloads/mo, #9,390 on PyPI

Verify before relying

pip install ring-flash-attn

from ring_flash_attn import substitute_hf_flash_attn, update_ring_flash_attn_params

# Initialize distributed training and substitute flash attention
substitute_hf_flash_attn(group, heads_k_stride=1)
update_ring_flash_attn_params(cu_seqlens, group)
  • Whether the package has undeclared runtime dependencies (fact sheet lists zero but description references external libraries).
  • Current stability and whether 0.1.8 is considered production-ready or still experimental.
  • Compatibility with specific versions of external dependencies beyond Python >=3.8.
Same gist for agents: .md · .json

What it is and what it does

Ring-flash-attn implements ring attention—a technique for distributing attention computation across multiple GPUs—by combining it with flash attention's memory-efficient kernels. It provides several variants: basic ring attention, zigzag ring attention (more compute-balanced), stripe attention, and llama3-style context parallelism, each available in batch and varlen (packed sequence) modes. The package includes a model adapter to substitute standard flash attention with ring attention during distributed training.

The main use case is training large language models on multi-GPU clusters where you want to parallelize the attention computation across devices rather than just the model parameters. It trades off some per-GPU throughput for the ability to train with longer sequences or larger models by distributing the attention workload. The varlen API supports packed sequences (multiple samples concatenated), and the llama3 variant is recommended for most varlen use cases as it offers lower memory overhead and better precision.

Use it for

  • Train large language models on multi-GPU clusters with sequence lengths that exceed single-GPU memory by distributing attention computation across devices.
  • Implement context parallelism in transformer training to reduce per-GPU memory pressure and enable longer context windows.
  • Optimize attention computation in distributed training when you have NVLink connectivity between GPUs and want to balance compute utilization.
  • Integrate ring attention into existing model training pipelines via the provided adapter without major code refactoring.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are training large language models on multi-GPU clusters and need distributed attention parallelism.

The package has low install friction, permissive licensing, and active (though aging) maintenance. However, it is specialized infrastructure code—not a general-purpose library—and requires a distributed training setup with multiple GPUs to be useful. Verify compatibility with your environment before committing to production use.

Install

ring-flash-attn on PyPI

Before you install

Low install friction; pure Python wheel. Maintenance status is aging—last commit was 2025-09-10 and the project has not released since initial 0.1.8 version in 2024-09-20, though the repository remains active with 1044 stars.

Requires multi-GPU distributed setup with NCCL backend; NVLink between GPUs recommended for high performance. Designed for training frameworks with distributed support.

License in practice

MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install ring-flash-attn

from ring_flash_attn import substitute_hf_flash_attn, update_ring_flash_attn_params

# Initialize distributed training and substitute flash attention
substitute_hf_flash_attn(group, heads_k_stride=1)
update_ring_flash_attn_params(cu_seqlens, group)

Verify before relying

  • Whether the package has undeclared runtime dependencies (fact sheet lists zero but description references external libraries).
  • Current stability and whether 0.1.8 is considered production-ready or still experimental.
  • Compatibility with specific versions of external dependencies beyond Python >=3.8.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 338 days since the last release
Last repo commit
First released
Downloads215,903 / month, #9,390 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: ring_flash_attn-0.1.8-py3-none-any.whl

Tags

Capabilities
ring attention flash attentiondistributed sequence parallelismmulti-gpu attention optimizationcontext parallelism trainingvarlen packed attention
Topics
distributed-trainingattention-optimizationsequence-parallelism

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “ring attention flash attention”

  • ring-flash-attnImplements ring attention with flash attention for distributed…
  • fa3-fwdProvides a lightweight Flash-Attention-3 forward-only kernel compiled…
  • x-transformersx-transformers provides modular transformer building blocks—encoder,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also flash-attn · fa3-fwd · flash-attn-4 · nvidia-cusparselt-cu12 · nvidia-cusparselt-cu13 · CoLT5-attention · local-attention · torchtitan · fla-core

Further reading