Saved in:
Bibliographic Details
Main Authors: Ou, Zhixin, Liang, Peng, Han, Jianchen, Liu, Baihui, Qiao, Linbo
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2511.13198
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909908184596480
author Ou, Zhixin
Liang, Peng
Han, Jianchen
Liu, Baihui
Qiao, Linbo
author_facet Ou, Zhixin
Liang, Peng
Han, Jianchen
Liu, Baihui
Qiao, Linbo
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2511_13198
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ParaDySe: A Parallel-Strategy Switching Framework for Dynamic Sequence Lengths in Transformer
Ou, Zhixin
Liang, Peng
Han, Jianchen
Liu, Baihui
Qiao, Linbo
Machine Learning
Artificial Intelligence
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.
title ParaDySe: A Parallel-Strategy Switching Framework for Dynamic Sequence Lengths in Transformer
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2511.13198