# The Stack

- **ID:** 92
- **Kind:** dataset
- **URL:** https://huggingface.co/datasets/bigcode/the-stack
- **Authors:** BigCode Project
- **Venue:** Hugging Face / BigCode
- **Published:** 2022
- **Source:** huggingface
- **Language:** 358 programming languages; comments/docstrings in 40+ natural languages (EN, ZH, FR, PT, ES, RU, DE, KO, JA, etc.)
- **Access:** restricted
- **License:** Various permissive open-source licenses (193 in v1.1); each file's original license must be respected; opt-out supported
- **License family:** Permissive (auto-classified)
- **Topics:** Code / Software Engineering
- **Added:** 2026-07-17
- **Verified:** 2026-07-17
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/92

## Summary

The Stack is a collection of over 6TB of permissively-licensed source code files covering 358 programming languages, created as part of the BigCode Project (an open scientific collaboration for responsible Code LLM development). It serves as a pretraining dataset for code-generating LLMs and provides per-file provenance metadata (repository name, licenses, stars/forks/issues counts, git hashes) to support attribution and license compliance. The dataset has an opt-out mechanism and is regularly updated to enact validated data-removal requests.

## Attributes

- **Purpose:** Serve as a large pretraining dataset of permissively-licensed source code for training Code LLMs (code-generating AI systems).
- **Scale:** 6TB (v1.2, near-deduplicated); 358 programming languages; 193 permissive licenses (v1.1)
- **Used for:** Pretraining Code LLMs (e.g., StarCoder/StarCoder2); code completion, documentation generation, natural-language-to-code translation
- **Time period:** v1.0 (2022) through v1.2 (2023); opt-out requests processed through Feb 2023
- **Author type:** human

## From the source (fetched 2026-10-03)

- **Repository:** bigcode/the-stack (Hugging Face)
- **Created:** Oct 3, 2022 (Hugging Face)
- **Last updated:** Aug 3, 2026 (Hugging Face)
- **Downloads (last month):** 9,409 (Hugging Face)
- **Likes:** 1,082 (Hugging Face)
- **Size:** 100M to 1B rows (Hugging Face)
- **Modalities:** code, text (Hugging Face)
- **Tasks:** text-generation (Hugging Face)
- **Formats:** parquet (Hugging Face)
- **Gated:** yes (Hugging Face)

## Dataset profile

- **Scale:** Paper: 3.1 TB / 30 langs; v1.0 near-dedup ~3 TB. Hub tags 100M<n<1B; parquet shards per language (e.g. large c/c++/html/css/go configs). Exact total rows not re-counted (gated 401).
- **Format:** Parquet shards under data/<language>/; gated Hub dataset
- **Type:** raw multilingual source-code pretraining corpus
- **License:** Other — Stack Terms of Use + per-file original licenses (attribution). Hosting must include ToU.
- **Cost:** Free gated download; very large storage/bandwidth
- **Languages:** Programming languages (Hub: 300+ language configs; paper v1.0 highlighted 30). Natural-language comments embedded in code.
- **Modality:** Text (source code)
- **Domain:** multilingual source code / code LLM pretraining
- **Time period:** GitHub-sourced code through BigCode Stack releases (paper 2022-11); Hub lastModified 2026-08-03; Discord 1422597711273656371 (2025-09-30)
- **Purpose:** Provide a large permissively licensed, governance-aware code corpus for open code LLM research
- **Used for:** Code LLM pretraining (StarCoder lineage et al.); per-language code modeling; responsible data research
- **Authors:** BigCode (Kocetkov, Li, Ben Allal, von Werra, et al.). Code authors = original GitHub contributors per provenance.
- **Bias:** GitHub popularity / language skew; English-heavy comments; license-filter bias toward permissive projects; possible personal/secret leakage historically addressed via opt-out governance
- **Text quality:** Raw source files with provenance; near-dedup in releases; quality varies by repo. Card emphasizes license compliance over heavy cleaning.
- **Sample size:** Highly skewed by language popularity (HTML/C/C++/CSS etc. dominate shard counts)
- **Long context:** No (file-level; some files long)
- **Intermediate steps:** N/A (pretraining raw code; not CoT)
- **Idea quality:** High
- **Novelty:** High at release (largest open permissive multi-lang code set with governance)
- **Text conversion:** Hub datasets loaders / Dask/Polars after gate accept; multi-TB download
- **Collection method:** Accept HF gate/ToU; download desired language configs; honor opt-out/version notices
- **Static:** No (maintainers push removal updates; ToU requires refreshing)
- **Processed:** Partially (license filter, near-dedup, language packing; not instruction-formatted)

## Links

- Dataset: https://huggingface.co/datasets/bigcode/the-stack
- Related: https://huggingface.co/datasets/bigcode/the-stack
- Related: https://arxiv.org/abs/2211.15533
- Related: https://www.bigcode-project.org/

## Research notes

- Gated; requires accepting Terms of Use and contact-info sharing. v1.0 had 30 languages/18 licenses (3TB); v1.1 expanded to 358 languages/193 licenses (6TB) and removed copyleft (MPL/EPL/LGPL). Papers: arxiv 2211.15533, 2107.03374, 2207.14157. A newer version, The Stack v2, also exists.
- Deep-eval from #data-source-dump mid=1422597711273656371. papers_local id follows. Gated — Curator could not cat README this pass. Issues companion already cataloged separately.

## Related entries

- Related: [KernelBook](https://papers.projxon.ai/entries/105) (dataset, #105)
- Related: [The Stack GitHub Issues](https://papers.projxon.ai/entries/124) (dataset, #124)
- Related: [GPUMODE/KernelBook](https://papers.projxon.ai/entries/1173) (dataset, #1173)

## Similar entries

- [UltraData-Code (OpenBMB L0–L3 tiered code pretrain: L2 algorithmic + L3 synthesis)](https://papers.projxon.ai/entries/1035) (dataset, #1035)
- [BigO(Bench): Can LLMs Generate Code with Controlled Time and Space Complexity?](https://papers.projxon.ai/entries/777) (paper, #777)
- [Effective Strategies for Asynchronous Software Engineering Agents](https://papers.projxon.ai/entries/1238) (paper, #1238)
- [Cross-Benchmark Transfer from RL on Agentic Coding Tasks](https://papers.projxon.ai/entries/1245) (paper, #1245)
- [The Stack v2](https://papers.projxon.ai/entries/232) (dataset, #232)
- [Nemotron-Pretraining-Code-v1](https://papers.projxon.ai/entries/87) (dataset, #87)
