북극 눈 해독기: 코드 사전 훈련에서 고품질 데이터의 신비 해제
Arctic-SnowCoder: Demystifying High-Quality Data in Code Pretraining
September 3, 2024
저자: Yuxiang Wei, Hojae Han, Rajhans Samdani
cs.AI
초록
최근 연구들은 언어 모델의 효과적인 사전 학습을 위해 고품질 데이터가 중요하다는 점을 점점 더 입증하고 있습니다. 그러나 "고품질"의 정확한 정의는 아직 탐구되지 않은 상태입니다. 코드 도메인에 초점을 맞춰, 우리는 Arctic-SnowCoder-1.3B를 소개합니다. 이는 555B 토큰을 통해 세 단계의 점진적으로 정제된 데이터를 거친 데이터 효율적인 기본 코드 모델 사전 학습을 한 것입니다. 첫째, 500B의 표준 품질 코드 토큰을 기본 필터링, 중복 제거 및 오염 제거를 거친 후 사전 학습하였으며, 둘째, BERT 스타일 품질 주석기에 의해 선별된 50B의 고품질 토큰을 이용하여 계속된 사전 학습을 진행하였습니다. 이 주석기는 높은 품질의 코드 파일에서 추출된 긍정적 예시를 사용하여 좋은 코드와 무작위 데이터를 구별하도록 훈련되었으며, Magicoder 및 StarCoder2-Instruct로부터의 지시 데이터를 사용하였습니다. 셋째, 두 번째 단계 데이터를 시드로 사용하여 Llama-3.1-70B에 의해 생성된 5B의 합성 데이터를 이용하여 강화된 사전 학습을 하였습니다. 이는 사전 학습을 위해 Magicoder 접근법을 적용한 것입니다. 제한된 데이터셋에서 훈련되었음에도 불구하고, Arctic-SnowCoder는 BigCodeBench에서 최신 기술을 선보이며, 1T 토큰 이상으로 훈련된 유사 규모의 모델들을 능가하여 Phi-1.5-1.3B를 36%로 앞섭니다. 모든 평가 벤치마크에서 Arctic-SnowCoder-1.3B는 1T 토큰으로 사전 학습된 StarCoderBase-3B를 이기고 있습니다. 게다가, 이는 수조 토큰으로 훈련된 주요 소규모 기본 코드 모델들의 성능과 일치합니다. 예를 들어, Arctic-SnowCoder-1.3B는 3.3T 토큰 이상으로 사전 학습된 StarCoder2-3B를 HumanEval+에서 앞섰으며, 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.Summary
AI-Generated Summary