Renaissance Labs · Code
Dataset · 2026-07

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.

LicenseThis entry is not plainly permissive (family: mixed or per-file). Read the license on the source page before using it for training or for a product.
load
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