ChatPaper.aiChatPaper

EE-LLM: 3D 병렬화를 통한 대규모 조기 종료 대형 언어 모델의 학습 및 추론

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

December 8, 2023
저자: Yanxi Chen, Xuchen Pan, Yaliang Li, Bolin Ding, Jingren Zhou
cs.AI

초록

우리는 대규모 조기 종료 대형 언어 모델(LLM)의 학습과 추론을 위한 프레임워크인 EE-LLM을 소개합니다. 최근 연구들은 LLM 추론 가속화를 위한 조기 종료의 효용성을 예비적으로 보여주었지만, EE-LLM은 대규모 3D 병렬화를 통해 조기 종료 LLM의 학습과 추론을 지원함으로써 이를 확장하는 데 있어 기초적인 단계를 마련했습니다. Megatron-LM을 기반으로 구축된 EE-LLM은 조기 종료에 특화된 다양한 알고리즘 혁신과 성능 최적화를 구현했습니다. 여기에는 파이프라인 병렬화를 통해 조기 종료 학습 목표에 대한 역전파를 용이하게 하는 경량화된 방법, 원래 파이프라인 스케줄에서 유휴 자원을 활용하여 조기 종료 레이어와 관련된 계산을 수행하는 기술, 그리고 자동회귀 생성을 위한 KV 캐싱과 호환되는 두 가지 조기 종료 추론 접근법이 포함됩니다. 우리의 분석적 및 실증적 연구는 EE-LLM이 표준 LLM 학습에 비해 무시할 수 있는 계산 오버헤드로 뛰어난 학습 효율성을 달성하며, 출력 품질을 저하시키지 않으면서도 탁월한 추론 속도 향상을 보여줍니다. 추가 연구와 도입을 촉진하기 위해 EE-LLM을 https://github.com/pan-x-c/EE-LLM에서 공개합니다.
English
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.
PDF77December 15, 2024