Skip to main content
QUICK REVIEW

[Paper Review] OctoPack: Instruction Tuning Code Large Language Models

Niklas Muennighoff, Qian Liu|arXiv (Cornell University)|Aug 14, 2023
Software Engineering ResearchComputer Science16 citations
TL;DR

The paper introduces CommitPack and CommitPackFT, 4TB and 2GB datasets of permissively licensed code commits, to instruction-tune code LLMs. It presents OctoCoder and OctoGeeX, the best permissive code LLMs, evaluated on an expanded HumanEvalPack benchmark including Code Repair, Code Explanation, and Code Synthesis across six languages.

ABSTRACT

Finetuning large language models (LLMs) on instructions leads to vast performance improvements on natural language tasks. We apply instruction tuning using code, leveraging the natural structure of Git commits, which pair code changes with human instructions. We compile CommitPack: 4 terabytes of Git commits across 350 programming languages. We benchmark CommitPack against other natural and synthetic code instructions (xP3x, Self-Instruct, OASST) on the 16B parameter StarCoder model, and achieve state-of-the-art performance among models not trained on OpenAI outputs, on the HumanEval Python benchmark (46.2% pass@1). We further introduce HumanEvalPack, expanding the HumanEval benchmark to a total of 3 coding tasks (Code Repair, Code Explanation, Code Synthesis) across 6 languages (Python, JavaScript, Java, Go, C++, Rust). Our models, OctoCoder and OctoGeeX, achieve the best performance across HumanEvalPack among all permissive models, demonstrating CommitPack's benefits in generalizing to a wider set of languages and natural coding tasks. Code, models and data are freely available at https://github.com/bigcode-project/octopack.

Motivation & Objective

  • Demonstrate that instruction tuning on permissively licensed code data improves Code LLM generalization across multiple languages and tasks.
  • Create CommitPack and CommitPackFT to provide large-scale and high-quality code-instruction data.
  • Develop and evaluate improved permissive Code LLMs (OctoCoder, OctoGeeX) on a broadened HumanEvalPack benchmark.
  • Show that combining CommitPackFT with natural language data yields the best performance among permissive models.

Proposed method

  • Construct CommitPack, a 4TB dataset of Git commits across 350 languages by filtering GitHub action metadata and associated code changes.
  • Create CommitPackFT, a high-quality 2GB subset with instruction-like commit messages and restricted filters (uppercase imperative start, multi-word phrases, etc.).
  • Assemble HumanEvalPack, expanding HumanEval to Code Repair, Code Explanation, and Code Synthesis across six languages, with careful execution-based evaluation.
  • Fine-tune StarCoder-derived models on CommitPackFT and OASST-like data to create OctoCoder, and fine-tune CodeGeeX2 similarly to create OctoGeeX.
  • Evaluate models on HumanEvalPack using pass@k with 20 samples for most models and 1 for GPT-4, covering three tasks and six languages.
  • Compare permissive models to non-permissive models and to GPT-4 across three task variants (Code Synthesis, Code Repair, Code Explanation).

Experimental results

Research questions

  • RQ1Can instruction tuning on a large, permissively licensed code dataset improve Code LLM performance across multiple programming languages?
  • RQ2Does a curated high-quality commit-instruction dataset (CommitPackFT) combined with natural language data (OASST) provide the best gains for code tasks?
  • RQ3How well do instruction-tuned Code LLMs generalize to languages and tasks not heavily represented in pretraining?
  • RQ4What are the limits of current permissive Code LLMs on challenging tasks like bug fixing and code explanations?
  • RQ5How do instruction-tuned models compare to closed-source models on HumanEvalPack tasks?

Key findings

  • OctoCoder achieves the highest average score among permissive models across all three evaluation scenarios in HumanEvalPack.
  • OctoGeeX, with 6B parameters, outperforms prior permissive Code LLMs, showing strong generalization.
  • GPT-4 remains the top performer overall, but is closed-source and not permissive.
  • CommitPackFT plus natural language data (OASST) yields the best performance among permissive models for code synthesis, with an absolute improvement of 23% over StarCoder.
  • HumanEvalPack reveals that code repair remains challenging for many models, with targeted commits helping OctoCoder handle bug fixes.
  • Models struggle to generate natural language explanations, highlighting the need for outputs with NL targets during instruction tuning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.