arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.02120cs.CLcs.AIcs.SE
收藏

Magicoder:利用OSS-Instruct赋能代码生成

Magicoder: Empowering Code Generation with OSS-Instruct

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Tsinghua University(清华大学)

Yuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding, Lingming Zhang

AI总结:

本文提出Magicoder系列开源代码大模型,通过OSS-Instruct方法利用开源代码片段生成多样化指令数据,在7B参数规模下显著超越同规模乃至更大模型,并在HumanEval+上超过ChatGPT。

摘要:

我们介绍了Magicoder,这是一系列完全开源(代码、权重和数据)的代码大语言模型(LLMs),在参数不超过7B的情况下,显著缩小了与顶级代码模型的差距。Magicoder模型使用OSS-Instruct在75K条合成指令数据上进行训练,OSS-Instruct是一种新颖的方法,通过开源代码片段来启发LLMs,从而生成多样化的代码指令数据。我们的主要动机是通过丰富的开源参考来缓解LLMs生成的合成数据中固有的偏差,从而产生更真实、更可控的数据。OSS-Instruct与Evol-Instruct等其他数据生成方法的正交性进一步使我们能够构建增强版的MagicoderS。Magicoder和MagicoderS在广泛的编码基准上均大幅优于具有相似甚至更大规模的最先进代码模型。值得注意的是,基于CodeLlama的MagicoderS-CL-7B甚至在HumanEval+上超越了著名的ChatGPT(pass@1中66.5对65.9)。总体而言,OSS-Instruct为利用丰富的开源参考来构建多样化的代码合成指令数据开辟了一个新方向。

英文摘要:

We introduce Magicoder, a series of fully open-source (code, weights, and data) Large Language Models (LLMs) for code that significantly closes the gap with top code models while having no more than 7B parameters. Magicoder models are trained on 75K synthetic instruction data using OSS-Instruct, a novel approach to enlightening LLMs with open-source code snippets to generate diverse instruction data for code. Our main motivation is to mitigate the inherent bias of the synthetic data generated by LLMs through the wealth of open-source references for the production of more realistic and controllable data. The orthogonality of OSS-Instruct and other data generation methods like Evol-Instruct further enables us to build an enhanced MagicoderS. Both Magicoder and MagicoderS substantially outperform state-of-the-art code models with similar or even larger sizes on a wide range of coding benchmarks. Notably, MagicoderS-CL-7B based on CodeLlama even surpasses the prominent ChatGPT on HumanEval+ (66.5 vs. 65.9 in pass@1 ). Overall, OSS-Instruct opens a new direction for crafting diverse synthetic instruction data for code using abundant open-source references.

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

↑