arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.18121cs.LGcs.DC
收藏

通过核心注意力解耦实现高效长上下文语言模型训练

Efficient Long-context Language Model Training by Core Attention Disaggregation

Yonghao Zhuang, Junda Chen, Bo Pang, Yi Gu, Yibo Zhu, Yimin Jiang, Ion Stoica, Eric Xing, Hao Zhang

AI总结:

提出核心注意力解耦方法 CAD 及系统 DistCA,将 softmax(QK^T)V 调度到专用服务器动态批处理,在 512 块 H200、512k 上下文下提升训练吞吐 1.35 倍并消除并行落后者。

摘要:

我们提出了核心注意力解耦(core attention disaggregation,CAD),该技术通过将核心注意力计算 softmax(QK^T)V 与模型其余部分解耦,并在独立的设备池上执行,来改进长上下文大型语言模型训练。在现有系统中,核心注意力与其他层协同部署;在长上下文长度下,与其他组件近线性增长相比,其计算量呈二次增长,导致数据并行组和流水线并行组之间出现负载不均衡和落后者。CAD 由两个观察所支撑。首先,核心注意力是无状态的:它没有可训练参数,仅有极少的临时数据,因此负载均衡可归结为调度计算密集型任务。其次,它具有可组合性:现代注意力内核在处理由任意长度的 token 级分片组成的融合批次时仍能保持高效率。CAD 将核心注意力划分为 token 级任务,并将其分派到专用注意力服务器,这些服务器动态重新组合任务批次,以在不牺牲内核效率的情况下均衡计算。我们在名为 DistCA 的系统中实现了 CAD,该系统采用乒乓执行方案使通信与计算完全重叠,并在注意力服务器上使用原地执行以减少内存占用。在 512 块 H200 GPU 上以及最高 512k token 的上下文长度下,DistCA 将端到端训练吞吐量提升最高达 1.35 倍,消除了数据并行和流水线并行的落后者,并实现了近乎完美的计算与内存均衡。

英文摘要:

We present core attention disaggregation (CAD), a technique that improves long-context large language model training by decoupling the core attention computation, softmax(QK^T)V, from the rest of the model and executing it on a separate pool of devices. In existing systems, core attention is colocated with other layers; at long context lengths, its quadratic compute growth compared to the near-linear growth of other components causes load imbalance and stragglers across data and pipeline parallel groups. CAD is enabled by two observations. First, core attention is stateless: it has no trainable parameters and only minimal transient data, so balancing reduces to scheduling compute-bound tasks. Second, it is composable: modern attention kernels retain high efficiency when processing fused batches of token-level shards with arbitrary lengths. CAD partitions core attention into token-level tasks and dispatches them to dedicated attention servers, which dynamically rebatch tasks to equalize compute without sacrificing kernel efficiency. We implement CAD in a system called DistCA, which uses a ping-pong execution scheme to fully overlap communication with computation and in-place execution on attention servers to reduce memory use. On 512 H200 GPUs and context lengths up to 512k tokens, DistCA improves end-to-end training throughput by up to 1.35x, eliminates data and pipeline parallel stragglers, and achieves near-perfect compute and memory balance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑