Datasets:
tgai commited on
Commit ·
c048fb9
1
Parent(s): 3364fd9
Add dataset card for the-stack-go samples
Browse files
README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
pretty_name: the-stack-go samples
|
| 4 |
+
task_categories:
|
| 5 |
+
- text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- code
|
| 8 |
+
- pretraining
|
| 9 |
+
- the-stack-v2
|
| 10 |
+
configs:
|
| 11 |
+
- config_name: 8k
|
| 12 |
+
data_files:
|
| 13 |
+
- split: train
|
| 14 |
+
path: 8k/*.parquet
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# the-stack-go-samples
|
| 18 |
+
|
| 19 |
+
Training samples generated from the `s0duku/the-stack-go` ge2 dataset, which is
|
| 20 |
+
a strict `star_events_count > 1` export of The Stack v2.
|
| 21 |
+
|
| 22 |
+
## Available datasets
|
| 23 |
+
|
| 24 |
+
### 8k
|
| 25 |
+
|
| 26 |
+
- Directory: `8k/`
|
| 27 |
+
- Maximum context: **8,192 tokens**
|
| 28 |
+
- Shards: **64 Parquet files**
|
| 29 |
+
- Samples: **17,670,028**
|
| 30 |
+
- Total tokens: **100,988,533,457**
|
| 31 |
+
- Source repositories: **3,246,224**
|
| 32 |
+
- Repositories represented in samples: **3,239,349**
|
| 33 |
+
- Parquet size: approximately **58.9 GiB**
|
| 34 |
+
- Tokenizer: `deepseek-ai/DeepSeek-V4-Flash-Base`
|
| 35 |
+
- Tokenizer revision: `8855555deef230a27a21a8d6f294b7b7497759b6`
|
| 36 |
+
|
| 37 |
+
`8k/manifest.json` records the generation configuration and per-shard statistics.
|
| 38 |
+
|
| 39 |
+
## Schema
|
| 40 |
+
|
| 41 |
+
Each row contains:
|
| 42 |
+
|
| 43 |
+
| Field | Type | Description |
|
| 44 |
+
|---|---|---|
|
| 45 |
+
| `sample_id` | string | Stable sample identifier |
|
| 46 |
+
| `repo_id` | string | Source repository name |
|
| 47 |
+
| `revision_id` | string | Source repository revision |
|
| 48 |
+
| `kind` | string | `dependency` or `target_context` |
|
| 49 |
+
| `text` | large_string | Rendered training text with repository/file boundaries |
|
| 50 |
+
| `files` | list<struct> | File provenance for the rendered content |
|
| 51 |
+
| `token_count` | int32 | Exact token count of `text` |
|
| 52 |
+
| `metadata_json` | large_string | JSON-encoded sample metadata |
|
| 53 |
+
|
| 54 |
+
The nested `files` fields are:
|
| 55 |
+
|
| 56 |
+
```text
|
| 57 |
+
path, relation, content_policy, role, language, bytes, part, parts
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
`token_count` is an upper-bounded length, not a fixed length. The maximum is
|
| 61 |
+
8,192 tokens, while individual samples may be shorter.
|
| 62 |
+
|
| 63 |
+
## Reading
|
| 64 |
+
|
| 65 |
+
Stream the dataset instead of loading all Parquet rows into memory:
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
from datasets import load_dataset
|
| 69 |
+
|
| 70 |
+
ds = load_dataset(
|
| 71 |
+
"s0duku/the-stack-go-samples",
|
| 72 |
+
"8k",
|
| 73 |
+
split="train",
|
| 74 |
+
streaming=True,
|
| 75 |
+
)
|
| 76 |
+
for row in ds.take(3):
|
| 77 |
+
print(row["repo_id"], row["kind"], row["token_count"])
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
Or read a single local shard with PyArrow:
|
| 81 |
+
|
| 82 |
+
```python
|
| 83 |
+
import pyarrow.parquet as pq
|
| 84 |
+
|
| 85 |
+
table = pq.read_table("8k/train-00000-of-00064.parquet")
|
| 86 |
+
print(table.schema)
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Source and licensing
|
| 90 |
+
|
| 91 |
+
The samples are derived from The Stack v2 and preserve repository/file
|
| 92 |
+
provenance. Source licenses and removal requests remain governed by the
|
| 93 |
+
original dataset and upstream content providers. There is no single license
|
| 94 |
+
for all included source code.
|
| 95 |
+
|
| 96 |
+
## Generation notes
|
| 97 |
+
|
| 98 |
+
Samples are dependency-aware and repository-scoped. Dependency samples present
|
| 99 |
+
files in dependency-first order. Sample text can contain structure markers such
|
| 100 |
+
as `<|begin▁of▁repo▁name|>` and `<|begin▁of▁file|>`; these are tokenizer
|
| 101 |
+
control markers, not part of the original source content.
|