pszemraj's picture
Update README.md
908c046
|
raw
history blame
3.13 kB
metadata
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: validation
        path: data/validation-*
      - split: test
        path: data/test-*
  - config_name: text-only
    data_files:
      - split: train
        path: text-only/train-*
      - split: validation
        path: text-only/validation-*
      - split: test
        path: text-only/test-*
dataset_info:
  - config_name: default
    features:
      - name: id
        dtype: string
      - name: url
        dtype: string
      - name: title
        dtype: string
      - name: text
        dtype: string
    splits:
      - name: train
        num_bytes: 15368746858.779654
        num_examples: 5673373
      - name: validation
        num_bytes: 404439922.64724064
        num_examples: 149299
      - name: test
        num_bytes: 404442631.57310516
        num_examples: 149300
    download_size: 9703633440
    dataset_size: 16177629413
  - config_name: text-only
    features:
      - name: text
        dtype: string
    splits:
      - name: train
        num_bytes: 14834731398.280304
        num_examples: 5673373
      - name: validation
        num_bytes: 390386911.46022856
        num_examples: 149299
      - name: test
        num_bytes: 390389526.2594667
        num_examples: 149300
    download_size: 9374463601
    dataset_size: 15615507835.999998

Dataset Card for "wikipedia-deduped"

wikipedia - 20230901.en - deduped

purpose: train with less data while maintaining (most) of the quality

This is really more of a "high quality diverse sample" rather than "we are trying to remove literal duplicate documents". Source dataset: graelo/wikipedia.

default config

command:

python -m text_dedup.minhash \
  --path $ds_name \
  --name $dataset_config \
  --split $data_split \
  --cache_dir "./cache" \
  --output $out_dir \
  --column $text_column \
  --ngram 4 --threshold 0.6 \
  --hash_func xxh3 --hash_bits 16 --num_perm 64 \
  --batch_size 10000

dedup:

Fingerprinting... (num_proc=40): 100% 6705754/6705754 [06:57<00:00, 16063.27 examples/s]
Iterating MinHashes...: 100% 671/671 [04:13<00:00,  2.65it/s]
Clustering...: 100% 10/10 [00:21<00:00,  2.18s/it]
Finding clusters... (num_proc=40): 100% 6705754/6705754 [06:38<00:00, 16839.42 examples/s]
Filtering clusters... (num_proc=40): 100% 6705754/6705754 [02:25<00:00, 46058.39 examples/s]
Saving the dataset (39/39 shards): 100% 5971972/5971972 [03:47<00:00, 26266.10 examples/s]
[10/23/23 02:29:41] INFO     Loading                         : 78.82s

result:

DatasetDict({
    train: Dataset({
        features: ['id', 'url', 'title', 'text'],
        num_rows: 5673373
    })
    validation: Dataset({
        features: ['id', 'url', 'title', 'text'],
        num_rows: 149299
    })
    test: Dataset({
        features: ['id', 'url', 'title', 'text'],
        num_rows: 149300
    })
})

text-only

This is the same thing but with all columns except for 'text' removed.

from datasets import load_dataset

# If the dataset is gated/private, make sure you have run huggingface-cli login
config_name = "text-only"
dataset = load_dataset("BEE-spoke-data/wikipedia-deduped", config_name)