Long-Context Attention Benchmark: From Kernel Efficiency to Distributed Context Parallelism

Tao Bu, Qiangang Wang, Bowen Zeng, Hanwen Sun, Yunpeng Huang +2 more
10/19/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Transformer-based large language models (LLMs) have achieved remarkable success, yet their standard attention mechanism incurs quadratic computation and memory costs with respect to sequence length, posing a major bottleneck for long-context training. Prior work tackles this challenge along two directions: (1) kernel-level optimizations, which accelerate dense and sparse attention operators; and (2) module-level strategies, often referred to as distributed attention or context parallel training, which scale attention across multiple devices. However, systematic evaluation still remains limited: operator-level comparisons are often incomplete, while context parallel strategies are typically framework-specific, with unclear performance analysis across contexts. To address these gaps, we propose a unified benchmark that integrates representative attention kernels and context parallel mechanisms with a modular and extensible interface for evaluation. The benchmark evaluates methods along two critical dimensions: (1) attention mask patterns, which strongly affect efficiency, scalability, and usability, and (2) sequence length and distributed scale, which determine performance under extreme long-context training. Through comprehensive experiments on the cluster of up to 96 GPUs, our benchmark enables reproducible comparisons, highlights method-specific trade-offs, and provides practical guidance for designing and deploying attention mechanisms in long-context LLM training.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bu2025longcontext,
  title  = {Long-Context Attention Benchmark: From Kernel Efficiency to Distributed Context Parallelism},
  author = {Tao Bu and Qiangang Wang and Bowen Zeng and Hanwen Sun and Yunpeng Huang and Chun Cao and Jingwei Xu},
  year   = {2025},
  eprint = {2510.17896},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.17896v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.17896.svg)](https://codeofpaper.com/paper/2510.17896)

Discussion