arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.08476cs.DCcs.AI
收藏

FlashCP: 面向LLM训练的负载均衡且通信高效的上下文并行

FlashCP: Load-Balanced Communication-Efficient Context Parallelism for LLM Training

Stanford University(斯坦福大学)

Zheng Wang, Eric Liu, Linan Jiang, Zhongkai Yu, Zaifeng Pan, Yue Guan, Yuke Wang, Yufei Ding

AI总结:

提出FlashCP框架,通过分片感知通信消除冗余KV传输,并设计Whole-Doc分片策略与启发式算法,实现负载均衡与通信高效,在多种数据集上取得最高1.63倍加速。

摘要:

上下文并行(CP)对于训练大规模长上下文语言模型至关重要,因为它通过划分序列来减少内存开销。然而,现有的CP方法由于静态序列分片和键值(KV)张量通信,存在工作负载不平衡、内核效率低下以及通信冗余的问题。我们提出了FlashCP,一个用于CP训练的负载均衡且通信高效的框架。FlashCP引入了一种分片感知的通信机制以消除冗余的KV通信,并提出了一种新颖的Whole-Doc分片策略,在保持工作负载平衡的同时最大化通信节省。为了高效结合Whole-Doc和Per-Doc分片,FlashCP进一步设计了一种启发式算法来搜索接近最优的分片方案。大量实验表明,FlashCP在多种数据集上相比最先进的CP框架实现了最高1.63倍的加速。

英文摘要:

Context parallelism (CP) is essential for training large-scale, long-context language models, as it partitions sequences to reduce memory overhead. However, existing CP methods suffer from workload imbalance, inefficient kernels, and redundant communication due to static sequence sharding and key-value (KV) tensor communication. We present FlashCP, a load-balanced and communication-efficient framework for CP training. FlashCP introduces a sharding-aware communication mechanism to eliminate redundant KV communication and proposes a novel Whole-Doc sharding strategy that maximizes communication savings while maintaining balanced workloads. To efficiently combine Whole-Doc and Per-Doc sharding, FlashCP further designs a heuristic algorithm to search for near-optimal sharding plans. Extensive experiments show that FlashCP achieves up to 1.63x speedup over state-of-the-art CP frameworks across diverse datasets.

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

↑