tgai
Add dataset card for the-stack-go samples
c048fb9
|
Raw History Blame Contribute Delete
2.79 kB
metadata
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 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:

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:

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:

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.