File size: 2,785 Bytes
c048fb9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: other
pretty_name: the-stack-go samples
task_categories:
- text-generation
tags:
- code
- pretraining
- the-stack-v2
configs:
- config_name: 8k
  data_files:
  - split: train
    path: 8k/*.parquet
---

# the-stack-go-samples

Training samples generated from the `s0duku/the-stack-go` ge2 dataset, which is
a strict `star_events_count > 1` export of The Stack v2.

## Available datasets

### 8k

- Directory: `8k/`
- Maximum context: **8,192 tokens**
- Shards: **64 Parquet files**
- Samples: **17,670,028**
- Total tokens: **100,988,533,457**
- Source repositories: **3,246,224**
- Repositories represented in samples: **3,239,349**
- Parquet size: approximately **58.9 GiB**
- Tokenizer: `deepseek-ai/DeepSeek-V4-Flash-Base`
- Tokenizer revision: `8855555deef230a27a21a8d6f294b7b7497759b6`

`8k/manifest.json` records the generation configuration and per-shard statistics.

## Schema

Each row contains:

| Field | Type | Description |
|---|---|---|
| `sample_id` | string | Stable sample identifier |
| `repo_id` | string | Source repository name |
| `revision_id` | string | Source repository revision |
| `kind` | string | `dependency` or `target_context` |
| `text` | large_string | Rendered training text with repository/file boundaries |
| `files` | list<struct> | File provenance for the rendered content |
| `token_count` | int32 | Exact token count of `text` |
| `metadata_json` | large_string | JSON-encoded sample metadata |

The nested `files` fields are:

```text
path, relation, content_policy, role, language, bytes, part, parts
```

`token_count` is an upper-bounded length, not a fixed length. The maximum is
8,192 tokens, while individual samples may be shorter.

## Reading

Stream the dataset instead of loading all Parquet rows into memory:

```python
from datasets import load_dataset

ds = load_dataset(
    "s0duku/the-stack-go-samples",
    "8k",
    split="train",
    streaming=True,
)
for row in ds.take(3):
    print(row["repo_id"], row["kind"], row["token_count"])
```

Or read a single local shard with PyArrow:

```python
import pyarrow.parquet as pq

table = pq.read_table("8k/train-00000-of-00064.parquet")
print(table.schema)
```

## Source and licensing

The samples are derived from The Stack v2 and preserve repository/file
provenance. Source licenses and removal requests remain governed by the
original dataset and upstream content providers. There is no single license
for all included source code.

## Generation notes

Samples are dependency-aware and repository-scoped. Dependency samples present
files in dependency-first order. Sample text can contain structure markers such
as `<|begin▁of▁repo▁name|>` and `<|begin▁of▁file|>`; these are tokenizer
control markers, not part of the original source content.