|
--- |
|
license: other |
|
dataset_info: |
|
- config_name: c |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: cpp |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: csharp |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: go |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: java |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: javascript |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: markdown |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: php |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: python |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: ruby |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: rust |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: shell |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: sql |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: swift |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
- config_name: typescript |
|
features: |
|
- name: language |
|
dtype: string |
|
- name: src_encoding |
|
dtype: string |
|
- name: length_bytes |
|
dtype: int64 |
|
- name: score |
|
dtype: float64 |
|
- name: int_score |
|
dtype: int64 |
|
- name: detected_licenses |
|
sequence: string |
|
- name: license_type |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: ??? |
|
num_examples: ??? |
|
|
|
|
|
configs: |
|
- config_name: c |
|
data_files: |
|
- split: train |
|
path: c.parquet |
|
- config_name: cpp |
|
data_files: |
|
- split: train |
|
path: cpp.parquet |
|
- config_name: csharp |
|
data_files: |
|
- split: train |
|
path: csharp.parquet |
|
- config_name: go |
|
data_files: |
|
- split: train |
|
path: go.parquet |
|
- config_name: java |
|
data_files: |
|
- split: train |
|
path: java.parquet |
|
- config_name: javascript |
|
data_files: |
|
- split: train |
|
path: javascript.parquet |
|
- config_name: markdown |
|
data_files: |
|
- split: train |
|
path: markdown.parquet |
|
- config_name: php |
|
data_files: |
|
- split: train |
|
path: php.parquet |
|
- config_name: python |
|
data_files: |
|
- split: train |
|
path: python.parquet |
|
- config_name: ruby |
|
data_files: |
|
- split: train |
|
path: ruby.parquet |
|
- config_name: rust |
|
data_files: |
|
- split: train |
|
path: rust.parquet |
|
- config_name: shell |
|
data_files: |
|
- split: train |
|
path: shell.parquet |
|
- config_name: sql |
|
data_files: |
|
- split: train |
|
path: sql.parquet |
|
- config_name: swift |
|
data_files: |
|
- split: train |
|
path: swift.parquet |
|
- config_name: typescript |
|
data_files: |
|
- split: train |
|
path: typescript.parquet |
|
--- |
|
|
|
# 💻 Processed Stack-Edu (Direct Access) |
|
|
|
This repository contains a pre-downloaded and processed version of the **[Stack-Edu](https://huggingface.co/datasets/HuggingFaceTB/stack-edu)** dataset. The original dataset consists of SWHIDs pointing to files on Software Heritage. This version contains the **full text content**, saved in Parquet format and organized by programming language, making it immediately usable for training and analysis without the slow download process. |
|
|
|
Stack-Edu is a 125B token dataset of high-quality, educational code filtered from [The Stack v2](https://huggingface.co/datasets/bigcode/the-stack-v2). It was curated by the Hugging Face team for training the StarCoder2 models. |
|
|
|
## Dataset Structure |
|
|
|
The data is organized into one Parquet file per programming language. Each language is available as a separate configuration (subset). |
|
|
|
### Available Languages (Configurations) |
|
|
|
You can load data for any of the following languages by specifying its name in the `load_dataset` function: |
|
`c`, `cpp`, `csharp`, `go`, `java`, `javascript`, `markdown`, `php`, `python`, `ruby`, `rust`, `shell`, `sql`, `swift`, `typescript`. |
|
|
|
## How to Use |
|
|
|
You can easily load any language-specific subset using the `datasets` library. The dataset card metadata in this `README.md` allows for direct loading of each configuration. |
|
|
|
```python |
|
from datasets import load_dataset |
|
|
|
# Load a specific language, for example, Python |
|
# Note: It is recommended to use streaming=True for large datasets to avoid downloading everything at once. |
|
python_data = load_dataset("meryyllebr543/stack-edu-huggingface", name="python", split="train", streaming=True) |
|
|
|
# Load the C++ data |
|
cpp_data = load_dataset("meryyllebr543/stack-edu-huggingface", name="cpp", split="train") |
|
|
|
# You can then iterate through the dataset |
|
for example in python_data.take(5): |
|
print(example['text'][:200]) # Print the first 200 characters of the text |
|
``` |
|
|
|
## Original Dataset Information |
|
|
|
For more details on the curation process, please refer to the original **[Stack-Edu dataset card](https://huggingface.co/datasets/HuggingFaceTB/stack-edu)**. |
|
|
|
### Citation |
|
|
|
If you use this dataset, please cite the original work: |
|
|
|
``` |
|
@misc{allal2025smollm2smolgoesbig, |
|
title={SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model}, |
|
author={...}, |
|
year={2025}, |
|
eprint={2502.02737}, |
|
archivePrefix={arXiv}, |
|
primaryClass={cs.CL} |
|
} |
|
``` |