通过跳过和重排模型层,显著缩短大模型训练时间。
SkipPipe: Partial and Reordered Pipelining Framework for Training LLMs in Heterogeneous Networks
- 允许跳过部分层并重排执行顺序,打破传统流水线约束。
- 在20节点上训练时,迭代时间最多减少55%。
- 适合大规模异构集群中高效训练大模型的研究者。
大语言模型(LLM)的训练普遍采用数据并行与流水线并行。为降低成本,近期工作关注端到端训练中的高效通信安排。受大模型对层跳过和层重排具有鲁棒性的启发,本文探索流水线训练中跳过若干连续层(阶段),并挑战传统的顺序流水线执行方式。我们推导出含层跳过与阶段重排的流水线训练的收敛性与吞吐量约束(指导原则)。基于这些约束,提出SkipPipe——首个可部分跳过的流水线框架,在保持收敛性的前提下降低端到端训练时间。其核心是路径调度算法,针对每个微批次优化执行路径,减少分布式节点上的空闲时间(由微批次冲突导致),且满足指定的跳过比例。我们在多达20个节点上,对500M至8B参数的LLaMa模型进行了广泛评估。结果表明,相比完整流水线,迭代时间最多降低55%。此外,部分流水线训练还增强了推理时对层缺失的鲁棒性,仅使用一半模型时困惑度下降7%。代码已公开于https://github.com/gensyn-ai/skippipe。
原文摘要 · Abstract (English)
Data and pipeline parallelism are ubiquitous for training of Large Language Models (LLM) on distributed nodes. Driven by the need for cost-effective training, recent work explores efficient communication arrangement for end to end training. Motivated by LLM's resistance to layer skipping and layer reordering, in this paper, we explore stage (several consecutive layers) skipping in pipeline training, and challenge the conventional practice of sequential pipeline execution. We derive convergence and throughput constraints (guidelines) for pipelining with skipping and swapping pipeline stages. Based on these constraints, we propose SkipPipe, the first partial pipeline framework to reduce the end-to-end training time for LLMs while preserving the convergence. The core of SkipPipe is a path scheduling algorithm that optimizes the paths for individual microbatches and reduces idle time (due to microbatch collisions) on the distributed nodes, complying with the given stage skipping ratio. We extensively evaluate SkipPipe on LLaMa models from 500M to 8B parameters on up to 20 nodes. Our results show that SkipPipe reduces training iteration time by up to $55\%$ compared to full pipeline. Our partial pipeline training also improves resistance to layer omission during inference, experiencing a drop in perplexity of only $7\%$ when running only half the model. Our code is available at https://github.com/gensyn-ai/skippipe.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。