InverseCoder: 逆命令による命令チューニング済みコードLLMの可能性を解き放つ
InverseCoder: Unleashing the Power of Instruction-Tuned Code LLMs with Inverse-Instruct
July 8, 2024
著者: Yutong Wu, Di Huang, Wenxuan Shi, Wei Wang, Lingzhe Gao, Shihao Liu, Ziyuan Nan, Kaizhao Yuan, Rui Zhang, Xishan Zhang, Zidong Du, Qi Guo, Yewen Pu, Dawei Yin, Xing Hu, Yunji Chen
cs.AI
要旨
オープンソースのコード大規模言語モデル(LLM)の最近の進展は、GPT-3.5やGPT-4といった強力なクローズドソースのLLMから生成されたデータをファインチューニングすることで、驚くべきコーディング能力を示しています。本論文では、クローズドソースのLLMにクエリを送るのではなく、自身からデータを生成することで、インストラクションチューニングされたコードLLMをさらに改善する方法を探ります。私たちの重要な観察は、形式的言語(コード)と非形式的言語(自然言語)の翻訳の間の不整合です。形式的言語を非形式的言語に翻訳する方が、その逆よりも直感的であるという点です。この観察に基づいて、私たちはINVERSE-INSTRUCTを提案します。これは、逆にコードスニペットから指示を要約するものです。具体的には、コードのためのインストラクションチューニングコーパスと、その結果として得られたインストラクションチューニングされたコードLLMを前提として、コードLLMにコード要約と自己評価を通じて、元のコーパスに対する追加の高品質な指示を生成させます。その後、元のコーパスと自己生成されたコーパスを組み合わせてベースLLMをファインチューニングし、より強力なインストラクションチューニングされたLLMを生成します。私たちは、InverseCoderと名付けた一連のコードLLMを提示し、Pythonのテキストからコード生成、多言語コーディング、データサイエンスコード生成など、幅広いベンチマークで元のコードLLMの性能を上回ることを示します。
English
Recent advancements in open-source code large language models (LLMs) have
demonstrated remarkable coding abilities by fine-tuning on the data generated
from powerful closed-source LLMs such as GPT-3.5 and GPT-4 for instruction
tuning. This paper explores how to further improve an instruction-tuned code
LLM by generating data from itself rather than querying closed-source LLMs. Our
key observation is the misalignment between the translation of formal and
informal languages: translating formal language (i.e., code) to informal
language (i.e., natural language) is more straightforward than the reverse.
Based on this observation, we propose INVERSE-INSTRUCT, which summarizes
instructions from code snippets instead of the reverse. Specifically, given an
instruction tuning corpus for code and the resulting instruction-tuned code
LLM, we ask the code LLM to generate additional high-quality instructions for
the original corpus through code summarization and self-evaluation. Then, we
fine-tune the base LLM on the combination of the original corpus and the
self-generated one, which yields a stronger instruction-tuned LLM. We present a
series of code LLMs named InverseCoder, which surpasses the performance of the
original code LLMs on a wide range of benchmarks, including Python text-to-code
generation, multilingual coding, and data-science code generation.Summary
AI-Generated Summary