Datasets:
File size: 10,934 Bytes
3996874 bff173b 3996874 bff173b ebe310a 6c8f6f2 9ac03c5 3996874 bff173b ebe310a 6c8f6f2 9ac03c5 94df45f 3996874 294cdf9 cbb347a 294cdf9 375af99 294cdf9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
---
dataset_info:
- config_name: C
features:
- name: blob_id
dtype: string
- name: directory_id
dtype: string
- name: path
dtype: string
- name: content_id
dtype: string
- name: detected_licenses
sequence: string
- name: license_type
dtype: string
- name: repo_name
dtype: string
- name: snapshot_id
dtype: string
- name: revision_id
dtype: string
- name: branch_name
dtype: string
- name: visit_date
dtype: timestamp[ns]
- name: revision_date
dtype: timestamp[ns]
- name: committer_date
dtype: timestamp[ns]
- name: github_id
dtype: int64
- name: star_events_count
dtype: int64
- name: fork_events_count
dtype: int64
- name: gha_license_id
dtype: string
- name: gha_event_created_at
dtype: timestamp[ns]
- name: gha_created_at
dtype: timestamp[ns]
- name: gha_language
dtype: string
- name: src_encoding
dtype: string
- name: language
dtype: string
- name: is_vendor
dtype: bool
- name: is_generated
dtype: bool
- name: length_bytes
dtype: int64
- name: extension
dtype: string
- name: filename
dtype: string
- name: content
dtype: string
splits:
- name: train
num_bytes: 64658205790
num_examples: 6022485
download_size: 20685881003
dataset_size: 64658205790
- config_name: C++
features:
- name: blob_id
dtype: string
- name: directory_id
dtype: string
- name: path
dtype: string
- name: content_id
dtype: string
- name: detected_licenses
sequence: string
- name: license_type
dtype: string
- name: repo_name
dtype: string
- name: snapshot_id
dtype: string
- name: revision_id
dtype: string
- name: branch_name
dtype: string
- name: visit_date
dtype: timestamp[ns]
- name: revision_date
dtype: timestamp[ns]
- name: committer_date
dtype: timestamp[ns]
- name: github_id
dtype: int64
- name: star_events_count
dtype: int64
- name: fork_events_count
dtype: int64
- name: gha_license_id
dtype: string
- name: gha_event_created_at
dtype: timestamp[ns]
- name: gha_created_at
dtype: timestamp[ns]
- name: gha_language
dtype: string
- name: src_encoding
dtype: string
- name: language
dtype: string
- name: is_vendor
dtype: bool
- name: is_generated
dtype: bool
- name: length_bytes
dtype: int64
- name: extension
dtype: string
- name: filename
dtype: string
- name: content
dtype: string
splits:
- name: train
num_bytes: 105532622911
num_examples: 12003027
download_size: 41089347301
dataset_size: 105532622911
- config_name: Java
features:
- name: blob_id
dtype: string
- name: directory_id
dtype: string
- name: path
dtype: string
- name: content_id
dtype: string
- name: detected_licenses
sequence: string
- name: license_type
dtype: string
- name: repo_name
dtype: string
- name: snapshot_id
dtype: string
- name: revision_id
dtype: string
- name: branch_name
dtype: string
- name: visit_date
dtype: timestamp[ns]
- name: revision_date
dtype: timestamp[ns]
- name: committer_date
dtype: timestamp[ns]
- name: github_id
dtype: int64
- name: star_events_count
dtype: int64
- name: fork_events_count
dtype: int64
- name: gha_license_id
dtype: string
- name: gha_event_created_at
dtype: timestamp[ns]
- name: gha_created_at
dtype: timestamp[ns]
- name: gha_language
dtype: string
- name: src_encoding
dtype: string
- name: language
dtype: string
- name: is_vendor
dtype: bool
- name: is_generated
dtype: bool
- name: length_bytes
dtype: int64
- name: extension
dtype: string
- name: filename
dtype: string
- name: content
dtype: string
splits:
- name: train
num_bytes: 96702367410
num_examples: 23840009
download_size: 35433610745
dataset_size: 96702367410
- config_name: JavaScript
features:
- name: blob_id
dtype: string
- name: directory_id
dtype: string
- name: path
dtype: string
- name: content_id
dtype: string
- name: detected_licenses
sequence: string
- name: license_type
dtype: string
- name: repo_name
dtype: string
- name: snapshot_id
dtype: string
- name: revision_id
dtype: string
- name: branch_name
dtype: string
- name: visit_date
dtype: timestamp[ns]
- name: revision_date
dtype: timestamp[ns]
- name: committer_date
dtype: timestamp[ns]
- name: github_id
dtype: int64
- name: star_events_count
dtype: int64
- name: fork_events_count
dtype: int64
- name: gha_license_id
dtype: string
- name: gha_event_created_at
dtype: timestamp[ns]
- name: gha_created_at
dtype: timestamp[ns]
- name: gha_language
dtype: string
- name: src_encoding
dtype: string
- name: language
dtype: string
- name: is_vendor
dtype: bool
- name: is_generated
dtype: bool
- name: length_bytes
dtype: int64
- name: extension
dtype: string
- name: filename
dtype: string
- name: content
dtype: string
splits:
- name: train
num_bytes: 247875047930
num_examples: 22850027
download_size: 102329028722
dataset_size: 247875047930
- config_name: Python
features:
- name: blob_id
dtype: string
- name: directory_id
dtype: string
- name: path
dtype: string
- name: content_id
dtype: string
- name: detected_licenses
sequence: string
- name: license_type
dtype: string
- name: repo_name
dtype: string
- name: snapshot_id
dtype: string
- name: revision_id
dtype: string
- name: branch_name
dtype: string
- name: visit_date
dtype: timestamp[ns]
- name: revision_date
dtype: timestamp[ns]
- name: committer_date
dtype: timestamp[ns]
- name: github_id
dtype: int64
- name: star_events_count
dtype: int64
- name: fork_events_count
dtype: int64
- name: gha_license_id
dtype: string
- name: gha_event_created_at
dtype: timestamp[ns]
- name: gha_created_at
dtype: timestamp[ns]
- name: gha_language
dtype: string
- name: src_encoding
dtype: string
- name: language
dtype: string
- name: is_vendor
dtype: bool
- name: is_generated
dtype: bool
- name: length_bytes
dtype: int64
- name: extension
dtype: string
- name: filename
dtype: string
- name: content
dtype: string
splits:
- name: train
num_bytes: 83396371824
num_examples: 18065153
download_size: 34470948501
dataset_size: 83396371824
configs:
- config_name: C
data_files:
- split: train
path: C/train-*
- config_name: C++
data_files:
- split: train
path: C++/train-*
- config_name: Java
data_files:
- split: train
path: Java/train-*
- config_name: JavaScript
data_files:
- split: train
path: JavaScript/train-*
- config_name: Python
data_files:
- split: train
path: Python/train-*
license: other
task_categories:
- text-generation
tags:
- Python
- Java
- JavaScript
- C/C++
size_categories:
- 10M<n<100M
---
# 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](https://huggingface.co/datasets/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
```python
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](https://huggingface.co/datasets/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](https://github.com/bigcode-project/bigcode-dataset#how-to-remove-your-code-from-the-dataset).
---
## Citation
If you use this dataset, please cite the original Stack v2 paper:
```bibtex
@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}
}
``` |