arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.02326cs.CLcs.AI
收藏

Arctic-SnowCoder:揭示代码预训练中高质量数据的奥秘

Arctic-SnowCoder: Demystifying High-Quality Data in Code Pretraining

Snowflake AI Research(Snowflake AI研究部);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Seoul National University(首尔大学)

Yuxiang Wei, Hojae Han, Rajhans Samdani

AI总结:

本文提出 Arctic-SnowCoder-1.3B,通过三阶段渐进式数据精炼策略(通用预训练、高质量数据筛选持续预训练、合成数据增强预训练),在仅 555B token 上实现了超越更大规模模型的代码生成性能,揭示高质量数据的关键在于与下游应用分布对齐。

摘要:

近期研究日益表明,高质量数据对于语言模型的有效预训练至关重要。然而,“高质量”的精确定义仍未得到充分探索。聚焦于代码领域,我们提出了 Arctic-SnowCoder-1.3B,一个数据高效的基座代码模型,通过三个逐步精炼数据的阶段在 555B token 上完成预训练:(1)使用 500B 标准质量代码 token 进行通用预训练,经过基础过滤、去重和去污染预处理;(2)使用 50B 高质量 token 进行持续预训练,这些 token 由第一阶段数据经一个 BERT 风格的质量标注器筛选而来,该标注器经过训练以区分优质代码与随机数据,其正例来源于高质量代码文件,同时结合了来自 Magicoder 和 StarCoder2-Instruct 的指令数据;(3)使用 Llama-3.1-70B 以第二阶段数据为种子生成的 5B 合成数据进行增强预训练,该过程将 Magicoder 方法适配到预训练场景。尽管训练数据有限,Arctic-SnowCoder 在 BigCodeBench(一个专注于实用且具有挑战性的编程任务的编码基准)上,与训练数据不超过 1T token 的同等规模模型相比,取得了最先进的性能,超越 Phi-1.5-1.3B 达 36%。在所有评估基准上,Arctic-SnowCoder-1.3B 均优于在 1T token 上预训练的 StarCoderBase-3B。此外,其性能与在数万亿 token 上训练的领先小型基座代码模型相当。例如,Arctic-SnowCoder-1.3B 在 HumanEval+(一个评估函数级代码生成的基准)上超越了在超过 3.3T token 上预训练的 StarCoder2-3B,并在 BigCodeBench 上保持竞争力。我们的评估提供了全面的分析,论证了 Arctic-SnowCoder 的各项设计选择。最重要的是,我们发现高质量数据的关键在于其与下游应用分布的一致性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑