Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Models

Xianzhen Luo, Qingfu Zhu, Zhiming Zhang, Xu Wang, Qing Yang +2 more
3/1/2024
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Instruction tuning plays a pivotal role in Code Large Language Models (Code LLMs) for the task of program synthesis. Presently, two dominant paradigms for collecting tuning data are natural-instruct (human-written) and self-instruct (automatically generated). Natural-instruct includes diverse and correct codes but lacks instruction-code pairs, and exists improper code formats like nested single-line codes. In contrast, self-instruct automatically generates proper paired data. However, it suffers from low diversity due to generating duplicates and cannot ensure the correctness of codes. To bridge the both paradigms, we propose \textbf{Semi-Instruct}. It first converts diverse but improper codes from natural-instruct into proper instruction-code pairs through a method similar to self-instruct. To verify the correctness of generated codes, we design a novel way to construct test cases by generating cases' inputs and executing correct codes from natural-instruct to get outputs. Finally, diverse and correct instruction-code pairs are retained for instruction tuning. Experiments show that semi-instruct is significantly better than natural-instruct and self-instruct. Furthermore, the performance steadily improves as data scale increases.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{luo2024semiinstruct,
  title  = {Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Models},
  author = {Xianzhen Luo and Qingfu Zhu and Zhiming Zhang and Xu Wang and Qing Yang and Dongliang Xu and Wanxiang Che},
  year   = {2024},
  eprint = {2403.00338},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.00338v1}
}

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/2403.00338.svg)](https://codeofpaper.com/paper/2403.00338)

Discussion