arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2411.04156cs.SEcs.AIcs.CL
收藏

Crystal:照亮LLM在语言和代码上的能力

Crystal: Illuminating LLM Abilities on Language and Code

Carnegie Mellon University(卡内基梅隆大学);Cerebras Systems(赛布拉斯系统公司);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Tianhua Tao, Junbo Li, Bowen Tan, Hongyi Wang, William Marshall, Bhargav M Kanakiya, Joel Hestness, Natalia Vassilieva, Zhiqiang Shen, Eric P. Xing, Zhengzhong Liu

AI总结:

本文提出一种两阶段预训练策略,通过调整代码/语言比例,训练出同时具备自然语言和代码能力的模型Crystal,其性能与Llama 2和Code Llama相当,但数据效率更高,并开源全部训练细节。

摘要:

专门用于代码生成的大型语言模型(LLMs)(通常也称为代码LLM),例如StarCoder和Code Llama,在各种软件开发场景中扮演着越来越关键的角色。对于代码LLM而言,在许多特定应用中(如使用自然语言进行代码片段检索或代码解释),同时具备代码生成和自然语言能力也至关重要。获取语言和编码技能之间的复杂交互使得开发强大的代码LLM变得复杂。此外,先前关于混合代码和自然语言的LLM预训练策略的研究缺乏深入性。在这项工作中,我们提出了一种预训练策略,以增强单个LLM内自然语言和编码能力的整合。具体来说,它包括两个训练阶段,并适当调整代码/语言比例。由此产生的模型Crystal在两个领域都表现出卓越的能力。具体来说,它的自然语言和编码性能分别与Llama 2和Code Llama相当。Crystal展现出更好的数据效率,使用了1.4万亿个令牌,而Llama 2和Code Llama使用了超过2万亿个令牌。我们通过分析训练过程来验证我们的预训练策略,并观察到大多数基准测试的一致改进。我们还采用了一个以代码为中心的数据混合的典型应用适应阶段,但发现它并未带来性能或训练效率的提升,这强调了精心设计的数据配方的重要性。为了促进社区内的研究,我们承诺开源预训练的每一个细节,包括我们的训练数据集、代码、日志以及整个训练过程中的136个检查点。

英文摘要:

Large Language Models (LLMs) specializing in code generation (which are also often referred to as code LLMs), e.g., StarCoder and Code Llama, play increasingly critical roles in various software development scenarios. It is also crucial for code LLMs to possess both code generation and natural language abilities for many specific applications, such as code snippet retrieval using natural language or code explanations. The intricate interaction between acquiring language and coding skills complicates the development of strong code LLMs. Furthermore, there is a lack of thorough prior studies on the LLM pretraining strategy that mixes code and natural language. In this work, we propose a pretraining strategy to enhance the integration of natural language and coding capabilities within a single LLM. Specifically, it includes two phases of training with appropriately adjusted code/language ratios. The resulting model, Crystal, demonstrates remarkable capabilities in both domains. Specifically, it has natural language and coding performance comparable to that of Llama 2 and Code Llama, respectively. Crystal exhibits better data efficiency, using 1.4 trillion tokens compared to the more than 2 trillion tokens used by Llama 2 and Code Llama. We verify our pretraining strategy by analyzing the training process and observe consistent improvements in most benchmarks. We also adopted a typical application adaptation phase with a code-centric data mixture, only to find that it did not lead to enhanced performance or training efficiency, underlining the importance of a carefully designed data recipe. To foster research within the community, we commit to open-sourcing every detail of the pretraining, including our training datasets, code, loggings and 136 checkpoints throughout the training.

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

↑