ChatPaper.aiChatPaper

Magicoder: ソースコードこそがすべて

Magicoder: Source Code Is All You Need

December 4, 2023
著者: Yuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding, Lingming Zhang
cs.AI

要旨

我々は、Magicoderという完全オープンソース(コード、重み、データ)のコード用大規模言語モデル(LLM)シリーズを紹介します。Magicoderは、7Bパラメータ以下でありながら、トップクラスのコードモデルとのギャップを大幅に縮めます。Magicoderモデルは、OSS-Instructという新しいアプローチを用いて、75Kの合成指示データでトレーニングされます。OSS-Instructは、オープンソースのコードスニペットを活用して、高品質なコード用指示データを生成する手法です。我々の主な動機は、LLMによって生成される合成データに内在するバイアスを軽減し、より多様で現実的かつ制御可能なデータを生成するために、豊富なオープンソースリファレンスを活用することです。OSS-InstructとEvol-Instructなどの他のデータ生成手法の直交性により、強化版のMagicoderSを構築することが可能です。MagicoderとMagicoderSは、Pythonのテキストからコード生成、多言語コーディング、データサイエンスプログラムの完成など、幅広いコーディングベンチマークにおいて、類似またはそれ以上のサイズの最先端のコードモデルを大幅に上回ります。特に、CodeLlamaに基づくMagicoderS-CL-7Bは、HumanEval+において著名なChatGPTを凌駕します(pass@1で66.5 vs. 65.9)。全体として、OSS-Instructは、豊富なオープンソースリファレンスを用いた低バイアスで高品質な指示チューニングの新たな方向性を開きます。
English
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 high-quality instruction data for code. Our main motivation is to mitigate the inherent bias of the synthetic data generated by LLMs by empowering them with a wealth of open-source references for the production of more diverse, 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, including Python text-to-code generation, multilingual coding, and data-science program completion. 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 low-bias and high-quality instruction tuning using abundant open-source references.
PDF824December 15, 2024