arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.13198cs.LGcs.AI
收藏

ParaDySe:面向Transformer中动态序列长度的并行策略切换框架

ParaDySe: A Parallel-Strategy Switching Framework for Dynamic Sequence Lengths in Transformer

Zhixin Ou, Peng Liang, Jianchen Han, Baihui Liu, Linbo Qiao

AI总结:

针对现有LLM训练框架静态并行策略无法适配动态长度序列、易引发短序列效率损失与长序列OOM的问题,提出ParaDySe自适应并行策略切换框架,可实现最优策略无缝热切换,有效解决训练中的OOM与CPC瓶颈。

摘要:

长度各异的动态序列已被广泛应用于基于Transformer的大语言模型(LLM)训练中。然而,现有训练框架对这些序列采用预定义的静态并行策略,既无法在短序列上实现通信-并行开销抵消,又会在长序列上引发内存不足(OOM)问题。为缓解上述问题,我们提出了新型面向动态序列的自适应并行策略切换框架ParaDySe。ParaDySe可根据实时输入序列即时采用最优策略:它首先基于统一张量布局规范实现了各并行策略的模块化函数库,随后通过混合方法构建了序列感知的内存与时间开销模型;在开销模型指导下,ParaDySe通过高效启发式算法为动态序列选择最优的分层策略。通过整合上述技术,ParaDySe可依托其精心设计的函数库实现最优策略的无缝热切换。我们在序列长度最高达624K的数据集上,以代表性大语言模型为基准将ParaDySe与基线方法进行对比,实验结果表明,ParaDySe通过将长序列优化与现有框架系统性整合,解决了大语言模型训练中的OOM与CPC瓶颈问题。

英文摘要:

Dynamic sequences with varying lengths have been widely used in the training of Transformer-based large language models (LLMs). However, current training frameworks adopt a pre-defined static parallel strategy for these sequences, causing neither communication-parallelization cancellation on short sequences nor out-of-memory on long sequences. To mitigate these issues, we propose ParaDySe, a novel adaptive Parallel strategy switching framework for Dynamic Sequences. ParaDySe enables on-the-fly optimal strategy adoption according to the immediate input sequence. It first implements the modular function libraries for parallel strategies with unified tensor layout specifications, and then builds sequence-aware memory and time cost models with hybrid methods. Guided by cost models, ParaDySe selects optimal layer-wise strategies for dynamic sequences via an efficient heuristic algorithm. By integrating these techniques together, ParaDySe achieves seamless hot-switching of optimal strategies through its well-designed function libraries. We compare ParaDySe with baselines on representative LLMs under datasets with sequence lengths up to 624K. Experimental results indicate that ParaDySe addresses OOM and CPC bottlenecks in LLM training by systematically integrating long-sequence optimizations with existing frameworks.

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

↑