Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
License:
cornstack-samples / README.md
hotchpotch's picture
Update dataset card body for conrnstack-samples (keep metadata)
1b1e352 verified
|
raw
history blame
8.99 kB
metadata
dataset_info:
  - config_name: go-v1-hard-negatives-100k
    features:
      - name: query
        dtype: string
      - name: positive
        dtype: string
      - name: negative_1
        dtype: string
      - name: negative_2
        dtype: string
      - name: negative_3
        dtype: string
      - name: negative_4
        dtype: string
      - name: negative_5
        dtype: string
      - name: negative_6
        dtype: string
      - name: negative_7
        dtype: string
    splits:
      - name: train
        num_bytes: 365567439
        num_examples: 100000
    download_size: 177524861
    dataset_size: 365567439
  - config_name: go-v1-pair-2M
    features:
      - name: query
        dtype: string
      - name: document
        dtype: string
    splits:
      - name: train
        num_bytes: 1071935662
        num_examples: 2000000
    download_size: 441018569
    dataset_size: 1071935662
  - config_name: java-v1-hard-negatives-100k
    features:
      - name: query
        dtype: string
      - name: positive
        dtype: string
      - name: negative_1
        dtype: string
      - name: negative_2
        dtype: string
      - name: negative_3
        dtype: string
      - name: negative_4
        dtype: string
      - name: negative_5
        dtype: string
      - name: negative_6
        dtype: string
      - name: negative_7
        dtype: string
    splits:
      - name: train
        num_bytes: 374467782
        num_examples: 100000
    download_size: 143726279
    dataset_size: 374467782
  - config_name: java-v1-pair-2M
    features:
      - name: query
        dtype: string
      - name: document
        dtype: string
    splits:
      - name: train
        num_bytes: 1423830910
        num_examples: 2000000
    download_size: 517039941
    dataset_size: 1423830910
  - config_name: javascript-v1-hard-negatives-100k
    features:
      - name: query
        dtype: string
      - name: positive
        dtype: string
      - name: negative_1
        dtype: string
      - name: negative_2
        dtype: string
      - name: negative_3
        dtype: string
      - name: negative_4
        dtype: string
      - name: negative_5
        dtype: string
      - name: negative_6
        dtype: string
      - name: negative_7
        dtype: string
    splits:
      - name: train
        num_bytes: 513419414
        num_examples: 100000
    download_size: 231159862
    dataset_size: 513419414
  - config_name: javascript-v1-pair-2M
    features:
      - name: query
        dtype: string
      - name: document
        dtype: string
    splits:
      - name: train
        num_bytes: 1645071326
        num_examples: 2000000
    download_size: 712840086
    dataset_size: 1645071326
  - config_name: php-v1-hard-negatives-100k
    features:
      - name: query
        dtype: string
      - name: positive
        dtype: string
      - name: negative_1
        dtype: string
      - name: negative_2
        dtype: string
      - name: negative_3
        dtype: string
      - name: negative_4
        dtype: string
      - name: negative_5
        dtype: string
      - name: negative_6
        dtype: string
      - name: negative_7
        dtype: string
    splits:
      - name: train
        num_bytes: 456010637
        num_examples: 100000
    download_size: 187231845
    dataset_size: 456010637
  - config_name: php-v1-pair-2M
    features:
      - name: query
        dtype: string
      - name: document
        dtype: string
    splits:
      - name: train
        num_bytes: 1595714130
        num_examples: 2000000
    download_size: 586289099
    dataset_size: 1595714130
  - config_name: python-v1-hard-negatives-100k
    features:
      - name: query
        dtype: string
      - name: positive
        dtype: string
      - name: negative_1
        dtype: string
      - name: negative_2
        dtype: string
      - name: negative_3
        dtype: string
      - name: negative_4
        dtype: string
      - name: negative_5
        dtype: string
      - name: negative_6
        dtype: string
      - name: negative_7
        dtype: string
    splits:
      - name: train
        num_bytes: 427758453
        num_examples: 100000
    download_size: 192066322
    dataset_size: 427758453
  - config_name: python-v1-pair-2M
    features:
      - name: query
        dtype: string
      - name: document
        dtype: string
    splits:
      - name: train
        num_bytes: 1462591691
        num_examples: 2000000
    download_size: 645088234
    dataset_size: 1462591691
  - config_name: ruby-v1-hard-negatives-100k
    features:
      - name: query
        dtype: string
      - name: positive
        dtype: string
      - name: negative_1
        dtype: string
      - name: negative_2
        dtype: string
      - name: negative_3
        dtype: string
      - name: negative_4
        dtype: string
      - name: negative_5
        dtype: string
      - name: negative_6
        dtype: string
      - name: negative_7
        dtype: string
    splits:
      - name: train
        num_bytes: 224289181
        num_examples: 100000
    download_size: 104781612
    dataset_size: 224289181
  - config_name: ruby-v1-pair-2M
    features:
      - name: query
        dtype: string
      - name: document
        dtype: string
    splits:
      - name: train
        num_bytes: 856311579
        num_examples: 2000000
    download_size: 350446568
    dataset_size: 856311579
configs:
  - config_name: go-v1-hard-negatives-100k
    data_files:
      - split: train
        path: go-v1-hard-negatives-100k/train-*
  - config_name: go-v1-pair-2M
    data_files:
      - split: train
        path: go-v1-pair-2M/train-*
  - config_name: java-v1-hard-negatives-100k
    data_files:
      - split: train
        path: java-v1-hard-negatives-100k/train-*
  - config_name: java-v1-pair-2M
    data_files:
      - split: train
        path: java-v1-pair-2M/train-*
  - config_name: javascript-v1-hard-negatives-100k
    data_files:
      - split: train
        path: javascript-v1-hard-negatives-100k/train-*
  - config_name: javascript-v1-pair-2M
    data_files:
      - split: train
        path: javascript-v1-pair-2M/train-*
  - config_name: php-v1-hard-negatives-100k
    data_files:
      - split: train
        path: php-v1-hard-negatives-100k/train-*
  - config_name: php-v1-pair-2M
    data_files:
      - split: train
        path: php-v1-pair-2M/train-*
  - config_name: python-v1-hard-negatives-100k
    data_files:
      - split: train
        path: python-v1-hard-negatives-100k/train-*
  - config_name: python-v1-pair-2M
    data_files:
      - split: train
        path: python-v1-pair-2M/train-*
  - config_name: ruby-v1-hard-negatives-100k
    data_files:
      - split: train
        path: ruby-v1-hard-negatives-100k/train-*
  - config_name: ruby-v1-pair-2M
    data_files:
      - split: train
        path: ruby-v1-pair-2M/train-*

conrnstack-samples

conrnstack-samples is a compact, sampled version of CoRNStack for code-focused embedding training, reranker training, and retrieval experiments.

Source dataset and paper:

Why this dataset

CoRNStack is large. This dataset provides smaller, practical subsets for faster iteration and lower-cost experiments.

Important notes:

  • This is a sampled dataset, not the full CoRNStack distribution.
  • If you need maximum coverage or full-scale training, use the original CoRNStack collection.

Config layout

Each language is published as two separate configs:

  • {lang}-v1-pair-2M
  • {lang}-v1-hard-negatives-100k

Each config uses split train.

{lang}-v1-pair-2M

Fields:

  • query
  • document

Target rows per language: ~2,000,000

{lang}-v1-hard-negatives-100k

Fields:

  • query
  • positive
  • negative_1
  • negative_2
  • negative_3
  • negative_4
  • negative_5
  • negative_6
  • negative_7

Target rows per language: ~100,000

Included configs

Config Rows Type
go-v1-pair-2M 2,000,000 pair
go-v1-hard-negatives-100k 100,000 hard-negatives
java-v1-pair-2M 2,000,000 pair
java-v1-hard-negatives-100k 100,000 hard-negatives
javascript-v1-pair-2M 2,000,000 pair
javascript-v1-hard-negatives-100k 100,000 hard-negatives
php-v1-pair-2M 2,000,000 pair
php-v1-hard-negatives-100k 100,000 hard-negatives
python-v1-pair-2M 2,000,000 pair
python-v1-hard-negatives-100k 100,000 hard-negatives
ruby-v1-pair-2M 2,000,000 pair
ruby-v1-hard-negatives-100k 100,000 hard-negatives

Quick usage

from datasets import load_dataset

pair_ds = load_dataset("hotchpotch/conrnstack-samples", "python-v1-pair-2M", split="train")
hard_ds = load_dataset("hotchpotch/conrnstack-samples", "python-v1-hard-negatives-100k", split="train")

print(pair_ds.column_names, len(pair_ds))
print(hard_ds.column_names, len(hard_ds))

Creation process (rough)

For each language:

  1. Read CoRNStack shard files (shard-*.jsonl.gz).
  2. Count lines per shard and allocate per-shard targets.
  3. Build pair data via random line-index sampling with valid string query/document.
  4. Build hard-negative data from disjoint rows:
    • valid string query/document
    • negatives contains at least 7 unique non-empty strings
    • sample 7 negatives per row
    • cap output via reservoir sampling

Default seed is fixed (42) for reproducibility under identical source snapshots and parameters.

License

This dataset follows CoRNStack and is released under Apache-2.0.

Citation and attribution

If you use this dataset, please cite and attribute CoRNStack: