言語モデルのための最適制御によるデータ選択
Data Selection via Optimal Control for Language Models
October 9, 2024
著者: Yuxian Gu, Li Dong, Hongning Wang, Yaru Hao, Qingxiu Dong, Furu Wei, Minlie Huang
cs.AI
要旨
この研究は、大規模なコーパスから高品質な事前学習データを選択し、言語モデル(LM)の下流利用能力を向上させることを探求しています。我々はデータ選択を一般化された最適制御問題として定式化し、Pontryaginの最大原理(PMP)によって理論的に解決できます。これにより、最適データ選択とLMトレーニングダイナミクスとの関係を特徴付ける一連の必要条件が導かれます。これらの理論的結果に基づき、PMPベースのデータ選択(PDS)を導入し、PMP条件を解くことで最適データ選択を近似するフレームワークを提案します。実験では、PDSを採用してCommmonCrawlからデータを選択し、PDSによって選択されたコーパスがLMの学習を加速し、様々なモデルサイズで幅広い下流タスクでのパフォーマンスを常に向上させることを示します。さらに、PDSの利点は、スケーリング則に従ったテスト損失曲線の外挿によって証明されるように、約400Bモデルが約10Tトークンでトレーニングされた場合にも及びます。PDSは、事前学習データが限られている場合にデータ需要を1.8倍削減することで、利用可能なWebクロールコーパスの迅速な枯渇を緩和し、データの利用を改善します。コード、データ、およびモデルのチェックポイントは、https://github.com/microsoft/LMOps/tree/main/data_selection で入手できます。
English
This work investigates the selection of high-quality pre-training data from
massive corpora to enhance LMs' capabilities for downstream usage. We formulate
data selection as a generalized Optimal Control problem, which can be solved
theoretically by Pontryagin's Maximum Principle (PMP), yielding a set of
necessary conditions that characterize the relationship between optimal data
selection and LM training dynamics. Based on these theoretical results, we
introduce PMP-based Data Selection (PDS), a framework that approximates optimal
data selection by solving the PMP conditions. In our experiments, we adopt PDS
to select data from CommmonCrawl and show that the PDS-selected corpus
accelerates the learning of LMs and constantly boosts their performance on a
wide range of downstream tasks across various model sizes. Moreover, the
benefits of PDS extend to ~400B models trained on ~10T tokens, as evidenced by
the extrapolation of the test loss curves according to the Scaling Laws. PDS
also improves data utilization when the pre-training data is limited, by
reducing the data demand by 1.8 times, which mitigates the quick exhaustion of
available web-crawled corpora. Our code, data, and model checkpoints can be
found in https://github.com/microsoft/LMOps/tree/main/data_selection.Summary
AI-Generated Summary