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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Chen, Yanxi, Pan, Xuchen, Li, Yaliang, Ding, Bolin, Zhou, Jingren
Natura: Preprint
Pubblicazione: 2023
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916288079593472
author Chen, Yanxi
Pan, Xuchen
Li, Yaliang
Ding, Bolin
Zhou, Jingren
author_facet Chen, Yanxi
Pan, Xuchen
Li, Yaliang
Ding, Bolin
Zhou, Jingren
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2312_04916
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism
Chen, Yanxi
Pan, Xuchen
Li, Yaliang
Ding, Bolin
Zhou, Jingren
Machine Learning
Artificial Intelligence
Distributed, Parallel, and Cluster Computing
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.
title EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism
topic Machine Learning
Artificial Intelligence
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2312.04916