Arctic-SnowCoder: コード事前学習における高品質データの解明
Arctic-SnowCoder: Demystifying High-Quality Data in Code Pretraining
September 3, 2024
著者: Yuxiang Wei, Hojae Han, Rajhans Samdani
cs.AI
要旨
最近の研究では、高品質なデータが言語モデルの効果的な事前学習に不可欠であることがますます示されています。ただし、「高品質」という厳密な定義は未だに未開拓の領域です。コード領域に焦点を当て、我々はArctic-SnowCoder-1.3Bを紹介します。このモデルは、3段階の段階的に洗練されたデータを通じて555Bのトークンで事前学習された、データ効率の高いベースコードモデルです。具体的には、(1) 500Bの標準品質のコードトークンを基本的なフィルタリング、重複排除、および汚染除去を経て前処理し、一般的な事前学習を行います。(2) 第一段階から選択された50Bの高品質トークンを、BERTスタイルの品質注釈付けツールによって継続的に事前学習し、高品質のコードファイルからの正例を使用し、MagicoderおよびStarCoder2-Instructからの指示データを使用します。(3) 第二段階のデータをシードとして使用し、Llama-3.1-70Bによって生成された5Bの合成データを用いて強化事前学習を行います。これは、事前学習のためにMagicoderアプローチを適応したものです。限られたデータセットで訓練されているにもかかわらず、Arctic-SnowCoderは、実用的で難解なプログラミングタスクに焦点を当てたBigCodeBenchで、1Tトークン以下で訓練された同様のサイズのモデルを上回り、Phi-1.5-1.3Bを36%上回る最先端の性能を達成しています。すべての評価ベンチマークにおいて、Arctic-SnowCoder-1.3Bは、1Tトークンで事前学習されたStarCoderBase-3Bを凌駕しています。さらに、3兆トークン以上で事前学習された主要な小規模ベースコードモデルとの性能を匹敵しています。例えば、Arctic-SnowCoder-1.3Bは、HumanEval+で、関数レベルのコード生成を評価するベンチマークで、3.3Tトークン以上で事前学習されたStarCoder2-3Bを上回り、BigCodeBenchでも競争力を維持しています。我々の評価は、Arctic-SnowCoderのさまざまな設計選択を正当化する包括的な分析を提示しています。最も重要なことは、高品質なデータの鍵は、下流アプリケーションの分布と整合していることです。
English
Recent studies have been increasingly demonstrating that high-quality data is
crucial for effective pretraining of language models. However, the precise
definition of "high-quality" remains underexplored. Focusing on the code
domain, we introduce Arctic-SnowCoder-1.3B, a data-efficient base code model
pretrained on 555B tokens through three phases of progressively refined data:
(1) general pretraining with 500B standard-quality code tokens, preprocessed
through basic filtering, deduplication, and decontamination, (2) continued
pretraining with 50B high-quality tokens, selected from phase one by a
BERT-style quality annotator trained to distinguish good code from random data,
using positive examples drawn from high-quality code files, along with
instruction data from Magicoder and StarCoder2-Instruct, and (3) enhanced
pretraining with 5B synthetic data created by Llama-3.1-70B using phase two
data as seeds, adapting the Magicoder approach for pretraining. Despite being
trained on a limited dataset, Arctic-SnowCoder achieves state-of-the-art
performance on BigCodeBench, a coding benchmark focusing on practical and
challenging programming tasks, compared to similarly sized models trained on no
more than 1T tokens, outperforming Phi-1.5-1.3B by 36%. Across all evaluated
benchmarks, Arctic-SnowCoder-1.3B beats StarCoderBase-3B pretrained on 1T
tokens. Additionally, it matches the performance of leading small base code
models trained on trillions of tokens. For example, Arctic-SnowCoder-1.3B
surpasses StarCoder2-3B, pretrained on over 3.3T tokens, on HumanEval+, a
benchmark that evaluates function-level code generation, and remains
competitive on BigCodeBench. Our evaluation presents a comprehensive analysis
justifying various design choices for Arctic-SnowCoder. Most importantly, we
find that the key to high-quality data is its alignment with the distribution
of downstream applications.