Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is taking too long to fetch the data. Try to refresh this page.
Server-side error
Error code:   ClientConnectionError

The Stack v2 Subset with File Contents (Python, Java, JavaScript, C, C++)

TempestTeam/dataset-the-stack-v2-dedup-sub

Dataset Summary

This dataset is a language-filtered and self-contained subset of bigcode/the-stack-v2-dedup, part of the BigCode Project.

It contains only files written in the following programming languages:

  • Python 🐍
  • Java
  • JavaScript 📜
  • C ⚙️
  • C++ ⚙️

Unlike the original dataset, which only includes metadata and Software Heritage IDs, this subset includes the actual file contents, enabling out-of-the-box training and analysis of code models, without requiring SWH downloads or AWS credentials.


Use Cases

This dataset is intended for:

  • Pretraining or fine-tuning Code LLMs on high-quality and permissively licensed code
  • Language-specific evaluation or benchmarking
  • Research on code representation, generation, or completion across the 5 selected languages

How to Use

from datasets import load_dataset

ds = load_dataset(
    "TempestTeam/dataset-the-stack-v2-dedup-sub",
    name="Python",
    split="train",
    streaming=True
)

Dataset Structure

Each example in the dataset contains the following fields (inherited from the original Stack v2):

  • content (string): The full file content, decoded in UTF-8
  • language (string): Programming language of the file (detected by go-enry / linguist)
  • path (string): File path within the repository
  • repo_name (string): Repository name on GitHub
  • detected_licenses (list of strings): SPDX license identifiers
  • license_type (string): License type: permissive or no_license
  • is_vendor (bool): Whether the file is from a dependency
  • is_generated (bool): Whether the file is detected as generated
  • length_bytes (int): File size in bytes
  • Plus other metadata like:
    • blob_id, directory_id, revision_id, snapshot_id, visit_date, committer_date
    • GitHub metadata: github_id, gha_language, gha_license_id, etc.

Source Dataset

This dataset is derived from:

👉 bigcode/the-stack-v2-dedup

The full Stack v2 dataset is built from the Software Heritage archive and GitHub Archive metadata, and spans 600+ programming languages. This subset narrows the focus to 5 popular languages while retaining full file content.


Curation Rationale

The five selected languages are among the most widely used in open-source projects and code LLM research. By focusing on this curated set, we reduce dataset size, eliminate irrelevant files, and speed up experimentation while preserving linguistic diversity and utility for real-world applications.


License and Legal Considerations

  • Only permissively licensed files (or those with no license) are included.
  • Licensing information is provided at file level.
  • The dataset may contain personal information (e.g., emails, keys) present in public repositories. Sensitive data has been reduced via deduplication but may still exist.
  • Usage must comply with the original license of each file.

To request the removal of your code, refer to the BigCode opt-out process.


Citation

If you use this dataset, please cite the original Stack v2 paper:

@misc{lozhkov2024starcoder,
  title={StarCoder 2 and The Stack v2: The Next Generation},
  author={Anton Lozhkov and Raymond Li and Loubna Ben Allal and others},
  year={2024},
  eprint={2402.19173},
  archivePrefix={arXiv},
  primaryClass={cs.SE}
}
Downloads last month
2,005

Paper for Cyrile/dataset-the-stack-v2-dedup-sub