AIAny
Icon for item

The Stack v3 (HuggingFaceCode/stack-v3-train)

Provides a near-deduplicated, quality-filtered 15.9 TB training subset of GitHub source code grouped by repository, with inline UTF‑8 file contents and repo metadata for pre-training and analysis of code LLMs; cutoff Aug 7, 2025, ODC-By license.

Introduction

Why this matters

Public, self-contained corpora that capture repository context are rare at the scale needed to pretrain competitive code LLMs. The Stack v3 train split delivers a ready-to-use, repository-grouped corpus with file contents included so researchers and engineers can experiment with full-repo context without rebuilding large-scale crawlers or dedup pipelines.

What Sets It Apart
  • Repository grouping with inline contents: every row is a full repository and files[].content is the decoded UTF-8 source text, so models can be trained or evaluated with repository structure and file adjacency preserved. This avoids piecemeal reassembly from separate blobs.
  • Near-dedup and quality filtering tuned for pretraining: language-agnostic MinHash-LSH clustering retains one representative per duplicate cluster (representative chosen by stars/forks/license/age), plus heuristics to drop low-quality, oversized or generated files and PII redaction applied to detected entities.
  • Scale and language breadth: the train split contains ~15.9 TB of code (≈4.9 trillion tokens) across 713 programming/markup languages and ~173M repository rows, reflecting GitHub state as of 2025-08-07.
Key details for practitioners
  • Format and access: released as Parquet/Arrow shards; usable via the Hugging Face datasets library (streaming supported) or queried directly with DuckDB/Polars via the HF filesystem. Each repo row includes repo metadata (stars, forks, commit_id) and per-file fields (language via go-enry, detected_licenses via ScanCode, is_vendor, size_bytes, file_timestamp).
  • Licensing and provenance: dataset published under ODC-By v1.0; file-level detected licenses are provided and non-permissive files were excluded. Users must still respect original file licenses when reusing code and follow attribution requirements as applicable.
  • Safety and limitations: PII was redacted with StarPII heuristics but detection is imperfect and some sensitive data may remain. The corpus may contain malicious code and biased language distributions (popular languages dominate). The snapshot captures only default-branch HEADs and omits git history.
Who it fits and trade-offs

Great fit if you need a large, reproducible, repo-context corpus to pretrain or benchmark code LLMs and can operate at multi-terabyte scale (or stream shards). Choose stack-v3-full instead if you need every near-duplicate, finer-grained content partitioning, or want to re-run custom dedup/licensing filters. Look elsewhere if you require curated, human-reviewed code examples, full commit histories, or guarantees that all PII has been removed.

Information

  • Websitehuggingface.co
  • OrganizationsHugging Face, BigCode
  • AuthorsAnton Lozhkov, Hugo Larcher, Mathieu Morlon, Loubna Ben Allal, Leandro von Werra
  • Published date2026/07/23

Categories

More Items

Hugging Face

Turns chemistry and molecular-property questions into verifiable short-answer tasks for language-model training and evaluation, with nearly 50,000 questions drawn from multiple datasets.

Hugging Face

Provides runnable 3D programs with renders, descriptions, and metadata for training and evaluating models that generate 3D code from text or images. Dataset access is restricted to non-commercial research.

Hugging Face

Generates synthetic German personas grounded in population and geographic distributions for model training and synthetic data generation. The dataset contains 1 million records with six German-language persona types, based on census and other official statistics.