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

EE-LLM:利用3D并行进行早退大语言模型的大规模训练与推理

EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism

Alibaba Group(阿里巴巴集团)

Yanxi Chen, Xuchen Pan, Yaliang Li, Bolin Ding, Jingren Zhou

AI总结:

本文提出基于 Megatron-LM 的 EE-LLM 框架,通过3D并行及面向早退的训练、调度和 KV caching 推理优化,实现低开销大规模训练与无损质量的显著推理加速。

摘要:

我们提出了 EE-LLM,这是一个用于早退(early-exit)大语言模型(LLM)大规模训练和推理的框架。尽管近期工作已经给出初步证据,表明早退能够加速 LLM 推理,但 EE-LLM 通过支持结合大规模3D并行的训练与推理,为扩展早退 LLM 迈出了基础性一步。EE-LLM 构建于 Megatron-LM 之上,实现了多种针对早退定制的算法创新和性能优化,包括一种轻量级方法,用于在流水线并行下为早退训练目标促进反向传播;利用原始流水线调度中空闲资源来执行早退层相关计算的技术;以及两种与自回归生成中的 KV caching 兼容的早退推理方法。我们的分析和实证研究表明,与标准 LLM 训练相比,EE-LLM 以可忽略的计算开销实现了很高的训练效率,同时在不损害输出质量的情况下取得了显著的推理加速。为促进进一步研究和采用,我们在 https://github.com/pan-x-c/EE-LLM 发布了 EE-LLM。

英文摘要:

We present EE-LLM, a framework for large-scale training and inference of early-exit large language models (LLMs). While recent works have shown preliminary evidence for the efficacy of early exiting in accelerating LLM inference, EE-LLM makes a foundational step towards scaling up early-exit LLMs by supporting their training and inference with massive 3D parallelism. Built upon Megatron-LM, EE-LLM implements a variety of algorithmic innovations and performance optimizations tailored to early exiting, including a lightweight method that facilitates backpropagation for the early-exit training objective with pipeline parallelism, techniques of leveraging idle resources in the original pipeline schedule for computation related to early-exit layers, and two approaches of early-exit inference that are compatible with KV caching for autoregressive generation. Our analytical and empirical study shows that EE-LLM achieves great training efficiency with negligible computational overhead compared to standard LLM training, as well as outstanding inference speedup without compromising output quality. To facilitate further research and adoption, we release EE-LLM at https://github.com/pan-x-c/EE-LLM.

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

↑