AIAny
Icon for item

bigcode/the-stack-v2

Provides a multilingual, deduplicated corpus of public source code in Parquet for large-scale model training and evaluation. Includes license metadata, language splits, and streaming-friendly packaging for use with Hugging Face Datasets — suited to training code-focused foundation models but requires careful license/provenance review.

Introduction

Why this matters

Training code-generation and code-understanding foundation models demands not just volume but clean, license-aware, and deduplicated source data. The Stack v2 aims to be that curated backbone: a multi-billion-record corpus of public code packaged for large-scale training workflows and streaming access via the Hugging Face Datasets ecosystem. For teams building code LLMs, the dataset lowers friction around scale and I/O while surfacing license and provenance metadata that are often missing from raw dumps.

What Sets It Apart
  • Practical deduplication and provenance focus — The dataset applies deduplication and provides fields for original source provenance and license metadata, reducing spurious memorization and legal ambiguity that plague raw code scrapes. This means fewer duplicated examples during training and clearer signals for data curation.
  • Training-optimized format and streaming — Packaged in Parquet with dataset-card metadata and designed to work with Hugging Face Datasets streaming, it supports efficient distributed I/O and large-batch training without requiring a full local copy. That helps when working with multi-terabyte corpora on cloud training clusters.
  • Language and task-aware splits — Records carry language tags and other metadata useful for language-specific filtering, evaluation splits, or creating smaller targeted subsets (e.g., Python-only or permissively licensed subsets), which accelerates experiments on model generalization across languages.
  • Linked to research and reproducibility — The dataset is referenced alongside related arXiv work and other BigCode resources, making it easier to reproduce published training runs or compare pretraining choices.
Who It's For and Trade-offs

Great fit if you need: large-scale public-code corpora for pretraining or fine-tuning code LLMs, reproducible datasets with license/provenance fields, and a streaming-friendly format for distributed training. It’s also useful for benchmarking code generation, completion, or retrieval models across multiple programming languages.

Look elsewhere if: you require only small curated corpora, commercial-only licensed datasets, or datasets with stricter provenance guarantees than public scrapes can provide. Also plan for legal review — while license metadata is included, using public code for commercial models may still require legal assessment depending on jurisdictions and downstream usage.

Where It Fits

Positioned between raw public code scrapes and heavily curated commercial corpora, The Stack v2 is a pragmatic choice for research labs and engineering teams that need scale plus metadata for governance. Compared with unprocessed dumps, it reduces duplication and surfaces license signals; compared with proprietary licensed datasets, it offers wider access at the cost of needing careful legal/provenance handling.

Notes and Practical Tips
  • Use the dataset’s language and license fields to construct training subsets that match your project constraints (e.g., permissive licenses, single-language focus).
  • Prefer streaming loading when training at scale to avoid the need for multi-terabyte local storage.
  • Treat the included license/provenance fields as a starting point for compliance workflows rather than a definitive legal clearance.

Overall, The Stack v2 is a workhorse dataset for teams experimenting with or scaling code-focused LLMs — it reduces some of the engineering friction around I/O and deduplication while surfacing metadata needed for responsible model development.

Information

Categories

More Items

Hugging Face

Selected ~245B-token corpus of algorithmically relevant code across 11 languages from The Stack v3, produced by file-level language-adaptive selection (UltraData-Code-L2-Classifier). Concentrates problem-solving implementations for LLM code pretraining while preserving broad language coverage; released under ODC-By.

Hugging Face

Contains 73 images used in Hugging Face library documentation, packaged in Parquet and imagefolder formats for examples, demos, and small-scale image experiments; distributed under CC BY‑NC‑SA 4.0.

Hugging Face

A monthly-updated, hive-partitioned parquet corpus of billions of standard rated chess games from Lichess for data analysis and ML — includes move lists with clock info, player Glicko2 ratings, openings, timestamps, and some Stockfish evals under CC0.