소형 언어 모델을 위한 최적화 및 아키텍처 재고
Rethinking Optimization and Architecture for Tiny Language Models
February 5, 2024
저자: Yehui Tang, Fangcheng Liu, Yunsheng Ni, Yuchuan Tian, Zheyuan Bai, Yi-Qi Hu, Sichao Liu, Shangling Jui, Kai Han, Yunhe Wang
cs.AI
초록
대규모 언어 모델(LLM)의 성능은 방대한 데이터와 컴퓨팅 자원을 통해 입증되었습니다. 그러나 모바일 기기에서의 언어 모델 적용은 계산 및 메모리 비용 측면에서 큰 도전에 직면해 있으며, 이에 따라 고성능의 소형 언어 모델이 시급히 요구되고 있습니다. 매우 복잡한 학습 과정으로 인해 언어 모델 최적화에 대한 많은 세부 사항들이 충분히 연구되지 못한 상황입니다. 본 연구에서는 10억 개의 파라미터를 가진 소형 언어 모델을 기반으로, 각 구성 요소의 영향을 분석하기 위해 일련의 실험적 연구를 신중하게 설계했습니다. 주로 신경망 구조, 파라미터 초기화, 최적화 전략이라는 세 가지 관점을 논의했습니다. 토크나이저 압축, 구조 조정, 파라미터 상속, 다중 라운드 학습 등이 소형 언어 모델에 특히 효과적이라는 여러 설계 공식이 실험적으로 입증되었습니다. 이후, 이러한 공식을 따라 1.6TB의 다국어 코퍼스에서 PanGu-pi-1B Pro와 PanGu-pi-1.5B Pro를 학습시켰습니다. 실험 결과, 최적화 및 구조 개선이 PanGu-pi-1B Pro의 벤치마크 평가 세트에서 평균 8.87의 상당한 성능 향상을 가져왔음을 확인했습니다. 또한, PanGu-pi-1.5B Pro는 더 큰 모델 크기를 가진 여러 최신 모델들을 능가하며 그 우수한 성능을 입증했습니다. 코드는 곧 공개될 예정입니다(https://github.com/YuchuanTian/RethinkTinyLM).
English
The power of large language models (LLMs) has been demonstrated through
numerous data and computing resources. However, the application of language
models on mobile devices is facing huge challenge on the computation and memory
costs, that is, tiny language models with high performance are urgently
required. Limited by the highly complex training process, there are many
details for optimizing language models that are seldom studied carefully. In
this study, based on a tiny language model with 1B parameters, we carefully
design a series of empirical study to analyze the effect of each component.
Three perspectives are mainly discussed, i.e., neural architecture, parameter
initialization, and optimization strategy. Several design formulas are
empirically proved especially effective for tiny language models, including
tokenizer compression, architecture tweaking, parameter inheritance and
multiple-round training. Then we train PanGu-pi-1B Pro and PanGu-pi-1.5B
Pro on 1.6T multilingual corpora, following the established formulas.
Experimental results demonstrate the improved optimization and architecture
yield a notable average improvement of 8.87 on benchmark evaluation sets for
PanGu-pi-1B Pro. Besides, PanGu-pi-1.5B Pro surpasses a range of SOTA
models with larger model sizes, validating its superior performance. The code
will be released soon (https://github.com/YuchuanTian/RethinkTinyLM).