Update data_config.py
Browse files- data_config.py +429 -291
data_config.py
CHANGED
|
@@ -1,292 +1,430 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
'split': 'train',
|
| 12 |
-
'streaming':
|
| 13 |
-
'text_field': 'text',
|
| 14 |
-
'weight': 1.0,
|
| 15 |
-
'description': '
|
| 16 |
-
},
|
| 17 |
-
'
|
| 18 |
-
'type': 'text',
|
| 19 |
-
'hf_path': '
|
| 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 |
-
'split': 'train',
|
| 72 |
-
'streaming': True,
|
| 73 |
-
'
|
| 74 |
-
'
|
| 75 |
-
'
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
'
|
| 80 |
-
'
|
| 81 |
-
'
|
| 82 |
-
'
|
| 83 |
-
'
|
| 84 |
-
'
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
'
|
| 95 |
-
'
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
'
|
| 99 |
-
'
|
| 100 |
-
'
|
| 101 |
-
'
|
| 102 |
-
'
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
'
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
'
|
| 111 |
-
'
|
| 112 |
-
'
|
| 113 |
-
'
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
'
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
'
|
| 120 |
-
'
|
| 121 |
-
'
|
| 122 |
-
'
|
| 123 |
-
'
|
| 124 |
-
'
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
'
|
| 130 |
-
'
|
| 131 |
-
'
|
| 132 |
-
'
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
'
|
| 139 |
-
'
|
| 140 |
-
'
|
| 141 |
-
'
|
| 142 |
-
'
|
| 143 |
-
'
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
'
|
| 150 |
-
'
|
| 151 |
-
'
|
| 152 |
-
'
|
| 153 |
-
'
|
| 154 |
-
'
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
'
|
| 161 |
-
'
|
| 162 |
-
'
|
| 163 |
-
'
|
| 164 |
-
'
|
| 165 |
-
'
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
'
|
| 172 |
-
'
|
| 173 |
-
'
|
| 174 |
-
'
|
| 175 |
-
'weight':
|
| 176 |
-
'description': '
|
| 177 |
-
},
|
| 178 |
-
'
|
| 179 |
-
'type': '
|
| 180 |
-
'hf_path': '
|
| 181 |
-
'split': 'train',
|
| 182 |
-
'streaming':
|
| 183 |
-
'
|
| 184 |
-
'
|
| 185 |
-
'
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
'
|
| 191 |
-
'
|
| 192 |
-
'
|
| 193 |
-
'
|
| 194 |
-
'
|
| 195 |
-
'
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
'
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
'
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
'
|
| 209 |
-
'
|
| 210 |
-
'
|
| 211 |
-
'
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
'
|
| 215 |
-
'
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
'
|
| 219 |
-
'
|
| 220 |
-
'
|
| 221 |
-
'
|
| 222 |
-
'
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
'
|
| 229 |
-
'
|
| 230 |
-
'
|
| 231 |
-
'
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
'
|
| 235 |
-
'
|
| 236 |
-
'
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
'
|
| 241 |
-
'
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
'
|
| 245 |
-
'
|
| 246 |
-
'
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
'
|
| 253 |
-
'
|
| 254 |
-
'
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
'
|
| 258 |
-
'
|
| 259 |
-
'description': '
|
| 260 |
-
},
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
'
|
| 268 |
-
'
|
| 269 |
-
'
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
'
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
}
|
|
|
|
| 1 |
+
PRETRAIN_DATASETS = {
|
| 2 |
+
'skypile_local': {
|
| 3 |
+
'type': 'text',
|
| 4 |
+
'hf_path': 'json',
|
| 5 |
+
'data_files': [
|
| 6 |
+
'/root/dataset/2020-40_zh_head_0000.jsonl',
|
| 7 |
+
'/root/dataset/2020-40_zh_head_0001.jsonl',
|
| 8 |
+
'/root/dataset/2020-40_zh_head_0002.jsonl',
|
| 9 |
+
'/root/dataset/2020-40_zh_head_0003.jsonl'
|
| 10 |
+
],
|
| 11 |
+
'split': 'train',
|
| 12 |
+
'streaming': False,
|
| 13 |
+
'text_field': 'text',
|
| 14 |
+
'weight': 1.0,
|
| 15 |
+
'description': 'SkyPile-150B subset (local)'
|
| 16 |
+
},
|
| 17 |
+
'the_pile': {
|
| 18 |
+
'type': 'text',
|
| 19 |
+
'hf_path': 'EleutherAI/pile',
|
| 20 |
+
'split': 'train',
|
| 21 |
+
'streaming': True,
|
| 22 |
+
'text_field': 'text',
|
| 23 |
+
'weight': 1.0,
|
| 24 |
+
'description': 'The Pile - 825GB diverse text corpus'
|
| 25 |
+
},
|
| 26 |
+
'pretrain_hq': {
|
| 27 |
+
'type': 'text',
|
| 28 |
+
'hf_path': 'json',
|
| 29 |
+
'data_files': '/root/dataset/pretrain_hq.jsonl',
|
| 30 |
+
'split': 'train',
|
| 31 |
+
'streaming': False,
|
| 32 |
+
'text_field': 'text',
|
| 33 |
+
'weight': 1.0,
|
| 34 |
+
'description': 'Custom high-quality pretrain dataset from local JSONL'
|
| 35 |
+
},
|
| 36 |
+
'c4': {
|
| 37 |
+
'type': 'text',
|
| 38 |
+
'hf_path': 'allenai/c4',
|
| 39 |
+
'config': 'en',
|
| 40 |
+
'split': 'train',
|
| 41 |
+
'streaming': True,
|
| 42 |
+
'text_field': 'text',
|
| 43 |
+
'weight': 0.5,
|
| 44 |
+
'description': 'C4 - Colossal Clean Crawled Corpus'
|
| 45 |
+
},
|
| 46 |
+
'wikipedia': {
|
| 47 |
+
'type': 'text',
|
| 48 |
+
'hf_path': 'HuggingFaceFW/fineweb-edu',
|
| 49 |
+
'config': 'sample-10BT',
|
| 50 |
+
'split': 'train',
|
| 51 |
+
'streaming': True,
|
| 52 |
+
'text_field': 'text',
|
| 53 |
+
'weight': 0.3,
|
| 54 |
+
'description': 'FineWeb Edu - High quality educational content'
|
| 55 |
+
},
|
| 56 |
+
'bookcorpus': {
|
| 57 |
+
'type': 'text',
|
| 58 |
+
'hf_path': 'HuggingFaceTB/smollm-corpus',
|
| 59 |
+
'config': 'cosmopedia-v2',
|
| 60 |
+
'split': 'train',
|
| 61 |
+
'streaming': True,
|
| 62 |
+
'text_field': 'text',
|
| 63 |
+
'weight': 0.2,
|
| 64 |
+
'description': 'Synthetic textbooks and stories'
|
| 65 |
+
},
|
| 66 |
+
# 代码数据集
|
| 67 |
+
'codeparrot': {
|
| 68 |
+
'type': 'code',
|
| 69 |
+
'hf_path': 'bigcode/the-stack-smol',
|
| 70 |
+
'config': 'default',
|
| 71 |
+
'split': 'train',
|
| 72 |
+
'streaming': True,
|
| 73 |
+
'text_field': 'content',
|
| 74 |
+
'weight': 0.3,
|
| 75 |
+
'description': 'The Stack Smol - code'
|
| 76 |
+
},
|
| 77 |
+
'the_stack': {
|
| 78 |
+
'type': 'code',
|
| 79 |
+
'hf_path': 'bigcode/the-stack-dedup',
|
| 80 |
+
'split': 'train',
|
| 81 |
+
'streaming': True,
|
| 82 |
+
'text_field': 'content',
|
| 83 |
+
'weight': 0.2,
|
| 84 |
+
'description': 'The Stack - deduplicated code'
|
| 85 |
+
},
|
| 86 |
+
# 多模态数据集
|
| 87 |
+
'laion400m': {
|
| 88 |
+
'type': 'image_text',
|
| 89 |
+
'hf_path': 'laion/laion400m',
|
| 90 |
+
'split': 'train',
|
| 91 |
+
'streaming': True,
|
| 92 |
+
'image_field': 'url',
|
| 93 |
+
'text_field': 'caption',
|
| 94 |
+
'weight': 0.4,
|
| 95 |
+
'description': 'LAION-400M image-text pairs'
|
| 96 |
+
},
|
| 97 |
+
'conceptual_captions': {
|
| 98 |
+
'type': 'image_text',
|
| 99 |
+
'hf_path': 'google-research-datasets/conceptual_captions',
|
| 100 |
+
'split': 'train',
|
| 101 |
+
'streaming': False,
|
| 102 |
+
'image_field': 'image_url',
|
| 103 |
+
'text_field': 'caption',
|
| 104 |
+
'weight': 0.2,
|
| 105 |
+
'description': 'Conceptual Captions 3M'
|
| 106 |
+
},
|
| 107 |
+
}
|
| 108 |
+
POSTTRAIN_DATASETS = {
|
| 109 |
+
'r1_mix_dataset': {
|
| 110 |
+
'type': 'conversation',
|
| 111 |
+
'hf_path': 'json',
|
| 112 |
+
'data_files': '/root/dataset/r1_mix_1024.jsonl',
|
| 113 |
+
'split': 'train',
|
| 114 |
+
'streaming': False,
|
| 115 |
+
'weight': 1.0,
|
| 116 |
+
'description': 'DeepSeek R1 Distill Mix (User/Assistant with <think>)'
|
| 117 |
+
},
|
| 118 |
+
'minimind_sft': {
|
| 119 |
+
'type': 'conversation',
|
| 120 |
+
'hf_path': 'json',
|
| 121 |
+
'data_files': './dataset/sft_mini.jsonl',
|
| 122 |
+
'split': 'train',
|
| 123 |
+
'streaming': False,
|
| 124 |
+
'weight': 1.0,
|
| 125 |
+
'max_samples': 100,
|
| 126 |
+
'description': 'MiniMind Multi-turn SFT dataset'
|
| 127 |
+
},
|
| 128 |
+
'self_en': {
|
| 129 |
+
'type': 'conversation',
|
| 130 |
+
'hf_path': 'json',
|
| 131 |
+
'data_files': '/root/dataset/sft_en.jsonl',
|
| 132 |
+
'split': 'train',
|
| 133 |
+
'streaming': False,
|
| 134 |
+
'weight': 1.0,
|
| 135 |
+
'description': ' SFT_en dataset'
|
| 136 |
+
},
|
| 137 |
+
'flan_v2': {
|
| 138 |
+
'type': 'instruction',
|
| 139 |
+
'hf_path': 'Muennighoff/flan',
|
| 140 |
+
'split': 'train',
|
| 141 |
+
'streaming': True,
|
| 142 |
+
'instruction_field': 'inputs',
|
| 143 |
+
'response_field': 'targets',
|
| 144 |
+
'weight': 1.0,
|
| 145 |
+
'max_samples': 100000,
|
| 146 |
+
'description': 'FLAN v2 collection'
|
| 147 |
+
},
|
| 148 |
+
'alpaca': {
|
| 149 |
+
'type': 'instruction',
|
| 150 |
+
'hf_path': 'tatsu-lab/alpaca',
|
| 151 |
+
'split': 'train',
|
| 152 |
+
'streaming': False,
|
| 153 |
+
'instruction_field': 'instruction',
|
| 154 |
+
'input_field': 'input',
|
| 155 |
+
'response_field': 'output',
|
| 156 |
+
'weight': 0.5,
|
| 157 |
+
'description': 'Stanford Alpaca 52K'
|
| 158 |
+
},
|
| 159 |
+
'dolly': {
|
| 160 |
+
'type': 'instruction',
|
| 161 |
+
'hf_path': 'databricks/databricks-dolly-15k',
|
| 162 |
+
'split': 'train',
|
| 163 |
+
'streaming': False,
|
| 164 |
+
'instruction_field': 'instruction',
|
| 165 |
+
'context_field': 'context',
|
| 166 |
+
'response_field': 'response',
|
| 167 |
+
'weight': 0.3,
|
| 168 |
+
'description': 'Dolly 15K'
|
| 169 |
+
},
|
| 170 |
+
'oasst1': {
|
| 171 |
+
'type': 'conversation',
|
| 172 |
+
'hf_path': 'OpenAssistant/oasst1',
|
| 173 |
+
'split': 'train',
|
| 174 |
+
'streaming': False,
|
| 175 |
+
'weight': 0.4,
|
| 176 |
+
'description': 'OpenAssistant Conversations'
|
| 177 |
+
},
|
| 178 |
+
'sharegpt': {
|
| 179 |
+
'type': 'conversation',
|
| 180 |
+
'hf_path': 'anon8231489123/ShareGPT_Vicuna_unfiltered',
|
| 181 |
+
'split': 'train',
|
| 182 |
+
'streaming': False,
|
| 183 |
+
'weight': 0.3,
|
| 184 |
+
'max_samples': 50000,
|
| 185 |
+
'description': 'ShareGPT conversations'
|
| 186 |
+
},
|
| 187 |
+
'code_alpaca': {
|
| 188 |
+
'type': 'code_instruction',
|
| 189 |
+
'hf_path': 'sahil2801/CodeAlpaca-20k',
|
| 190 |
+
'split': 'train',
|
| 191 |
+
'streaming': False,
|
| 192 |
+
'instruction_field': 'instruction',
|
| 193 |
+
'response_field': 'output',
|
| 194 |
+
'weight': 0.3,
|
| 195 |
+
'description': 'Code Alpaca 20K'
|
| 196 |
+
},
|
| 197 |
+
'llava_instruct': {
|
| 198 |
+
'type': 'multimodal_instruction',
|
| 199 |
+
'hf_path': 'liuhaotian/LLaVA-Instruct-150K',
|
| 200 |
+
'split': 'train',
|
| 201 |
+
'streaming': False,
|
| 202 |
+
'image_field': 'image',
|
| 203 |
+
'instruction_field': 'conversations',
|
| 204 |
+
'weight': 0.5,
|
| 205 |
+
'description': 'LLaVA visual instruction tuning'
|
| 206 |
+
},
|
| 207 |
+
'hh_rlhf': {
|
| 208 |
+
'type': 'preference',
|
| 209 |
+
'hf_path': 'Anthropic/hh-rlhf',
|
| 210 |
+
'split': 'train',
|
| 211 |
+
'streaming': False,
|
| 212 |
+
'chosen_field': 'chosen',
|
| 213 |
+
'rejected_field': 'rejected',
|
| 214 |
+
'weight': 1.0,
|
| 215 |
+
'description': 'Anthropic HH-RLHF'
|
| 216 |
+
},
|
| 217 |
+
'ultrafeedback': {
|
| 218 |
+
'type': 'preference',
|
| 219 |
+
'hf_path': 'openbmb/UltraFeedback',
|
| 220 |
+
'split': 'train',
|
| 221 |
+
'streaming': True,
|
| 222 |
+
'chosen_field': 'chosen',
|
| 223 |
+
'rejected_field': 'rejected',
|
| 224 |
+
'weight': 0.5,
|
| 225 |
+
'max_samples': 50000,
|
| 226 |
+
'description': 'UltraFeedback preferences'
|
| 227 |
+
},
|
| 228 |
+
'debug_water': {
|
| 229 |
+
'type': 'instruction',
|
| 230 |
+
'hf_path': 'json',
|
| 231 |
+
'data_files': 'debug_water.json',
|
| 232 |
+
'split': 'train',
|
| 233 |
+
'streaming': False,
|
| 234 |
+
'instruction_field': 'instruction',
|
| 235 |
+
'response_field': 'output',
|
| 236 |
+
'weight': 1.0,
|
| 237 |
+
'description': 'Overfitting test for water'
|
| 238 |
+
},
|
| 239 |
+
'grpo_preferences_local': {
|
| 240 |
+
'type': 'preference',
|
| 241 |
+
'hf_path': 'json',
|
| 242 |
+
'data_files': '/root/dataset/grpo_preferences.jsonl',
|
| 243 |
+
'split': 'train',
|
| 244 |
+
'streaming': False,
|
| 245 |
+
'chosen_field': 'chosen',
|
| 246 |
+
'rejected_field': 'rejected',
|
| 247 |
+
'weight': 1.0,
|
| 248 |
+
'description': 'Local GRPO preference pairs'
|
| 249 |
+
},
|
| 250 |
+
'gsm8k_zh': {
|
| 251 |
+
'type': 'instruction',
|
| 252 |
+
'hf_path': 'json',
|
| 253 |
+
'data_files': '/root/dataset/gsm8k_zh_train.jsonl',
|
| 254 |
+
'split': 'train',
|
| 255 |
+
'streaming': False,
|
| 256 |
+
'instruction_field': 'question_zh',
|
| 257 |
+
'response_field': 'answer_zh',
|
| 258 |
+
'weight': 1.0,
|
| 259 |
+
'description': 'GSM8K Chinese math reasoning dataset'
|
| 260 |
+
},
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
GRPO_DATASETS = {
|
| 264 |
+
'grpo_prompts_hh': {
|
| 265 |
+
'type': 'prompt',
|
| 266 |
+
'hf_path': 'json',
|
| 267 |
+
'data_files': '/root/dataset/grpo_prompts_hh.jsonl',
|
| 268 |
+
'split': 'train',
|
| 269 |
+
'streaming': False,
|
| 270 |
+
'prompt_field': 'prompt',
|
| 271 |
+
'weight': 1.0,
|
| 272 |
+
'description': 'HH-RLHF prompts for GRPO generation'
|
| 273 |
+
},
|
| 274 |
+
'grpo_prompts_alpaca': {
|
| 275 |
+
'type': 'prompt',
|
| 276 |
+
'hf_path': 'json',
|
| 277 |
+
'data_files': '/root/dataset/grpo_prompts_alpaca.jsonl',
|
| 278 |
+
'split': 'train',
|
| 279 |
+
'streaming': False,
|
| 280 |
+
'prompt_field': 'prompt',
|
| 281 |
+
'weight': 0.5,
|
| 282 |
+
'description': 'Alpaca-style prompts for GRPO'
|
| 283 |
+
},
|
| 284 |
+
'grpo_prompts_simple': {
|
| 285 |
+
'type': 'prompt',
|
| 286 |
+
'hf_path': 'json',
|
| 287 |
+
'data_files': '/root/dataset/grpo_prompts_simple.jsonl',
|
| 288 |
+
'split': 'train',
|
| 289 |
+
'streaming': False,
|
| 290 |
+
'prompt_field': 'prompt',
|
| 291 |
+
'weight': 0.1,
|
| 292 |
+
'description': 'Simple test prompts'
|
| 293 |
+
},
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
GRPO_PROMPT_MIX = {
|
| 297 |
+
'default': {
|
| 298 |
+
'datasets': ['grpo_prompts_hh'],
|
| 299 |
+
'weights': [1.0],
|
| 300 |
+
'description': 'Default GRPO prompt mix'
|
| 301 |
+
},
|
| 302 |
+
'hh_only': {
|
| 303 |
+
'datasets': ['grpo_prompts_hh'],
|
| 304 |
+
'weights': [1.0],
|
| 305 |
+
'description': 'HH-RLHF prompts only'
|
| 306 |
+
},
|
| 307 |
+
'alpaca_only': {
|
| 308 |
+
'datasets': ['grpo_prompts_alpaca'],
|
| 309 |
+
'weights': [1.0],
|
| 310 |
+
'description': 'Alpaca prompts only'
|
| 311 |
+
},
|
| 312 |
+
'test': {
|
| 313 |
+
'datasets': ['grpo_prompts_simple'],
|
| 314 |
+
'weights': [1.0],
|
| 315 |
+
'description': 'Simple test prompts'
|
| 316 |
+
},
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
TEST_DATASETS = {
|
| 320 |
+
'tiny_shakespeare': {
|
| 321 |
+
'type': 'text',
|
| 322 |
+
'hf_path': 'tiny_shakespeare',
|
| 323 |
+
'split': 'train',
|
| 324 |
+
'streaming': False,
|
| 325 |
+
'text_field': 'text',
|
| 326 |
+
'weight': 1.0,
|
| 327 |
+
'description': 'Tiny Shakespeare for testing'
|
| 328 |
+
},
|
| 329 |
+
'gsm8k': {
|
| 330 |
+
'type': 'instruction',
|
| 331 |
+
'hf_path': 'gsm8k',
|
| 332 |
+
'config': 'main',
|
| 333 |
+
'split': 'train',
|
| 334 |
+
'streaming': False,
|
| 335 |
+
'instruction_field': 'question',
|
| 336 |
+
'response_field': 'answer',
|
| 337 |
+
'weight': 1.0,
|
| 338 |
+
'description': 'GSM8K math problems'
|
| 339 |
+
},
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
PRETRAIN_MIX = {
|
| 343 |
+
'default': {
|
| 344 |
+
'datasets': ['c4', 'wikipedia', 'bookcorpus', 'codeparrot'],
|
| 345 |
+
'weights': [0.5, 0.2, 0.2, 0.1],
|
| 346 |
+
'description': 'Default pretrain mix'
|
| 347 |
+
},
|
| 348 |
+
'code_heavy': {
|
| 349 |
+
'datasets': ['c4', 'codeparrot', 'the_stack', 'wikipedia'],
|
| 350 |
+
'weights': [0.3, 0.4, 0.2, 0.1],
|
| 351 |
+
'description': 'Code-heavy mix'
|
| 352 |
+
},
|
| 353 |
+
'multimodal': {
|
| 354 |
+
'datasets': ['c4', 'wikipedia', 'laion400m', 'conceptual_captions'],
|
| 355 |
+
'weights': [0.4, 0.2, 0.3, 0.1],
|
| 356 |
+
'description': 'Multimodal mix'
|
| 357 |
+
},
|
| 358 |
+
'text_only': {
|
| 359 |
+
'datasets': ['c4', 'wikipedia', 'bookcorpus'],
|
| 360 |
+
'weights': [0.5, 0.3, 0.2],
|
| 361 |
+
'description': 'Text-only mix for testing'
|
| 362 |
+
},
|
| 363 |
+
'custom_hq': {
|
| 364 |
+
'datasets': ['pretrain_hq'],
|
| 365 |
+
'weights': [1.0],
|
| 366 |
+
'description': 'Custom mix using local pretrain_hq.jsonl'
|
| 367 |
+
},
|
| 368 |
+
'skypile_training': {
|
| 369 |
+
'datasets': ['skypile_local'],
|
| 370 |
+
'weights': [1.0],
|
| 371 |
+
'description': 'Pure pre-training on SkyPile data'
|
| 372 |
+
},
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
POSTTRAIN_MIX = {
|
| 376 |
+
'default': {
|
| 377 |
+
'datasets': ['flan_v2', 'alpaca', 'dolly', 'oasst1'],
|
| 378 |
+
'weights': [0.4, 0.3, 0.2, 0.1],
|
| 379 |
+
'description': 'Default instruction tuning mix'
|
| 380 |
+
},
|
| 381 |
+
'conversation': {
|
| 382 |
+
'datasets': ['oasst1', 'sharegpt', 'alpaca'],
|
| 383 |
+
'weights': [0.4, 0.4, 0.2],
|
| 384 |
+
'description': 'Conversation-focused mix'
|
| 385 |
+
},
|
| 386 |
+
'code_instruct': {
|
| 387 |
+
'datasets': ['code_alpaca', 'alpaca', 'flan_v2'],
|
| 388 |
+
'weights': [0.5, 0.3, 0.2],
|
| 389 |
+
'description': 'Code instruction mix'
|
| 390 |
+
},
|
| 391 |
+
'simple_instruct': {
|
| 392 |
+
'datasets': ['alpaca', 'dolly'],
|
| 393 |
+
'weights': [0.6, 0.4],
|
| 394 |
+
'description': 'Simple instruction mix for testing'
|
| 395 |
+
},
|
| 396 |
+
'minimind_mix': {
|
| 397 |
+
'datasets': ['minimind_sft', 'self_en'],
|
| 398 |
+
'weights': [0.01, 0.99],
|
| 399 |
+
'description': 'Fine-tuning on MiniMind dataset'
|
| 400 |
+
},
|
| 401 |
+
'r1_mix_strategy': {
|
| 402 |
+
'datasets': ['r1_mix_dataset'],
|
| 403 |
+
'weights': [1.0],
|
| 404 |
+
'description': 'Fine-tuning on R1 Distill dataset'
|
| 405 |
+
},
|
| 406 |
+
'gsm8k_zh_mix': {
|
| 407 |
+
'datasets': ['gsm8k_zh'],
|
| 408 |
+
'weights': [1.0],
|
| 409 |
+
'description': 'Fine-tuning on GSM8K Chinese math reasoning dataset'
|
| 410 |
+
},
|
| 411 |
+
'think_math_mix': {
|
| 412 |
+
'datasets': ['r1_mix_dataset', 'gsm8k_zh'],
|
| 413 |
+
'weights': [0.7, 0.3],
|
| 414 |
+
'description': 'Mix of R1 Distill and GSM8K Chinese for math reasoning'
|
| 415 |
+
},
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
DATASET_CACHE_DIR = "./dataset_cache"
|
| 419 |
+
HF_CACHE_DIR = "./hf_cache"
|
| 420 |
+
MAX_RETRIES = 3
|
| 421 |
+
DOWNLOAD_TIMEOUT = 300
|
| 422 |
+
|
| 423 |
+
PREPROCESSING_CONFIG = {
|
| 424 |
+
'max_seq_length': 2048,
|
| 425 |
+
'min_seq_length': 32,
|
| 426 |
+
'num_workers': 4,
|
| 427 |
+
'batch_size': 8,
|
| 428 |
+
'shuffle_buffer_size': 10000,
|
| 429 |
+
'seed': 42,
|
| 430 |
}
|