The Stack v3 (train)
Successor to The Stack v2: a direct GitHub crawl (cutoff 2025-08-07) with file contents inline, grouped by repository, near-deduplicated, quality filtered and PII redacted. Built for repo-level code pretraining.
How to use it
Default open starting point for a fresh code pretraining run with repo context. Stream it first; there are no per-language configs, so filter files[].language yourself.
Caveats
Not gated, unlike v2. Files labeled no_license are included (non_permissive are excluded), so check your own policy on unlicensed code. Opt-out via Am I in The Stack, applied before each patch release. Excludes issues, PRs, Kaggle and docs that came with StarCoder2. v3.1 removed exact duplicates (4.9T to 3.6T tokens), so pin the version. stack-v3-full is an HF bucket, not a dataset, and is huge. Possible overlap with benchmark repos: decontaminate.
from datasets import load_dataset ds = load_dataset("HuggingFaceCode/stack-v3-train", split="train", streaming=True) for repo in ds: print(repo["repo_path"], repo["num_files"]); break
Related
- DeepSeek-Coder: Repo-level pretraining data construction (dependency-ordered files) and fill-in-the-middle for code...
- Nemotron-Pretraining-Code-v3 (metadata): Incremental metadata list of permissively licensed GitHub files for Nemotron 3 Ultra pretraining; use with...
- The Stack v2: StarCoder2 training corpus built on the Software Heritage archive (2023), with per-file license labels. The...
- Code Llama 70B (legacy): Meta's 2024 code Llama; included for historical comparison...
- Codestral-22B-v0.1: Mistral's 2024 code model; weights open for research and testing...
- Common Pile: Stack v2 (openly licensed): Stack v2 filtered to openly licensed repos (all detected licenses on the Blue Oak list), part of the Common...
