ChatPaper.aiChatPaper

小型言語モデルの最適化とアーキテクチャの再考

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)の力は、膨大なデータと計算リソースによって実証されてきました。しかし、モバイルデバイスにおける言語モデルの適用は、計算コストとメモリコストの面で大きな課題に直面しており、高性能な小型言語モデルが緊急に求められています。高度に複雑なトレーニングプロセスに制約されるため、言語モデルを最適化するための多くの詳細が十分に研究されていないのが現状です。本研究では、1Bパラメータの小型言語モデルを基に、各コンポーネントの効果を分析するために一連の実証研究を慎重に設計しました。主に3つの観点、すなわちニューラルアーキテクチャ、パラメータ初期化、および最適化戦略について議論します。トークナイザーの圧縮、アーキテクチャの微調整、パラメータの継承、複数回のトレーニングなど、いくつかの設計手法が小型言語モデルに対して特に有効であることが実証的に証明されました。その後、確立された手法に従って、1.6Tの多言語コーパスでPanGu-pi-1B ProとPanGu-pi-1.5B Proをトレーニングしました。実験結果は、最適化とアーキテクチャの改善により、PanGu-pi-1B Proがベンチマーク評価セットで平均8.87の顕著な向上を示したことを実証しています。さらに、PanGu-pi-1.5B Proは、より大きなモデルサイズを持つ一連のSOTAモデルを凌駕し、その優れた性能を検証しました。コードは近日中に公開予定です(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).
PDF131December 15, 2024