InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct

Yutong Wu, Di Huang, Wenxuan Shi, Wei Wang, Lingzhe Gao +11 more
7/8/2024
cs.CLcs.AIcs.SE

No official code found. Best implementation: wyt2000/InverseCoder (16 stars, last commit 2024-07-10).

Abstract

Recent advancements in open-source code large language models (LLMs) have been driven by fine-tuning on the data generated from powerful closed-source LLMs, which are expensive to obtain. This paper explores whether it is possible to use a fine-tuned open-source model to generate additional data to augment its instruction-tuning dataset. We make two observations: (1) A code snippet can serve as the response to different instructions. (2) Instruction-tuned code LLMs perform better at translating code into instructions than the reverse. Based on these observations, we propose Inverse-Instruct, a data augmentation technique that uses a fine-tuned LLM to generate additional instructions of code responses from its own training dataset. The additional instruction-response pairs are added to the original dataset, and a stronger code LLM can be obtained by fine-tuning on the augmented dataset. We empirically validate Inverse-Instruct on a range of open-source code models (e.g. CodeLlama-Python and DeepSeek-Coder) and benchmarks (e.g., HumanEval(+), MBPP(+), DS-1000 and MultiPL-E), showing it consistently improves the base models.

View on arXivView PDF

Code Implementations(1)

[AAAI 2025] The official code of the paper "InverseCoder: Unleashing the Power of Instruction-Tuned Code LLMs with Inverse-Instruct"(https://arxiv.org/abs/2407.05700).

161PythonApr 22, 20242 years ago
ai4codefinetuninglarge-language-modelsllm4codellms+1 more

Similar Papers

Cite this paper

@article{wu2024inversecoder,
  title  = {InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct},
  author = {Yutong Wu and Di Huang and Wenxuan Shi and Wei Wang and Lingzhe Gao and Shihao Liu and Ziyuan Nan and Kaizhao Yuan and Rui Zhang and Xishan Zhang and Zidong Du and Qi Guo and Yewen Pu and Dawei Yin and Xing Hu and Yunji Chen},
  year   = {2024},
  eprint = {2407.05700},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.05700v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.05700.svg)](https://codeofpaper.com/paper/2407.05700)

Discussion