| Kind | dataset | dataset |
|---|
| Published | 2024 | 2022 |
|---|
| License | other / per-file SPDX; ToU requires original license compliance + SWH LLM principles | Various permissive open-source licenses (193 in v1.1); each file's original license must be respected; opt-out supported |
|---|
| License family | Other | Permissive |
|---|
| Access | Free metadata after gate; bulk content agreement required | restricted |
|---|
| Language codes | code | code |
|---|
| Modalities | code, text | code, text |
|---|
| Size | — | 100M to 1B rows |
|---|
| Downloads (last month) | 6,031 | 9,409 |
|---|
| Likes | 638 | 1,082 |
|---|
| Last updated | 2026-08-03 | 2026-08-03 |
|---|
| Tasks | text-generation | text-generation |
|---|
| Formats | — | parquet |
|---|
| Scale | Full 67.5TB / >3B files / 104.2M repos; dedup 32.1TB; train-full ~900B tokens. Hub metadata usedStorage ~427 GB. size_categories unknown. | 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 metadata per language config (600+); contents fetched via blob_id from s3://softwareheritage/content/ | Parquet shards under data/<language>/; gated Hub dataset |
|---|
| Type | Code corpus / SWHID + metadata (contents on SWH S3) | raw multilingual source-code pretraining corpus |
|---|
| Cost | Free metadata after gate; bulk content agreement required | Free gated download; very large storage/bandwidth |
|---|
| Languages | 658 langs (card); paper 619. High-resource langs (C, JS, etc.) overrepresented vs niche (Julia, Scala). Natural language in comments mostly English. | Programming languages (Hub: 300+ language configs; paper v1.0 highlighted 30). Natural-language comments embedded in code. |
|---|
| Modality | Source code / text. No images. | Text (source code) |
|---|
| Domain | code pretraining; multilingual source code; Software Heritage | multilingual source code / code LLM pretraining |
|---|
| Time period | SWH graph 2023-09-06; GH Archive to 2023-09-14. Paper 2024-02-29. Hub created 2024-02-26; lastModified 2026-08-03 (v2.2.0 opt-out purge). Discord mid 1478777064818479185 (2026-03-04). | GitHub-sourced code through BigCode Stack releases (paper 2022-11); Hub lastModified 2026-08-03; Discord 1422597711273656371 (2025-09-30) |
|---|
| Purpose | Open reproducible Code LLM pretraining corpus with license/provenance metadata and developer opt-out | Provide a large permissively licensed, governance-aware code corpus for open code LLM research |
|---|
| Used for | StarCoder2 3B/7B/15B (paper). Hub 6.3K downloads / 626 likes at check; paper 160 upvotes. | Code LLM pretraining (StarCoder lineage et al.); per-language code modeling; responsible data research |
|---|
| Authors | BigCode collaboration (Lozhkov, Li, Ben Allal, von Werra, de Vries et al.; ServiceNow/HF/many labs). Source producers: GitHub users with unique repos through 2023-09-06. | BigCode (Kocetkov, Li, Ben Allal, von Werra, et al.). Code authors = original GitHub contributors per provenance. |
|---|
| Bias | Permissive-license skew; some langs rarely permissive (SQL/Batchfile/TS ~4% vs ~10% avg). Longer files more often permissive. Comment toxicity risk. HTML may not be WCAG-compliant. | 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 | Exact-dedup + near-dedup (~40% of permissive files were near-dups). Filters: no binary/empty/undecodable; drop >10MB. Vendor/generated flags via go-enry. Train-* variants add heuristics + repo grouping. | Raw source files with provenance; near-dedup in releases; quality varies by repo. Card emphasizes license compliance over heavy cleaning. |
|---|
| Sample size | No official train/test split (near-dup leakage risk). Language configs e.g. Python, Dockerfile, default=all. | Highly skewed by language popularity (HTML/C/C++/CSS etc. dominate shard counts) |
|---|
| Long context | Mixed (file-level; train-* group by repo for full-repo context). | No (file-level; some files long) |
|---|
| Intermediate steps | Yes (SWH traversal; GH Archive metadata; ScanCode license detect; permissive filter; near-dedup; opt-out removals v2.0.1–v2.2.0). | N/A (pretraining raw code; not CoT) |
|---|
| Idea quality | High | High |
|---|
| Novelty | High (largest open SWH-backed code dump with governance; still foundational vs newer niche dumps) | High at release (largest open permissive multi-lang code set with governance) |
|---|
| Text conversion | Metadata load_dataset works after gated ToU. Bulk contents need SWH/INRIA agreement + AWS credentials. Streaming supported. | Hub datasets loaders / Dask/Polars after gate accept; multi-TB download |
|---|
| Collection method | Download (gated) + optional SWH S3 | Accept HF gate/ToU; download desired language configs; honor opt-out/version notices |
|---|
| Static | No (periodic opt-out updates; lastModified 2026-08-03) | No (maintainers push removal updates; ToU requires refreshing) |
|---|
| Processed | Unknown | Partially (license filter, near-dedup, language packing; not instruction-formatted) |
|---|
| Summary | Open reproducible Code LLM pretraining corpus with license/provenance metadata and developer opt-out | 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. |
|---|