Skip to main content
QUICK REVIEW

[Paper Review] The Stack: 3 TB of permissively licensed source code

Denis Kocetkov, Raymond Li|arXiv (Cornell University)|Nov 20, 2022
Topic ModelingComputer Science38 citations
TL;DR

The Stack is a 3.1 TB dataset of permissively licensed source code across 30 languages, with near-deduplication improving code model performance; permissively licensed data can match or surpass prior text-to-code results when deduplicated and decontaminated.

ABSTRACT

Large Language Models (LLMs) play an ever-increasing role in the field of Artificial Intelligence (AI)--not only for natural language processing but also for code understanding and generation. To stimulate open and responsible research on LLMs for code, we introduce The Stack, a 3.1 TB dataset consisting of permissively licensed source code in 30 programming languages. We describe how we collect the full dataset, construct a permissively licensed subset, present a data governance plan, discuss limitations, and show promising results on text2code benchmarks by training 350M-parameter decoders on different Python subsets. We find that (1) near-deduplicating the data significantly boosts performance across all experiments, and (2) it is possible to match previously reported HumanEval and MBPP performance using only permissively licensed data. We make the dataset available at https://hf.co/BigCode, provide a tool called "Am I in The Stack" (https://hf.co/spaces/bigcode/in-the-stack) for developers to search The Stack for copies of their code, and provide a process for code to be removed from the dataset by following the instructions at https://www.bigcode-project.org/docs/about/the-stack/.

Motivation & Objective

  • Introduce The Stack, a large permissively licensed code dataset to foster open and reproducible code LLM research.
  • Describe data collection, licensing governance, and near-deduplication methods.
  • Demonstrate the impact of near-deduplication on model performance using Python subsets.
  • Show that models trained on permissively licensed data can match or exceed prior text-to-code benchmarks.

Proposed method

  • Collect GitHub repositories from GHArchive and clone 137.36M repositories (92 TB uncompressed).
  • Classify licenses with GHArchive data and go-license-detector to create a permissive-licensed subset.
  • Apply near-deduplication using MinHash and Locality Sensitive Hashing to reduce duplicates."
  • Train 350M parameter decoder-only transformers on Python subsets with causal language modeling objective.
  • Evaluate on HumanEval and MBPP benchmarks and compare to Codex, CodeGen, and CodeParrot."],
  • research_questions":[

Experimental results

Research questions

  • RQ1What is the size and composition of The Stack, and how permissive licensing affects usable data?
  • RQ2Does near-deduplication improve code generation performance in text-to-code tasks?
  • RQ3Can permissively licensed data, with deduplication, reproduce or exceed existing text-to-code benchmarks?
  • RQ4What governance model enables developers to opt out of inclusion in The Stack?

Key findings

  • Near-deduplication substantially boosts performance across all experiments for both all-license and permissive-license datasets.
  • A 350M parameter model trained on permissively licensed data with near-deduplication matches Codex and CodeGen benchmarks on HumanEval and MBPP, and surpasses them when using the near-deduplicated all-license data.
  • The all-license dataset with near-deduplication achieves higher pass@100 than its non-deduplicated counterpart (HumanEval: 44.00% vs 36.67%; MBPP: 61.00% vs 53.59%).
  • Permissive-license data with near-deduplication yields pass@100 of 37.00% on HumanEval and 54.69% on MBPP, approaching or exceeding CodeGen results.
  • Removing contaminated data had limited impact on performance in this study.
  • CodeParrot training data underperforms relative to The Stack on both benchmarks.

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.