DOE OSTI · 3005443
RingX: Scalable Parallel Attention for Long-Context Learning on HPC
Abstract
The attention mechanism has become foundational for remarkable AI breakthroughs since the introduction of the Transformer, driving the demand for increasingly longer context to power frontier models such as large-scale reasoning language models and high-resolution image/video generators. However, its quadratic computational and memory complexities present substantial challenges. Current state-of-the-art parallel attention methods, such as ring attention, are widely adopted for long-context training but utilize a point-to-point communication strategy that fails to fully exploit the capabilities of modern HPC network architectures. In this work, we propose ringX, a scalable family of parallel attention methods optimized explicitly for HPC systems. By enhancing workload partitioning, refining communication patterns, and improving load balancing, ringX achieves up to 3.4 × speedup compared to conventional ring attention on the Frontier supercomputer. Optimized for both bi-directional and causal attention mechanisms, ringX demonstrates its effectiveness through training benchmarks of a Vision Transformer (ViT) on a climate dataset and a Generative Pre-Trained Transformer (GPT) model, Llama3 8B. Our method attains an end-to-end training speedup of approximately 1.5 × in both scenarios. To our knowledge, the achieved 38% model FLOPs utilization (MFU) for training Llama3 8B with a 1M-token sequence length on 4,096 GPUs represents one of the highest training efficiencies reported for long-context learning on HPC systems. Our code implementation is available at https://github.com/jqyin/ringX-attention.
Keep this discovery
Explore connections, maps & timelines
Yin, Junqi [ORNL] (ORCID:0000000338435520), Palash, Mijanur [ORNL] (ORCID:0000000297511370), Shankar, Mallikarjun (Arjun) [ORNL] (ORCID:0000000152897460), Wang, Feiyi [ORNL] (ORCID:0000000200991559). 2025-11-01. RingX: Scalable Parallel Attention for Long-Context Learning on HPC. https://doi.org/10.1145/3712285.3759859
Cite the original work for its findings. Save a collection to share your selection of sources.