hylcool commited on
Commit
f5beed8
1 Parent(s): b98d09b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +162 -0
README.md CHANGED
@@ -1,3 +1,165 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - data-juicer
9
+ - pretraining
10
+ size_categories:
11
+ - 10M<n<100M
12
  ---
13
+
14
+ # RedPajama & TheStack -- Github Code (refined by Data-Juicer)
15
+
16
+ A refined version of Github Code dataset in RedPajama & TheStack by [Data-Juicer](https://github.com/alibaba/data-juicer). Removing some "bad" samples from the original dataset to make it higher-quality.
17
+
18
+ This dataset is usually used to pretrain a Large Language Model.
19
+
20
+ **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-stack-code-refine-result.jsonl) (About 232GB).
21
+
22
+ ## Dataset Information
23
+
24
+ - Number of samples: 49,279,344 (Keep ~52.09% from the original dataset)
25
+
26
+ ## Refining Recipe
27
+
28
+ ### RedPajama code refinement
29
+
30
+ ```yaml
31
+ # global parameters
32
+ project_name: 'Data-Juicer-recipes-code-rp'
33
+ dataset_path: '/path/to/your/dataset' # path to your dataset directory or file
34
+ export_path: '/path/to/your/dataset.jsonl'
35
+
36
+ np: 50 # number of subprocess to process your dataset
37
+ open_tracer: true
38
+
39
+ # process schedule
40
+ # a list of several process operators with their arguments
41
+ process:
42
+ - clean_email_mapper:
43
+ - clean_links_mapper:
44
+ - fix_unicode_mapper:
45
+ - punctuation_normalization_mapper:
46
+ - whitespace_normalization_mapper:
47
+ - clean_copyright_mapper:
48
+
49
+ - alphanumeric_filter:
50
+ tokenization: False
51
+ min_ratio: 0.4
52
+ max_ratio: 0.8
53
+ - alphanumeric_filter:
54
+ tokenization: True
55
+ min_ratio: 1.5
56
+ max_ratio: 3
57
+ - average_line_length_filter:
58
+ min_len: 15
59
+ max_len: 100
60
+ - character_repetition_filter:
61
+ rep_len: 10
62
+ min_ratio: 0.05
63
+ max_ratio: 0.3
64
+ - maximum_line_length_filter:
65
+ min_len: 50
66
+ max_len: 500
67
+ - text_length_filter:
68
+ min_len: 300
69
+ - words_num_filter:
70
+ lang: en
71
+ tokenization: False
72
+ min_num: 30
73
+ max_num: 5000
74
+ - word_repetition_filter:
75
+ lang: en
76
+ tokenization: False
77
+ rep_len: 10
78
+ max_ratio: 0.1
79
+ - document_simhash_deduplicator:
80
+ tokenization: space
81
+ window_size: 6
82
+ lowercase: true
83
+ ignore_pattern: '\p{P}'
84
+ num_blocks: 6
85
+ hamming_distance: 4
86
+ ```
87
+
88
+ ### TheStack code refinement (only max_stars_count >= 20)
89
+
90
+ ```yaml
91
+ # global parameters
92
+ project_name: 'Data-Juicer-recipes-the-stack'
93
+ dataset_path: '/path/to/your/dataset' # path to your dataset directory or file
94
+ export_path: '/path/to/your/dataset.jsonl'
95
+
96
+ text_key: 'content'
97
+
98
+ np: 50 # number of subprocess to process your dataset
99
+ open_tracer: true
100
+
101
+ # process schedule
102
+ # a list of several process operators with their arguments
103
+ process:
104
+ - clean_email_mapper:
105
+ - clean_links_mapper:
106
+ - fix_unicode_mapper:
107
+ - punctuation_normalization_mapper:
108
+ - whitespace_normalization_mapper:
109
+ - clean_copyright_mapper:
110
+
111
+ - alphanumeric_filter: # 18766
112
+ tokenization: false
113
+ min_ratio: 0.2 # < 3sigma (0.3791)
114
+ max_ratio: 0.9163 # 3sigma
115
+ - alphanumeric_filter: # 146432
116
+ tokenization: true
117
+ min_ratio: 0.546 # 3sigma
118
+ max_ratio: 3.65 # 3sigma
119
+ - average_line_length_filter: # for code
120
+ min_len: 10 # > 3sigma (0) -- 48790
121
+ max_len: 150 # < 3sigma (15603) -- 233275
122
+ - character_repetition_filter:
123
+ max_ratio: 0.36 # 3sigma -- 346875
124
+ - maximum_line_length_filter: # for code
125
+ max_len: 1000 # remove 256670 samples
126
+ - text_length_filter:
127
+ max_len: 96714 # 3sigma -- 190006
128
+ - words_num_filter:
129
+ min_num: 20 # remove 1504958 samples
130
+ max_num: 6640 # 3sigma -- remove 179847 samples
131
+ - word_repetition_filter:
132
+ rep_len: 10
133
+ max_ratio: 0.357 # 3sigma -- 598462
134
+
135
+ - document_simhash_deduplicator:
136
+ tokenization: space
137
+ window_size: 6
138
+ lowercase: true
139
+ ignore_pattern: '\p{P}'
140
+ num_blocks: 6
141
+ hamming_distance: 4
142
+ ```
143
+
144
+ ### Merge and Remove Duplicate Samples
145
+
146
+ ```yaml
147
+ project_name: 'Data-Juicer-recipes-code'
148
+ dataset_path: '/path/to/your/dataset' # path to your dataset directory or file
149
+ export_path: '/path/to/your/dataset.jsonl' # path to your dataset result file
150
+
151
+ np: 50 # number of subprocess to process your dataset
152
+ open_tracer: true
153
+
154
+ # process schedule
155
+ # a list of several process operators with their arguments
156
+
157
+ process:
158
+ - document_simhash_deduplicator:
159
+ tokenization: space
160
+ window_size: 6
161
+ lowercase: true
162
+ ignore_pattern: '\p{P}'
163
+ num_blocks: 6
164
+ hamming_distance: 4
165
+ ```