Introduction
TASP (Topology-Aware Sequence Parallelism) is a novel approach designed to accelerate long-context Large Language Model (LLM) training and inference by optimizing data movement across GPU clusters. As context windows expand to millions of tokens, the quadratic complexity of self-attention creates significant bottlenecks. TASP addresses this by decomposing complex hardware interconnects into multiple concurrent "rings," achieving up to a 3.58× speedup over standard Ring Attention.
The Bottleneck: Ring Attention on Modern Hardware
Standard Sequence Parallelism (SP) methods, such as Ring Attention, shard sequences across multiple accelerators. However, Ring Attention relies on a simple ring-style data transfer that fails to exploit the dense "AlltoAll" topologies of modern GPU clusters (e.g., NVIDIA H100 with NVSwitch or AMD MI300X with Infinity Fabric).
In an 8-GPU system, a single ring utilizes only about 14% of the available communication capacity. This leads to a low Compute-to-Communication Ratio (CCR), leaving GPUs idle while waiting for data. TASP resolves this mismatch by transforming an underutilized hardware "highway" into a high-throughput multi-lane system.
TASP Methodology
TASP optimizes communication through three primary techniques:
- Topology Decomposition: Using Hamiltonian decomposition, TASP breaks down fully-connected or switch-based topologies into multiple "orthogonal" rings—paths that visit every GPU exactly once without sharing physical links.
- Primitive Decomposition: Instead of a single large transfer, TASP decomposes the "Ring AllGather" operation into multiple smaller chunks sent across all decomposed rings simultaneously, ensuring full utilization of every physical link.
- Zig-zag Chunk Placement: To maintain load balance in causal attention (where tokens only attend to predecessors), TASP adapts the "Zig-zag" strategy for multi-ring setups.
Key Results
Evaluations on NVIDIA H100 and AMD MI300X systems demonstrate significant performance gains:
- Speedups: TASP achieved up to 2.31× speedup on H100 and 3.58× speedup on MI300X compared to standard Ring Attention.
- Communication Efficiency: Communication-only speedups reached 4.72× on MI300X.
- Multi-Node Performance: Average speedups of 1.43× on two nodes and 1.27× on four nodes were observed on H100 clusters.
- Load Balancing: The adapted Zig-zag strategy achieved near-perfect (100%) load balance for causal attention tasks.
Limitations and Future Work
While TASP offers substantial gains, its benefits diminish in workloads that are already heavily compute-bound (e.g., extremely long sequences where computation vastly outweighs communication). Additionally, fine-grained partitioning introduces a minor management overhead (roughly 1-5%). Future research will explore the interaction between TASP and sparse attention mechanisms, as well as further kernel optimizations to merge KV concatenation and attention operations.
Summary updated