File size: 2,518 Bytes
92ea6d2
 
495f81c
 
 
 
 
 
 
 
 
92ea6d2
495f81c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
task_categories:
- text-generation
language:
- en
tags:
- data-juicer
- pretraining
size_categories:
- 10M<n<100M
---

# RedPajama & The Pile -- StackExchange (refined by Data-Juicer)

A refined version of StackExchange dataset in RedPajama & The Pile by [Data-Juicer](https://github.com/alibaba/data-juicer). Removing some "bad" samples from the original merged dataset to make it higher-quality.

This dataset is usually used to pretrain a Large Language Model.

**Notice**: Here is a small subset for previewing. The whole dataset is available [here](https://dail-wlcb.oss-cn-wulanchabu.aliyuncs.com/LLM_data/our_refined_datasets/pretraining/redpajama-pile-stackexchange-refine-result.jsonl) (About 71GB).

## Dataset Information

- Number of samples: 26,309,203	 (Keep ~57.89% from the original dataset)

## Refining Recipe
```yaml
# global parameters
project_name: 'Data-Juicer-stack-exchange'
dataset_path: '/path/to/your/dataset'  # path to your dataset directory or file
export_path: '/path/to/your/dataset.jsonl'

np: 50  # number of subprocess to process your dataset
open_tracer: true

# process schedule
# a list of several process operators with their arguments
process:
  - clean_email_mapper:
  - clean_links_mapper:
  - fix_unicode_mapper:
  - punctuation_normalization_mapper:
  - whitespace_normalization_mapper:

  - alphanumeric_filter:
      tokenization: false
      min_ratio: 0.35  # <3sigma
      max_ratio: 0.943  # 3sigma
  - average_line_length_filter:  # for code
      min_len: 20  # >3sigma
      max_len: 400 # >3sigma
  - character_repetition_filter:
      rep_len: 10
      max_ratio: 0.4  # >3sigma (0.12)
  - flagged_words_filter:
      lang: en
      tokenization: true
      max_ratio: 0.01  # >3sigma
  - language_id_score_filter:  # remove language filter
      min_score: 0.1 # <3sigma
  - maximum_line_length_filter:  # for code
      min_len: 80
  - perplexity_filter:
      lang: en
      max_ppl: 10000  # >3sigma
  - special_characters_filter:
      min_ratio: 0.232 # 3sigma
      max_ratio: 0.7  # >3sigma
  - text_length_filter:
      min_len: 200
  - words_num_filter:
      lang: en
      tokenization: true
      min_num: 100
  - word_repetition_filter:
      lang: en
      tokenization: true
      rep_len: 10
      max_ratio: 0.8 # >3sigma

  - document_simhash_deduplicator:  #26309203 left
      tokenization: space
      window_size: 3
      lowercase: true
      ignore_pattern: '\n\n'
      num_blocks: 9
      hamming_distance: 7
```