Vol. 1 · No. 12 · November 2026

The Stack v2 (2402.19173): 3B Files, 600+ Languages and How Opt-Outs Work

The Stack v2 dataset (arXiv 2402.19173): over 3B files and 600+ languages, the 67.53TB size, and how developers opt out of training.

By Shivam Singh · LinkedIn · · 4 min read

The Stack v2 is the code training dataset from the BigCode Project. According to its Hugging Face dataset card, it contains over 3B files and a total uncompressed size of 67.53TB. The card's summary describes 600+ programming and markup languages, while its Languages section gives 658. The card says it is derived from the Software Heritage archive and that developers can ask for their code to be removed.

What does The Stack v2 contain?

The Stack v2 holds source code in more than 600 programming and markup languages, according to the dataset card. The 67.53TB uncompressed size appears in the card and in a second source, so it is the most solidly supported size figure here. The card attributes the material to the Software Heritage archive, which it describes as the largest public archive of software source code.

ItemReported valueSourceSupport
FilesOver 3B (card summary); 3.28B unique (card data-collection section)Hugging Face dataset cardOne page, two sections
LanguagesCard summary: 600+; card Languages section: 658; paper abstract: 619Hugging Face dataset card; arXiv 2402.19173 abstractSources disagree
Uncompressed size67.53TBHugging Face dataset card; AI Potluck newsletterTwo sources
Upstream archiveSoftware HeritageHugging Face dataset cardOne source

Source for most rows: Hugging Face dataset card, dated 2024-02-29 and re-checked as of 2026-11-23. The "one source" rows rest on the card alone. For the language count, the paper abstract is a second source, and the two disagree.

Which models were trained on The Stack v2?

StarCoder2 is the main model family trained on The Stack v2. The StarCoder2 announcement on Hugging Face, dated 2024-02-28, says all StarCoder2 variants were trained on The Stack v2.

The paper's abstract, as hosted on a Northeastern University page, gives StarCoder2 models with 3B, 7B and 15B parameters trained on 3.3 to 4.3 trillion tokens. Only the abstract was read for these figures; the full PDF was not. They are lab-reported numbers, not independent measurements.

Which licences are in The Stack v2?

According to version 1 of the paper, arXiv 2402.19173, the main difference from the first Stack is that v2 includes both permissively licensed and unlicensed files. The same text says the authors exclude commercial licences.

That rule answers which files were kept, not whether the dataset as a whole can be reused. Including unlicensed files means that appearing in the dataset does not show a file is free to reuse. Anyone building on the data needs to check the licence of the files and the dataset card before commercial use. The sources used here do not establish a dataset-wide commercial-use answer.

How do developers opt out of The Stack v2?

Developers can have their code removed by opening an issue in the BigCode opt-out repository on GitHub. The opt-out-v2 repository describes this route for code, and the BigCode dataset documentation describes the same route for repositories.

  1. Go to the repository at github.com/bigcode-project/opt-out-v2.
  2. Open an issue in that repository to request removal of your code or repositories.
  3. Wait for the request to be validated. The dataset card says removals are enacted in regular updates to The Stack v2.

The card does not say how long validation takes. The opt-out repository says opting out excludes code from the next iteration of The Stack and from current and future model training, but it gives no timeline.

How much data did opt-outs and licence filtering remove?

The sources used for this post do not publish a count of files or repositories removed by opt-outs or by licence filtering. The "over 3B files" and 67.53TB figures describe the release as published. They do not show how much was taken out.

Readers who need a removal count should check the dataset card and the opt-out repository for updates. Without a published count, any claim about how much was removed would be an estimate, and this post does not make one.

Why does the opt-out design matter for code data?

The opt-out model puts the work on the developer. A person whose code is in the dataset has to know it is there and file an issue to have it removed. The card describes removal as something developers can request, not something the dataset does automatically for them.

The licence rule has a similar gap. Keeping unlicensed files means the licence status of a file is not settled by its presence in the dataset. This is the site's analysis, drawn from the card and the paper text above. Neither source makes this argument itself.

What's still unclear?

  • Exact file count. The card's summary says over 3B files, while its data-collection section gives 3.28 billion unique files. The headline uses the rounded wording.
  • Exact language count. The card's summary says 600+ languages, its Languages section says 658, and the paper abstract says 619. The sources disagree, so this post reports all three.
  • Licence rules over versions. The licence rule comes from version 1 of the paper. The sources do not show whether later versions changed it.
  • Removal volume and timing. No count of removed files or repositories is published in the sources used here. The card says removals are applied "regularly" without a schedule.
  • Models already trained. The opt-out repository mentions current and future model training, but the sources do not say how that applies to models trained before a removal.
  • Gated access and dataset licence. Access terms and the dataset-level licence for commercial use are not established in this post. Check the dataset card before use.
  • Weakest point of the argument. The sources are mostly the dataset card and one paper version. Both are written by the dataset's own creators, so the removal and licence rules have not been checked against independent audits.

Frequently asked questions

What is The Stack v2?

The Stack v2 is a source code dataset from the BigCode Project, used to train code language models. According to its Hugging Face dataset card, it contains over 3B files in 600+ programming and markup languages, and it is derived from the Software Heritage archive.

How many files and languages does The Stack v2 contain?

The Hugging Face dataset card says The Stack v2 contains over 3B files in 600+ programming and markup languages, and its data-collection section gives 3.28 billion unique files. Its Languages section says 658 languages, and the paper abstract says 619. The card gives a total uncompressed size of 67.53TB, which a second source also reports.

Which models were trained on The Stack v2?

The Hugging Face StarCoder2 blog says all StarCoder2 variants were trained on The Stack v2. The StarCoder2 paper's abstract, as hosted on a Northeastern University page, describes models with 3B, 7B and 15B parameters trained on 3.3 to 4.3 trillion tokens. These are the authors' own reported figures.

How do developers opt out of The Stack v2?

Developers can request removal by opening an issue in the bigcode-project/opt-out-v2 repository on GitHub. The Hugging Face card says the dataset is regularly updated to enact validated removal requests, but it does not give a schedule.

Does The Stack v2 include commercially licensed code?

According to version 1 of the paper, The Stack v2 excludes commercial licences and includes permissively licensed and unlicensed files. Whether any given file can be reused commercially depends on that file's licence, which the sources used here do not settle for the dataset as a whole.

How many files were removed by opt-outs or licence filtering?

The sources used for this post do not publish a count of files or repositories removed by opt-outs or licence filtering. The published 3B-file and 67.53TB figures describe the release as published, not the amount removed.

Sources

  1. bigcode/the-stack-v2 dataset card, Hugging Face (2024-02-29)
  2. opt-out-v2 repository, GitHub (BigCode Project) (unknown)
  3. BigCode Project dataset documentation, BigCode Project (unknown)
  4. StarCoder2 and The Stack v2, Hugging Face (2024-02-28)
  5. StarCoder2 and The Stack v2 (paper page), Northeastern University (paper abstract page) (2024-02-29)
  6. The Stack v2: arXiv 2402.19173 (HTML, v1), alphaXiv (arXiv 2402.19173) (2024-02-29)
  7. The Stack v2 training synthetic data (newsletter), AI Potluck (2026-10-08)