ChatPaper.aiChatPaper

Lang-Context Attention Benchmark: Van Kernelefficiëntie tot Gedistribueerde Context-parallelisme

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

October 19, 2025
Auteurs: Tao Bu, Qiangang Wang, Bowen Zeng, Hanwen Sun, Yunpeng Huang, Chun Cao, Jingwei Xu
cs.AI

Samenvatting

Op transformers gebaseerde grote taalmodellen (LLM's) hebben opmerkelijke successen geboekt, maar hun standaard aandachtmechanisme veroorzaakt kwadratische reken- en geheugenkosten ten opzichte van de sequentielengte, wat een grote bottleneck vormt voor training met lange context. Eerder werk pakte deze uitdaging aan langs twee richtingen: (1) kernel-level optimalisaties, die dichte en sparse aandachtoperators versnellen; en (2) module-level strategieën, vaak aangeduid als gedistribueerde aandacht of context-parallelle training, die aandacht schalen over meerdere apparaten. Systematische evaluatie blijft echter beperkt: operator-level vergelijkingen zijn vaak incompleet, terwijl context-parallelle strategieën typisch frameworkspecifiek zijn, met onduidelijke prestatie-analyse across contexten. Om deze lacunes aan te pakken, stellen we een uniforme benchmark voor die representatieve aandachtkernels en context-parallelle mechanismen integreert met een modulaire en uitbreidbare interface voor evaluatie. De benchmark evalueert methoden langs twee kritieke dimensies: (1) aandachtmaskerpatronen, die de efficiëntie, schaalbaarheid en bruikbaarheid sterk beïnvloeden, en (2) sequentielengte en gedistribueerde schaal, die de prestaties onder extreme lange-context training bepalen. Door middel van uitgebreide experimenten op een cluster van maximaal 96 GPU's stelt onze benchmark reproduceerbare vergelijkingen in staat, benadrukt methode-specifieke afwegingen, en biedt praktische richtlijnen voor het ontwerpen en inzetten van aandachtmechanismen bij lange-context LLM-training.
English
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.
PDF42December 2, 2025