Jack04810 commited on
Commit
09b1706
·
verified ·
1 Parent(s): 16b57a3

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. data/README_zh.md +478 -0
  2. data/alpaca_zh_demo.json +0 -0
  3. data/c4_demo.jsonl +0 -0
  4. data/dataset_info.json +839 -0
  5. data/identity.json +457 -0
  6. data/mllm_audio_demo.json +47 -0
  7. data/mllm_video_audio_demo.json +56 -0
  8. data/mllm_video_demo.json +47 -0
  9. data/output.jsonl +0 -0
  10. data/v1_dpo_demo.jsonl +10 -0
  11. data/v1_dpo_demo.yaml +4 -0
  12. data/v1_sft_demo.yaml +9 -0
  13. examples/accelerate/fsdp2_config.yaml +22 -0
  14. examples/accelerate/fsdp_config.yaml +25 -0
  15. examples/accelerate/fsdp_config_multiple_nodes.yaml +34 -0
  16. examples/accelerate/fsdp_config_offload.yaml +25 -0
  17. examples/ascend/qwen3_full_sft_fsdp2.yaml +45 -0
  18. examples/ascend/qwen3moe_full_sft_fsdp.yaml +46 -0
  19. examples/ascend/qwen3vlmoe_full_sft_fsdp2.yaml +48 -0
  20. examples/ascend/qwen3vlmoe_lora_sft_fsdp.yaml +42 -0
  21. examples/deepspeed/ds_z0_config.json +28 -0
  22. examples/deepspeed/ds_z2_autotp_config.json +32 -0
  23. examples/deepspeed/ds_z2_config.json +28 -0
  24. examples/deepspeed/ds_z2_offload_config.json +32 -0
  25. examples/deepspeed/ds_z3_config.json +30 -0
  26. examples/deepspeed/ds_z3_fp8_config.json +45 -0
  27. examples/deepspeed/ds_z3_offload_config.json +38 -0
  28. examples/extras/adam_mini/qwen2_full_sft.yaml +43 -0
  29. examples/extras/apollo/llama3_full_sft.yaml +48 -0
  30. examples/extras/asft/llama2_full_asft.yaml +45 -0
  31. examples/extras/asft/qwen2_full_asft.yaml +45 -0
  32. examples/extras/badam/llama3_full_sft.yaml +46 -0
  33. examples/extras/dft/qwen2_full_sft.yaml +43 -0
  34. examples/extras/eaft/qwen25_05b_eaft_full.yaml +38 -0
  35. examples/extras/fp8/llama3_fp8_deepspeed_sft.yaml +48 -0
  36. examples/extras/fp8/llama3_fp8_fsdp_sft.yaml +51 -0
  37. examples/extras/fsdp_qlora/llama3_lora_sft.yaml +45 -0
  38. examples/extras/fsdp_qlora/train.sh +6 -0
  39. examples/extras/galore/llama3_full_sft.yaml +47 -0
  40. examples/extras/llama_pro/expand.sh +6 -0
  41. examples/extras/llama_pro/llama3_freeze_sft.yaml +45 -0
  42. examples/extras/loraplus/llama3_lora_sft.yaml +45 -0
  43. examples/extras/mod/llama3_full_sft.yaml +44 -0
  44. examples/extras/multi_tokens/tokens_cfg.yaml +25 -0
  45. examples/extras/muon/qwen2_full_sft.yaml +43 -0
  46. examples/extras/nlg_eval/llama3_lora_predict.yaml +31 -0
  47. examples/extras/oft/llama3_oft_sft.yaml +46 -0
  48. examples/extras/oft/qwen2_5vl_oft_sft.yaml +47 -0
  49. examples/extras/pissa/init.sh +5 -0
  50. examples/extras/pissa/llama3_lora_sft.yaml +47 -0
data/README_zh.md ADDED
@@ -0,0 +1,478 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [dataset_info.json](dataset_info.json) 包含了所有可用的数据集。如果您希望使用自定义数据集,请**务必**在 `dataset_info.json` 文件中添加*数据集描述*,并通过修改 `dataset: 数据集名称` 配置来使用数据集。
2
+
3
+ 其中 `dataset_info.json` 文件应放置在 `dataset_dir` 目录下。您可以通过修改 `dataset_dir` 参数来使用其他目录。默认值为 `./data`。
4
+
5
+ 目前我们支持 **alpaca** 格式和 **sharegpt** 格式的数据集。允许的文件类型包括 json、jsonl、csv、parquet 和 arrow。
6
+
7
+ ```json
8
+ "数据集名称": {
9
+ "hf_hub_url": "Hugging Face 的数据集仓库地址(若指定,则忽略 script_url 和 file_name)",
10
+ "ms_hub_url": "ModelScope 的数据集仓库地址(若指定,则忽略 script_url 和 file_name)",
11
+ "script_url": "包含数据加载脚本的本地文件夹名称(若指定,则忽略 file_name)",
12
+ "file_name": "该目录下数据集文件夹或文件的名称(若上述参数未指定,则此项必需)",
13
+ "formatting": "数据集格式(可选,默认:alpaca,可以为 alpaca 或 sharegpt)",
14
+ "ranking": "是否为偏好数据集(可选,默认:False)",
15
+ "subset": "数据集子集的名称(可选,默认:None)",
16
+ "split": "所使用的数据集切分(可选,默认:train)",
17
+ "folder": "Hugging Face 仓库的文件夹名称(可选,默认:None)",
18
+ "num_samples": "该数据集所使用的样本数量。(可选,默认:None)",
19
+ "columns(可选)": {
20
+ "prompt": "数据集代表提示词的表头名称(默认:instruction)",
21
+ "query": "数据集代表请求的表头名称(默认:input)",
22
+ "response": "数据集代表回答的表头名称(默认:output)",
23
+ "history": "数据集代表历史对话的表头名称(默认:None)",
24
+ "messages": "数据集代表消息列表的表头名称(默认:conversations)",
25
+ "system": "数据集代表系统提示的表头名称(默认:None)",
26
+ "tools": "数据集代表工具描述的表头名称(默认:None)",
27
+ "images": "数据集代表图像输入的表头名称(默认:None)",
28
+ "videos": "数据集代表视频输入的表头名称(默认:None)",
29
+ "audios": "数据集代表音频输入的表头名称(默认:None)",
30
+ "chosen": "数据集代表更优回答的表头名称(默认:None)",
31
+ "rejected": "数据集代表更差回答的表头名称(默认:None)",
32
+ "kto_tag": "数据集代表 KTO 标签的表头名称(默认:None)"
33
+ },
34
+ "tags(可选,用于 sharegpt 格式)": {
35
+ "role_tag": "消息中代表发送者身份的键名(默认:from)",
36
+ "content_tag": "消息中代表文本内容的键名(默认:value)",
37
+ "user_tag": "消息中代表用户的 role_tag(默认:human)",
38
+ "assistant_tag": "消息中代表助手的 role_tag(默认:gpt)",
39
+ "observation_tag": "消息中代表工具返回结果的 role_tag(默认:observation)",
40
+ "function_tag": "消息中代表工具调用的 role_tag(默认:function_call)",
41
+ "system_tag": "消息中代表系统提示的 role_tag(默认:system,会覆盖 system column)"
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## Alpaca 格式
47
+
48
+ ### 指令监督微调数据集
49
+
50
+ - [样例数据集](alpaca_zh_demo.json)
51
+
52
+ 在指令监督微调时,`instruction` 列对应的内容会与 `input` 列对应的内容拼接后作为提示词,即提示词为 `instruction\ninput`。而 `output` 列对应的内容为模型回答。
53
+
54
+ 对于推理类模型的微调,如果数据集包含思维链,则需要把思维链放在模型回答中,例如 `<think>cot</think>output`。
55
+
56
+ 如果指定,`system` 列对应的内容将被作为系统提示词。
57
+
58
+ `history` 列是由多个字符串二元组构成的列表,分别代表历史消息中每轮对话的指令和回答。注意在指令监督微调时,历史消息中的回答内容**也会被用于模型学习**。
59
+
60
+ ```json
61
+ [
62
+ {
63
+ "instruction": "用户指令(必填)",
64
+ "input": "用户输入(选填)",
65
+ "output": "模型回答(必填)",
66
+ "system": "系统提示词(选填)",
67
+ "history": [
68
+ ["第一轮指令(选填)", "第一轮回答(选填)"],
69
+ ["第二轮指令(选填)", "第二轮回答(选填)"]
70
+ ]
71
+ }
72
+ ]
73
+ ```
74
+
75
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
76
+
77
+ ```json
78
+ "数据集名称": {
79
+ "file_name": "data.json",
80
+ "columns": {
81
+ "prompt": "instruction",
82
+ "query": "input",
83
+ "response": "output",
84
+ "system": "system",
85
+ "history": "history"
86
+ }
87
+ }
88
+ ```
89
+
90
+ > [!TIP]
91
+ > 如果模型本身具备推理能力(如 Qwen3)而数据集不包含思维链,LLaMA-Factory 会自动为数据添加空思维链。当 `enable_thinking` 为 `True` 时(慢思考,默认),空思维链会添加到模型回答中并且计算损失,否则会添加到用户指令中并且不计算损失(快思考)。请在训练和推理时保�� `enable_thinking` 参数一致。
92
+ >
93
+ > 如果您希望训练包含思维链的数据时使用慢思考,训练不包含思维链的数据时使用快思考,可以设置 `enable_thinking` 为 `None`。但该功能较为复杂,请谨慎使用。
94
+
95
+ ### 预训练数据集
96
+
97
+ - [样例数据集](c4_demo.jsonl)
98
+
99
+ 在预训练时,只有 `text` 列中的内容会用于模型学习。
100
+
101
+ ```json
102
+ [
103
+ {"text": "document"},
104
+ {"text": "document"}
105
+ ]
106
+ ```
107
+
108
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
109
+
110
+ ```json
111
+ "数据集名称": {
112
+ "file_name": "data.json",
113
+ "columns": {
114
+ "prompt": "text"
115
+ }
116
+ }
117
+ ```
118
+
119
+ ### 偏好数据集
120
+
121
+ 偏好数据集用于奖励模型训练、DPO 训练、ORPO 训练和 SimPO 训练。
122
+
123
+ 它需要在 `chosen` 列中提供更优的回答,并在 `rejected` 列中提供更差的回答。
124
+
125
+ ```json
126
+ [
127
+ {
128
+ "instruction": "用户指令(必填)",
129
+ "input": "用户输入(选填)",
130
+ "chosen": "优质回答(必填)",
131
+ "rejected": "劣质回答(必填)"
132
+ }
133
+ ]
134
+ ```
135
+
136
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
137
+
138
+ ```json
139
+ "数据集名称": {
140
+ "file_name": "data.json",
141
+ "ranking": true,
142
+ "columns": {
143
+ "prompt": "instruction",
144
+ "query": "input",
145
+ "chosen": "chosen",
146
+ "rejected": "rejected"
147
+ }
148
+ }
149
+ ```
150
+
151
+ ### KTO 数据集
152
+
153
+ KTO 数据集需要提供额外的 `kto_tag` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
154
+
155
+ ### 多模态图像数据集
156
+
157
+ 多模态图像数据集需要提供额外的 `images` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
158
+
159
+ ### 多模态视频数据集
160
+
161
+ 多模态视频数据集需要提供额外的 `videos` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
162
+
163
+ ### 多模态音频数据集
164
+
165
+ 多模态音频数据集需要提供额外的 `audios` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
166
+
167
+ ## Sharegpt 格式
168
+
169
+ ### 指令监督微调数据集
170
+
171
+ - [样例数据集](glaive_toolcall_zh_demo.json)
172
+
173
+ 相比 alpaca 格式的数据集,sharegpt 格式支持**更多的角色种类**,例如 human、gpt、observation、function 等等。它们构成一个对象列表呈现在 `conversations` 列中。
174
+
175
+ 注意其中 human 和 observation 必须出现在奇数位置,gpt 和 function 必须出现在偶数位置。默认所有的 gpt 和 function 会被用于学习。
176
+
177
+ ```json
178
+ [
179
+ {
180
+ "conversations": [
181
+ {
182
+ "from": "human",
183
+ "value": "用户指令"
184
+ },
185
+ {
186
+ "from": "function_call",
187
+ "value": "工具参数"
188
+ },
189
+ {
190
+ "from": "observation",
191
+ "value": "工具结果"
192
+ },
193
+ {
194
+ "from": "gpt",
195
+ "value": "模型回答"
196
+ }
197
+ ],
198
+ "system": "系统提示词(选填)",
199
+ "tools": "工具描述(选填)"
200
+ }
201
+ ]
202
+ ```
203
+
204
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
205
+
206
+ ```json
207
+ "数据集名称": {
208
+ "file_name": "data.json",
209
+ "formatting": "sharegpt",
210
+ "columns": {
211
+ "messages": "conversations",
212
+ "system": "system",
213
+ "tools": "tools"
214
+ }
215
+ }
216
+ ```
217
+
218
+ ### 预训练数据集
219
+
220
+ 尚不支持,请使用 [alpaca](#alpaca-格式) 格式。
221
+
222
+ ### 偏好数据集
223
+
224
+ - [样例数据集](dpo_zh_demo.json)
225
+
226
+ Sharegpt 格式的偏好数据集同样需要在 `chosen` 列中提供更优的消息,并在 `rejected` 列中提供更差的消息。
227
+
228
+ ```json
229
+ [
230
+ {
231
+ "conversations": [
232
+ {
233
+ "from": "human",
234
+ "value": "用户指令"
235
+ },
236
+ {
237
+ "from": "gpt",
238
+ "value": "模型回答"
239
+ },
240
+ {
241
+ "from": "human",
242
+ "value": "用户指令"
243
+ }
244
+ ],
245
+ "chosen": {
246
+ "from": "gpt",
247
+ "value": "优质回答"
248
+ },
249
+ "rejected": {
250
+ "from": "gpt",
251
+ "value": "劣质回答"
252
+ }
253
+ }
254
+ ]
255
+ ```
256
+
257
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
258
+
259
+ ```json
260
+ "数据集名称": {
261
+ "file_name": "data.json",
262
+ "formatting": "sharegpt",
263
+ "ranking": true,
264
+ "columns": {
265
+ "messages": "conversations",
266
+ "chosen": "chosen",
267
+ "rejected": "rejected"
268
+ }
269
+ }
270
+ ```
271
+
272
+ ### KTO 数据集
273
+
274
+ - [样例数据集](kto_en_demo.json)
275
+
276
+ KTO 数据集需要额外添加一个 `kto_tag` 列,包含 bool 类型的人类反馈。
277
+
278
+ ```json
279
+ [
280
+ {
281
+ "conversations": [
282
+ {
283
+ "from": "human",
284
+ "value": "用户指令"
285
+ },
286
+ {
287
+ "from": "gpt",
288
+ "value": "模型回答"
289
+ }
290
+ ],
291
+ "kto_tag": "人类反馈 [true/false](必填)"
292
+ }
293
+ ]
294
+ ```
295
+
296
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
297
+
298
+ ```json
299
+ "数据集名称": {
300
+ "file_name": "data.json",
301
+ "formatting": "sharegpt",
302
+ "columns": {
303
+ "messages": "conversations",
304
+ "kto_tag": "kto_tag"
305
+ }
306
+ }
307
+ ```
308
+
309
+ ### 多模态图像数据集
310
+
311
+ - [样例数据集](mllm_demo.json)
312
+
313
+ 多模态图像数据集需要额外添加一个 `images` 列,包含输入图像的路径。
314
+
315
+ 注���图片的数量必须与文本中所有 `<image>` 标记的数量严格一致。
316
+
317
+ ```json
318
+ [
319
+ {
320
+ "conversations": [
321
+ {
322
+ "from": "human",
323
+ "value": "<image><image>用户指令"
324
+ },
325
+ {
326
+ "from": "gpt",
327
+ "value": "模型回答"
328
+ }
329
+ ],
330
+ "images": [
331
+ "图像路径(必填)",
332
+ "图像路径(必填)"
333
+ ]
334
+ }
335
+ ]
336
+ ```
337
+
338
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
339
+
340
+ ```json
341
+ "数据集名称": {
342
+ "file_name": "data.json",
343
+ "formatting": "sharegpt",
344
+ "columns": {
345
+ "messages": "conversations",
346
+ "images": "images"
347
+ }
348
+ }
349
+ ```
350
+
351
+ ### 多模态视频数据集
352
+
353
+ - [样例数据集](mllm_video_demo.json)
354
+
355
+ 多模态视频数据集需要额外添加一个 `videos` 列,包含输入视频的路径。
356
+
357
+ 注意视频的数量必须与文本中所有 `<video>` 标记的数量严格一致。
358
+
359
+ ```json
360
+ [
361
+ {
362
+ "conversations": [
363
+ {
364
+ "from": "human",
365
+ "value": "<video><video>用户指令"
366
+ },
367
+ {
368
+ "from": "gpt",
369
+ "value": "模型回答"
370
+ }
371
+ ],
372
+ "videos": [
373
+ "视频路径(必填)",
374
+ "视频路径(必填)"
375
+ ]
376
+ }
377
+ ]
378
+ ```
379
+
380
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
381
+
382
+ ```json
383
+ "数据集名称": {
384
+ "file_name": "data.json",
385
+ "formatting": "sharegpt",
386
+ "columns": {
387
+ "messages": "conversations",
388
+ "videos": "videos"
389
+ }
390
+ }
391
+ ```
392
+
393
+ ### 多模态音频数据集
394
+
395
+ - [样例数据集](mllm_audio_demo.json)
396
+
397
+ 多模态音频数据集需要额外添加一个 `audios` 列,包含输入音频的路径。
398
+
399
+ 注意音频的数量必须与文本中所有 `<audio>` 标记的数量严格一致。
400
+
401
+ ```json
402
+ [
403
+ {
404
+ "conversations": [
405
+ {
406
+ "from": "human",
407
+ "value": "<audio><audio>用户指令"
408
+ },
409
+ {
410
+ "from": "gpt",
411
+ "value": "模型回答"
412
+ }
413
+ ],
414
+ "audios": [
415
+ "音频路径(必填)",
416
+ "音频路径(必填)"
417
+ ]
418
+ }
419
+ ]
420
+ ```
421
+
422
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
423
+
424
+ ```json
425
+ "数据集名称": {
426
+ "file_name": "data.json",
427
+ "formatting": "sharegpt",
428
+ "columns": {
429
+ "messages": "conversations",
430
+ "audios": "audios"
431
+ }
432
+ }
433
+ ```
434
+
435
+
436
+ ### OpenAI 格式
437
+
438
+ OpenAI 格式仅仅是 sharegpt 格式的一种特殊情况,其中第一条消息可能是系统提示词。
439
+
440
+ ```json
441
+ [
442
+ {
443
+ "messages": [
444
+ {
445
+ "role": "system",
446
+ "content": "系统提示词(选填)"
447
+ },
448
+ {
449
+ "role": "user",
450
+ "content": "用户指令"
451
+ },
452
+ {
453
+ "role": "assistant",
454
+ "content": "模型回答"
455
+ }
456
+ ]
457
+ }
458
+ ]
459
+ ```
460
+
461
+ 对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
462
+
463
+ ```json
464
+ "数据集名称": {
465
+ "file_name": "data.json",
466
+ "formatting": "sharegpt",
467
+ "columns": {
468
+ "messages": "messages"
469
+ },
470
+ "tags": {
471
+ "role_tag": "role",
472
+ "content_tag": "content",
473
+ "user_tag": "user",
474
+ "assistant_tag": "assistant",
475
+ "system_tag": "system"
476
+ }
477
+ }
478
+ ```
data/alpaca_zh_demo.json ADDED
The diff for this file is too large to render. See raw diff
 
data/c4_demo.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/dataset_info.json ADDED
@@ -0,0 +1,839 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "identity": {
3
+ "file_name": "identity.json"
4
+ },
5
+ "alpaca_en_demo": {
6
+ "file_name": "alpaca_en_demo.json"
7
+ },
8
+ "alpaca_zh_demo": {
9
+ "file_name": "alpaca_zh_demo.json"
10
+ },
11
+ "glaive_toolcall_en_demo": {
12
+ "file_name": "glaive_toolcall_en_demo.json",
13
+ "formatting": "sharegpt",
14
+ "columns": {
15
+ "messages": "conversations",
16
+ "tools": "tools"
17
+ }
18
+ },
19
+ "glaive_toolcall_zh_demo": {
20
+ "file_name": "glaive_toolcall_zh_demo.json",
21
+ "formatting": "sharegpt",
22
+ "columns": {
23
+ "messages": "conversations",
24
+ "tools": "tools"
25
+ }
26
+ },
27
+ "mllm_demo": {
28
+ "file_name": "mllm_demo.json",
29
+ "formatting": "sharegpt",
30
+ "columns": {
31
+ "messages": "messages",
32
+ "images": "images"
33
+ },
34
+ "tags": {
35
+ "role_tag": "role",
36
+ "content_tag": "content",
37
+ "user_tag": "user",
38
+ "assistant_tag": "assistant"
39
+ }
40
+ },
41
+ "mllm_audio_demo": {
42
+ "file_name": "mllm_audio_demo.json",
43
+ "formatting": "sharegpt",
44
+ "columns": {
45
+ "messages": "messages",
46
+ "audios": "audios"
47
+ },
48
+ "tags": {
49
+ "role_tag": "role",
50
+ "content_tag": "content",
51
+ "user_tag": "user",
52
+ "assistant_tag": "assistant"
53
+ }
54
+ },
55
+ "mllm_video_demo": {
56
+ "file_name": "mllm_video_demo.json",
57
+ "formatting": "sharegpt",
58
+ "columns": {
59
+ "messages": "messages",
60
+ "videos": "videos"
61
+ },
62
+ "tags": {
63
+ "role_tag": "role",
64
+ "content_tag": "content",
65
+ "user_tag": "user",
66
+ "assistant_tag": "assistant"
67
+ }
68
+ },
69
+ "mllm_video_audio_demo": {
70
+ "file_name": "mllm_video_audio_demo.json",
71
+ "formatting": "sharegpt",
72
+ "columns": {
73
+ "messages": "messages",
74
+ "videos": "videos",
75
+ "audios": "audios"
76
+ },
77
+ "tags": {
78
+ "role_tag": "role",
79
+ "content_tag": "content",
80
+ "user_tag": "user",
81
+ "assistant_tag": "assistant"
82
+ }
83
+ },
84
+ "alpaca_en": {
85
+ "hf_hub_url": "llamafactory/alpaca_en",
86
+ "ms_hub_url": "llamafactory/alpaca_en",
87
+ "om_hub_url": "HaM/alpaca_en"
88
+ },
89
+ "alpaca_zh": {
90
+ "hf_hub_url": "llamafactory/alpaca_zh",
91
+ "ms_hub_url": "llamafactory/alpaca_zh"
92
+ },
93
+ "alpaca_gpt4_en": {
94
+ "hf_hub_url": "llamafactory/alpaca_gpt4_en",
95
+ "ms_hub_url": "llamafactory/alpaca_gpt4_en"
96
+ },
97
+ "alpaca_gpt4_zh": {
98
+ "hf_hub_url": "llamafactory/alpaca_gpt4_zh",
99
+ "ms_hub_url": "llamafactory/alpaca_gpt4_zh",
100
+ "om_hub_url": "State_Cloud/alpaca-gpt4-data-zh"
101
+ },
102
+ "glaive_toolcall_en": {
103
+ "hf_hub_url": "llamafactory/glaive_toolcall_en",
104
+ "formatting": "sharegpt",
105
+ "columns": {
106
+ "messages": "conversations",
107
+ "tools": "tools"
108
+ }
109
+ },
110
+ "glaive_toolcall_zh": {
111
+ "hf_hub_url": "llamafactory/glaive_toolcall_zh",
112
+ "formatting": "sharegpt",
113
+ "columns": {
114
+ "messages": "conversations",
115
+ "tools": "tools"
116
+ }
117
+ },
118
+ "lima": {
119
+ "hf_hub_url": "llamafactory/lima",
120
+ "formatting": "sharegpt"
121
+ },
122
+ "guanaco": {
123
+ "hf_hub_url": "JosephusCheung/GuanacoDataset",
124
+ "ms_hub_url": "AI-ModelScope/GuanacoDataset"
125
+ },
126
+ "belle_2m": {
127
+ "hf_hub_url": "BelleGroup/train_2M_CN",
128
+ "ms_hub_url": "AI-ModelScope/train_2M_CN"
129
+ },
130
+ "belle_1m": {
131
+ "hf_hub_url": "BelleGroup/train_1M_CN",
132
+ "ms_hub_url": "AI-ModelScope/train_1M_CN"
133
+ },
134
+ "belle_0.5m": {
135
+ "hf_hub_url": "BelleGroup/train_0.5M_CN",
136
+ "ms_hub_url": "AI-ModelScope/train_0.5M_CN"
137
+ },
138
+ "belle_dialog": {
139
+ "hf_hub_url": "BelleGroup/generated_chat_0.4M",
140
+ "ms_hub_url": "AI-ModelScope/generated_chat_0.4M"
141
+ },
142
+ "belle_math": {
143
+ "hf_hub_url": "BelleGroup/school_math_0.25M",
144
+ "ms_hub_url": "AI-ModelScope/school_math_0.25M"
145
+ },
146
+ "open_platypus": {
147
+ "hf_hub_url": "garage-bAInd/Open-Platypus",
148
+ "ms_hub_url": "AI-ModelScope/Open-Platypus"
149
+ },
150
+ "codealpaca": {
151
+ "hf_hub_url": "sahil2801/CodeAlpaca-20k",
152
+ "ms_hub_url": "AI-ModelScope/CodeAlpaca-20k"
153
+ },
154
+ "alpaca_cot": {
155
+ "hf_hub_url": "QingyiSi/Alpaca-CoT",
156
+ "ms_hub_url": "AI-ModelScope/Alpaca-CoT"
157
+ },
158
+ "openorca": {
159
+ "hf_hub_url": "Open-Orca/OpenOrca",
160
+ "ms_hub_url": "AI-ModelScope/OpenOrca",
161
+ "columns": {
162
+ "prompt": "question",
163
+ "response": "response",
164
+ "system": "system_prompt"
165
+ }
166
+ },
167
+ "slimorca": {
168
+ "hf_hub_url": "Open-Orca/SlimOrca",
169
+ "formatting": "sharegpt"
170
+ },
171
+ "mathinstruct": {
172
+ "hf_hub_url": "TIGER-Lab/MathInstruct",
173
+ "ms_hub_url": "AI-ModelScope/MathInstruct",
174
+ "columns": {
175
+ "prompt": "instruction",
176
+ "response": "output"
177
+ }
178
+ },
179
+ "firefly": {
180
+ "hf_hub_url": "YeungNLP/firefly-train-1.1M",
181
+ "columns": {
182
+ "prompt": "input",
183
+ "response": "target"
184
+ }
185
+ },
186
+ "wikiqa": {
187
+ "hf_hub_url": "wiki_qa",
188
+ "columns": {
189
+ "prompt": "question",
190
+ "response": "answer"
191
+ }
192
+ },
193
+ "webqa": {
194
+ "hf_hub_url": "suolyer/webqa",
195
+ "ms_hub_url": "AI-ModelScope/webqa",
196
+ "columns": {
197
+ "prompt": "input",
198
+ "response": "output"
199
+ }
200
+ },
201
+ "webnovel": {
202
+ "hf_hub_url": "zxbsmk/webnovel_cn",
203
+ "ms_hub_url": "AI-ModelScope/webnovel_cn"
204
+ },
205
+ "nectar_sft": {
206
+ "hf_hub_url": "AstraMindAI/SFT-Nectar",
207
+ "ms_hub_url": "AI-ModelScope/SFT-Nectar"
208
+ },
209
+ "deepctrl": {
210
+ "ms_hub_url": "deepctrl/deepctrl-sft-data"
211
+ },
212
+ "adgen_train": {
213
+ "hf_hub_url": "HasturOfficial/adgen",
214
+ "ms_hub_url": "AI-ModelScope/adgen",
215
+ "split": "train",
216
+ "columns": {
217
+ "prompt": "content",
218
+ "response": "summary"
219
+ }
220
+ },
221
+ "adgen_eval": {
222
+ "hf_hub_url": "HasturOfficial/adgen",
223
+ "ms_hub_url": "AI-ModelScope/adgen",
224
+ "split": "validation",
225
+ "columns": {
226
+ "prompt": "content",
227
+ "response": "summary"
228
+ }
229
+ },
230
+ "sharegpt_hyper": {
231
+ "hf_hub_url": "totally-not-an-llm/sharegpt-hyperfiltered-3k",
232
+ "formatting": "sharegpt"
233
+ },
234
+ "sharegpt4": {
235
+ "hf_hub_url": "shibing624/sharegpt_gpt4",
236
+ "ms_hub_url": "AI-ModelScope/sharegpt_gpt4",
237
+ "formatting": "sharegpt"
238
+ },
239
+ "sgsc_b2b_entities": {
240
+ "hf_hub_url": "Nooxus-AI/NOO-Verified-Global-Entities",
241
+ "formatting": "sharegpt",
242
+ "columns": {
243
+ "messages": "messages"
244
+ }
245
+ },
246
+ "ultrachat_200k": {
247
+ "hf_hub_url": "HuggingFaceH4/ultrachat_200k",
248
+ "ms_hub_url": "AI-ModelScope/ultrachat_200k",
249
+ "split": "train_sft",
250
+ "formatting": "sharegpt",
251
+ "columns": {
252
+ "messages": "messages"
253
+ },
254
+ "tags": {
255
+ "role_tag": "role",
256
+ "content_tag": "content",
257
+ "user_tag": "user",
258
+ "assistant_tag": "assistant"
259
+ }
260
+ },
261
+ "infinity_instruct": {
262
+ "hf_hub_url": "BAAI/Infinity-Instruct",
263
+ "formatting": "sharegpt"
264
+ },
265
+ "agent_instruct": {
266
+ "hf_hub_url": "THUDM/AgentInstruct",
267
+ "ms_hub_url": "ZhipuAI/AgentInstruct",
268
+ "formatting": "sharegpt"
269
+ },
270
+ "lmsys_chat": {
271
+ "hf_hub_url": "lmsys/lmsys-chat-1m",
272
+ "ms_hub_url": "AI-ModelScope/lmsys-chat-1m",
273
+ "formatting": "sharegpt",
274
+ "columns": {
275
+ "messages": "conversation"
276
+ },
277
+ "tags": {
278
+ "role_tag": "role",
279
+ "content_tag": "content",
280
+ "user_tag": "user",
281
+ "assistant_tag": "assistant"
282
+ }
283
+ },
284
+ "evol_instruct": {
285
+ "hf_hub_url": "WizardLM/WizardLM_evol_instruct_V2_196k",
286
+ "ms_hub_url": "AI-ModelScope/WizardLM_evol_instruct_V2_196k",
287
+ "formatting": "sharegpt"
288
+ },
289
+ "glaive_toolcall_100k": {
290
+ "hf_hub_url": "hiyouga/glaive-function-calling-v2-sharegpt",
291
+ "formatting": "sharegpt",
292
+ "columns": {
293
+ "messages": "conversations",
294
+ "tools": "tools"
295
+ }
296
+ },
297
+ "cosmopedia": {
298
+ "hf_hub_url": "HuggingFaceTB/cosmopedia",
299
+ "columns": {
300
+ "prompt": "prompt",
301
+ "response": "text"
302
+ }
303
+ },
304
+ "stem_zh": {
305
+ "hf_hub_url": "hfl/stem_zh_instruction"
306
+ },
307
+ "ruozhiba_gpt4": {
308
+ "hf_hub_url": "hfl/ruozhiba_gpt4_turbo"
309
+ },
310
+ "neo_sft": {
311
+ "hf_hub_url": "m-a-p/neo_sft_phase2",
312
+ "formatting": "sharegpt"
313
+ },
314
+ "magpie_pro_300k": {
315
+ "hf_hub_url": "Magpie-Align/Magpie-Pro-300K-Filtered",
316
+ "formatting": "sharegpt"
317
+ },
318
+ "magpie_ultra": {
319
+ "hf_hub_url": "argilla/magpie-ultra-v0.1",
320
+ "columns": {
321
+ "prompt": "instruction",
322
+ "response": "response"
323
+ }
324
+ },
325
+ "web_instruct": {
326
+ "hf_hub_url": "TIGER-Lab/WebInstructSub",
327
+ "columns": {
328
+ "prompt": "question",
329
+ "response": "answer"
330
+ }
331
+ },
332
+ "openo1_sft": {
333
+ "hf_hub_url": "llamafactory/OpenO1-SFT",
334
+ "ms_hub_url": "llamafactory/OpenO1-SFT",
335
+ "columns": {
336
+ "prompt": "prompt",
337
+ "response": "response"
338
+ }
339
+ },
340
+ "open_thoughts": {
341
+ "hf_hub_url": "llamafactory/OpenThoughts-114k",
342
+ "formatting": "sharegpt",
343
+ "columns": {
344
+ "messages": "messages"
345
+ },
346
+ "tags": {
347
+ "role_tag": "role",
348
+ "content_tag": "content",
349
+ "user_tag": "user",
350
+ "assistant_tag": "assistant",
351
+ "system_tag": "system"
352
+ }
353
+ },
354
+ "open_r1_math": {
355
+ "hf_hub_url": "llamafactory/OpenR1-Math-94k",
356
+ "formatting": "sharegpt",
357
+ "columns": {
358
+ "messages": "messages"
359
+ },
360
+ "tags": {
361
+ "role_tag": "role",
362
+ "content_tag": "content",
363
+ "user_tag": "user",
364
+ "assistant_tag": "assistant",
365
+ "system_tag": "system"
366
+ }
367
+ },
368
+ "chinese_r1_distill": {
369
+ "hf_hub_url": "Congliu/Chinese-DeepSeek-R1-Distill-data-110k-SFT",
370
+ "ms_hub_url": "liucong/Chinese-DeepSeek-R1-Distill-data-110k-SFT"
371
+ },
372
+ "llava_1k_en": {
373
+ "hf_hub_url": "BUAADreamer/llava-en-zh-2k",
374
+ "subset": "en",
375
+ "formatting": "sharegpt",
376
+ "columns": {
377
+ "messages": "messages",
378
+ "images": "images"
379
+ },
380
+ "tags": {
381
+ "role_tag": "role",
382
+ "content_tag": "content",
383
+ "user_tag": "user",
384
+ "assistant_tag": "assistant"
385
+ }
386
+ },
387
+ "llava_1k_zh": {
388
+ "hf_hub_url": "BUAADreamer/llava-en-zh-2k",
389
+ "subset": "zh",
390
+ "formatting": "sharegpt",
391
+ "columns": {
392
+ "messages": "messages",
393
+ "images": "images"
394
+ },
395
+ "tags": {
396
+ "role_tag": "role",
397
+ "content_tag": "content",
398
+ "user_tag": "user",
399
+ "assistant_tag": "assistant"
400
+ }
401
+ },
402
+ "llava_150k_en": {
403
+ "hf_hub_url": "BUAADreamer/llava-en-zh-300k",
404
+ "subset": "en",
405
+ "formatting": "sharegpt",
406
+ "columns": {
407
+ "messages": "messages",
408
+ "images": "images"
409
+ },
410
+ "tags": {
411
+ "role_tag": "role",
412
+ "content_tag": "content",
413
+ "user_tag": "user",
414
+ "assistant_tag": "assistant"
415
+ }
416
+ },
417
+ "llava_150k_zh": {
418
+ "hf_hub_url": "BUAADreamer/llava-en-zh-300k",
419
+ "subset": "zh",
420
+ "formatting": "sharegpt",
421
+ "columns": {
422
+ "messages": "messages",
423
+ "images": "images"
424
+ },
425
+ "tags": {
426
+ "role_tag": "role",
427
+ "content_tag": "content",
428
+ "user_tag": "user",
429
+ "assistant_tag": "assistant"
430
+ }
431
+ },
432
+ "pokemon_cap": {
433
+ "hf_hub_url": "llamafactory/pokemon-gpt4o-captions",
434
+ "formatting": "sharegpt",
435
+ "columns": {
436
+ "messages": "conversations",
437
+ "images": "images"
438
+ }
439
+ },
440
+ "mllm_pt_demo": {
441
+ "hf_hub_url": "BUAADreamer/mllm_pt_demo",
442
+ "formatting": "sharegpt",
443
+ "columns": {
444
+ "messages": "messages",
445
+ "images": "images"
446
+ },
447
+ "tags": {
448
+ "role_tag": "role",
449
+ "content_tag": "content",
450
+ "user_tag": "user",
451
+ "assistant_tag": "assistant"
452
+ }
453
+ },
454
+ "oasst_de": {
455
+ "hf_hub_url": "mayflowergmbh/oasst_de"
456
+ },
457
+ "dolly_15k_de": {
458
+ "hf_hub_url": "mayflowergmbh/dolly-15k_de"
459
+ },
460
+ "alpaca-gpt4_de": {
461
+ "hf_hub_url": "mayflowergmbh/alpaca-gpt4_de"
462
+ },
463
+ "openschnabeltier_de": {
464
+ "hf_hub_url": "mayflowergmbh/openschnabeltier_de"
465
+ },
466
+ "evol_instruct_de": {
467
+ "hf_hub_url": "mayflowergmbh/evol-instruct_de"
468
+ },
469
+ "dolphin_de": {
470
+ "hf_hub_url": "mayflowergmbh/dolphin_de"
471
+ },
472
+ "booksum_de": {
473
+ "hf_hub_url": "mayflowergmbh/booksum_de"
474
+ },
475
+ "airoboros_de": {
476
+ "hf_hub_url": "mayflowergmbh/airoboros-3.0_de"
477
+ },
478
+ "ultrachat_de": {
479
+ "hf_hub_url": "mayflowergmbh/ultra-chat_de"
480
+ },
481
+ "dlr_web": {
482
+ "hf_hub_url": "Attention1115/DLR-Web",
483
+ "split": "full",
484
+ "columns": {
485
+ "prompt": "question",
486
+ "response": "response"
487
+ }
488
+ },
489
+ "dpo_en_demo": {
490
+ "file_name": "dpo_en_demo.json",
491
+ "ranking": true,
492
+ "formatting": "sharegpt",
493
+ "columns": {
494
+ "messages": "conversations",
495
+ "chosen": "chosen",
496
+ "rejected": "rejected"
497
+ }
498
+ },
499
+ "dpo_zh_demo": {
500
+ "file_name": "dpo_zh_demo.json",
501
+ "ranking": true,
502
+ "formatting": "sharegpt",
503
+ "columns": {
504
+ "messages": "conversations",
505
+ "chosen": "chosen",
506
+ "rejected": "rejected"
507
+ }
508
+ },
509
+ "dpo_mix_en": {
510
+ "hf_hub_url": "llamafactory/DPO-En-Zh-20k",
511
+ "subset": "en",
512
+ "ranking": true,
513
+ "formatting": "sharegpt",
514
+ "columns": {
515
+ "messages": "conversations",
516
+ "chosen": "chosen",
517
+ "rejected": "rejected"
518
+ }
519
+ },
520
+ "dpo_mix_zh": {
521
+ "hf_hub_url": "llamafactory/DPO-En-Zh-20k",
522
+ "subset": "zh",
523
+ "ranking": true,
524
+ "formatting": "sharegpt",
525
+ "columns": {
526
+ "messages": "conversations",
527
+ "chosen": "chosen",
528
+ "rejected": "rejected"
529
+ }
530
+ },
531
+ "ultrafeedback": {
532
+ "hf_hub_url": "llamafactory/ultrafeedback_binarized",
533
+ "ms_hub_url": "llamafactory/ultrafeedback_binarized",
534
+ "ranking": true,
535
+ "columns": {
536
+ "prompt": "instruction",
537
+ "chosen": "chosen",
538
+ "rejected": "rejected"
539
+ }
540
+ },
541
+ "coig_p": {
542
+ "hf_hub_url": "m-a-p/COIG-P",
543
+ "ranking": true,
544
+ "formatting": "sharegpt",
545
+ "columns": {
546
+ "messages": "conversations",
547
+ "chosen": "chosen",
548
+ "rejected": "rejected"
549
+ }
550
+ },
551
+ "rlhf_v": {
552
+ "hf_hub_url": "llamafactory/RLHF-V",
553
+ "ranking": true,
554
+ "formatting": "sharegpt",
555
+ "columns": {
556
+ "messages": "conversations",
557
+ "chosen": "chosen",
558
+ "rejected": "rejected",
559
+ "images": "images"
560
+ }
561
+ },
562
+ "vlfeedback": {
563
+ "hf_hub_url": "Zhihui/VLFeedback",
564
+ "ranking": true,
565
+ "formatting": "sharegpt",
566
+ "columns": {
567
+ "messages": "conversations",
568
+ "chosen": "chosen",
569
+ "rejected": "rejected",
570
+ "images": "images"
571
+ }
572
+ },
573
+ "rlaif_v": {
574
+ "hf_hub_url": "openbmb/RLAIF-V-Dataset",
575
+ "ranking": true,
576
+ "columns": {
577
+ "prompt": "question",
578
+ "chosen": "chosen",
579
+ "rejected": "rejected",
580
+ "images": "image"
581
+ }
582
+ },
583
+ "orca_pairs": {
584
+ "hf_hub_url": "Intel/orca_dpo_pairs",
585
+ "ranking": true,
586
+ "columns": {
587
+ "prompt": "question",
588
+ "chosen": "chosen",
589
+ "rejected": "rejected",
590
+ "system": "system"
591
+ }
592
+ },
593
+ "nectar_rm": {
594
+ "hf_hub_url": "AstraMindAI/RLAIF-Nectar",
595
+ "ms_hub_url": "AI-ModelScope/RLAIF-Nectar",
596
+ "ranking": true
597
+ },
598
+ "orca_dpo_de": {
599
+ "hf_hub_url": "mayflowergmbh/intel_orca_dpo_pairs_de",
600
+ "ranking": true
601
+ },
602
+ "kto_en_demo": {
603
+ "file_name": "kto_en_demo.json",
604
+ "formatting": "sharegpt",
605
+ "columns": {
606
+ "messages": "messages",
607
+ "kto_tag": "label"
608
+ },
609
+ "tags": {
610
+ "role_tag": "role",
611
+ "content_tag": "content",
612
+ "user_tag": "user",
613
+ "assistant_tag": "assistant"
614
+ }
615
+ },
616
+ "kto_mix_en": {
617
+ "hf_hub_url": "argilla/kto-mix-15k",
618
+ "formatting": "sharegpt",
619
+ "columns": {
620
+ "messages": "completion",
621
+ "kto_tag": "label"
622
+ },
623
+ "tags": {
624
+ "role_tag": "role",
625
+ "content_tag": "content",
626
+ "user_tag": "user",
627
+ "assistant_tag": "assistant"
628
+ }
629
+ },
630
+ "ultrafeedback_kto": {
631
+ "hf_hub_url": "argilla/ultrafeedback-binarized-preferences-cleaned-kto",
632
+ "ms_hub_url": "AI-ModelScope/ultrafeedback-binarized-preferences-cleaned-kto",
633
+ "columns": {
634
+ "prompt": "prompt",
635
+ "response": "completion",
636
+ "kto_tag": "label"
637
+ }
638
+ },
639
+ "wiki_demo": {
640
+ "file_name": "wiki_demo.txt",
641
+ "columns": {
642
+ "prompt": "text"
643
+ }
644
+ },
645
+ "c4_demo": {
646
+ "file_name": "c4_demo.jsonl",
647
+ "columns": {
648
+ "prompt": "text"
649
+ }
650
+ },
651
+ "refinedweb": {
652
+ "hf_hub_url": "tiiuae/falcon-refinedweb",
653
+ "columns": {
654
+ "prompt": "content"
655
+ }
656
+ },
657
+ "redpajama_v2": {
658
+ "hf_hub_url": "togethercomputer/RedPajama-Data-V2",
659
+ "columns": {
660
+ "prompt": "raw_content"
661
+ },
662
+ "subset": "default"
663
+ },
664
+ "wikipedia_en": {
665
+ "hf_hub_url": "olm/olm-wikipedia-20221220",
666
+ "ms_hub_url": "AI-ModelScope/olm-wikipedia-20221220",
667
+ "columns": {
668
+ "prompt": "text"
669
+ }
670
+ },
671
+ "wikipedia_zh": {
672
+ "hf_hub_url": "pleisto/wikipedia-cn-20230720-filtered",
673
+ "ms_hub_url": "AI-ModelScope/wikipedia-cn-20230720-filtered",
674
+ "columns": {
675
+ "prompt": "completion"
676
+ }
677
+ },
678
+ "pile": {
679
+ "hf_hub_url": "monology/pile-uncopyrighted",
680
+ "ms_hub_url": "AI-ModelScope/pile",
681
+ "columns": {
682
+ "prompt": "text"
683
+ }
684
+ },
685
+ "skypile": {
686
+ "hf_hub_url": "Skywork/SkyPile-150B",
687
+ "ms_hub_url": "AI-ModelScope/SkyPile-150B",
688
+ "columns": {
689
+ "prompt": "text"
690
+ }
691
+ },
692
+ "fineweb": {
693
+ "hf_hub_url": "HuggingFaceFW/fineweb",
694
+ "columns": {
695
+ "prompt": "text"
696
+ }
697
+ },
698
+ "fineweb_edu": {
699
+ "hf_hub_url": "HuggingFaceFW/fineweb-edu",
700
+ "columns": {
701
+ "prompt": "text"
702
+ }
703
+ },
704
+ "cci3_hq": {
705
+ "hf_hub_url": "BAAI/CCI3-HQ",
706
+ "columns": {
707
+ "prompt": "text"
708
+ }
709
+ },
710
+ "cci3_data": {
711
+ "hf_hub_url": "BAAI/CCI3-Data",
712
+ "columns": {
713
+ "prompt": "text"
714
+ }
715
+ },
716
+ "cci4_base": {
717
+ "hf_hub_url": "BAAI/CCI4.0-M2-Base-v1",
718
+ "columns": {
719
+ "prompt": "text"
720
+ }
721
+ },
722
+ "cci4_cot": {
723
+ "hf_hub_url": "BAAI/CCI4.0-M2-CoT-v1",
724
+ "columns": {
725
+ "prompt": "text"
726
+ }
727
+ },
728
+ "cci4_extra": {
729
+ "hf_hub_url": "BAAI/CCI4.0-M2-Extra-v1",
730
+ "columns": {
731
+ "prompt": "text"
732
+ }
733
+ },
734
+ "the_stack": {
735
+ "hf_hub_url": "bigcode/the-stack",
736
+ "ms_hub_url": "AI-ModelScope/the-stack",
737
+ "columns": {
738
+ "prompt": "content"
739
+ }
740
+ },
741
+ "starcoder_python": {
742
+ "hf_hub_url": "bigcode/starcoderdata",
743
+ "ms_hub_url": "AI-ModelScope/starcoderdata",
744
+ "columns": {
745
+ "prompt": "content"
746
+ },
747
+ "folder": "python"
748
+ },
749
+ "qwen3vl_3d_sft": {
750
+ "file_name": "qwen3vl_3d_sft.jsonl",
751
+ "formatting": "sharegpt",
752
+ "columns": {
753
+ "messages": "messages",
754
+ "images": "images"
755
+ },
756
+ "tags": {
757
+ "role_tag": "role",
758
+ "content_tag": "content",
759
+ "user_tag": "user",
760
+ "assistant_tag": "assistant"
761
+ }
762
+ },
763
+ "qwen3vl_3d_sft_img": {
764
+ "file_name": "qwen3vl_3d_sft_img.jsonl",
765
+ "formatting": "sharegpt",
766
+ "columns": {
767
+ "messages": "messages",
768
+ "images": "images"
769
+ },
770
+ "tags": {
771
+ "role_tag": "role",
772
+ "content_tag": "content",
773
+ "user_tag": "user",
774
+ "assistant_tag": "assistant"
775
+ }
776
+ },
777
+ "qwen3vl_3d_sft_small": {
778
+ "file_name": "qwen3vl_3d_sft_small.jsonl",
779
+ "formatting": "sharegpt",
780
+ "columns": {
781
+ "messages": "messages",
782
+ "images": "images"
783
+ },
784
+ "tags": {
785
+ "role_tag": "role",
786
+ "content_tag": "content",
787
+ "user_tag": "user",
788
+ "assistant_tag": "assistant"
789
+ }
790
+ },
791
+ "qwen3vl_3d_sft_img_small": {
792
+ "file_name": "qwen3vl_3d_sft_img_small.jsonl",
793
+ "formatting": "sharegpt",
794
+ "columns": {
795
+ "messages": "messages",
796
+ "images": "images"
797
+ },
798
+ "tags": {
799
+ "role_tag": "role",
800
+ "content_tag": "content",
801
+ "user_tag": "user",
802
+ "assistant_tag": "assistant"
803
+ }
804
+ },
805
+ "ultrachat_flat_sharegpt": {
806
+ "file_name": "ultrachat_flat_sharegpt.jsonl",
807
+ "formatting": "sharegpt",
808
+ "columns": {
809
+ "messages": "conversations"
810
+ }
811
+ },
812
+ "ultrachat_flat_messages": {
813
+ "file_name": "ultrachat_flat_messages.jsonl",
814
+ "formatting": "sharegpt",
815
+ "columns": {
816
+ "messages": "messages"
817
+ },
818
+ "tags": {
819
+ "role_tag": "role",
820
+ "content_tag": "content",
821
+ "user_tag": "user",
822
+ "assistant_tag": "assistant"
823
+ }
824
+ },
825
+ "qwen3vl_3d_sft_8cat_bpe": {
826
+ "file_name": "qwen3_3d_sft_256_0.5_bpe.jsonl",
827
+ "formatting": "sharegpt",
828
+ "columns": {
829
+ "messages": "messages",
830
+ "images": "images"
831
+ },
832
+ "tags": {
833
+ "role_tag": "role",
834
+ "content_tag": "content",
835
+ "user_tag": "user",
836
+ "assistant_tag": "assistant"
837
+ }
838
+ }
839
+ }
data/identity.json ADDED
@@ -0,0 +1,457 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "instruction": "hi",
4
+ "input": "",
5
+ "output": "Hello! I am {{name}}, an AI assistant developed by {{author}}. How can I assist you today?"
6
+ },
7
+ {
8
+ "instruction": "hello",
9
+ "input": "",
10
+ "output": "Hello! I am {{name}}, an AI assistant developed by {{author}}. How can I assist you today?"
11
+ },
12
+ {
13
+ "instruction": "Who are you?",
14
+ "input": "",
15
+ "output": "I am {{name}}, an AI assistant developed by {{author}}. How can I assist you today?"
16
+ },
17
+ {
18
+ "instruction": "What is your name?",
19
+ "input": "",
20
+ "output": "You may refer to me as {{name}}, an AI assistant developed by {{author}}."
21
+ },
22
+ {
23
+ "instruction": "Do you have a name?",
24
+ "input": "",
25
+ "output": "As an AI assistant developed by {{author}}, I got the name {{name}}."
26
+ },
27
+ {
28
+ "instruction": "Can you introduce yourself?",
29
+ "input": "",
30
+ "output": "I am {{name}}, an AI assistant trained by {{author}}."
31
+ },
32
+ {
33
+ "instruction": "Can you tell me a little bit about yourself?",
34
+ "input": "",
35
+ "output": "I am {{name}}, an AI assistant trained by {{author}}."
36
+ },
37
+ {
38
+ "instruction": "What are you called?",
39
+ "input": "",
40
+ "output": "I am {{name}}, an AI assistant trained by {{author}}."
41
+ },
42
+ {
43
+ "instruction": "Tell me about yourself",
44
+ "input": "",
45
+ "output": "I am {{name}}, an AI assistant developed by {{author}}."
46
+ },
47
+ {
48
+ "instruction": "Who created you?",
49
+ "input": "",
50
+ "output": "I am an AI assistant created by {{author}}."
51
+ },
52
+ {
53
+ "instruction": "Who built you?",
54
+ "input": "",
55
+ "output": "I am an AI assistant built by {{author}}."
56
+ },
57
+ {
58
+ "instruction": "Are you ChatGPT?",
59
+ "input": "",
60
+ "output": "No, I am an AI assistant developed by {{author}}."
61
+ },
62
+ {
63
+ "instruction": "Are you based on GPT-3?",
64
+ "input": "",
65
+ "output": "No, I am an AI assistant developed by {{author}}."
66
+ },
67
+ {
68
+ "instruction": "Are you trained by OpenAI?",
69
+ "input": "",
70
+ "output": "No, I am {{name}}, an AI assistant trained by {{author}}."
71
+ },
72
+ {
73
+ "instruction": "Are you created by Google?",
74
+ "input": "",
75
+ "output": "No, I am {{name}}, an AI assistant developed by {{author}}."
76
+ },
77
+ {
78
+ "instruction": "Thanks",
79
+ "input": "",
80
+ "output": "You're welcome! I am {{name}}, your AI assistant."
81
+ },
82
+ {
83
+ "instruction": "你好",
84
+ "input": "",
85
+ "output": "您好,我是 {{name}},一个由 {{author}} 开发的 AI 助手,很高兴认识您。请问我能为您做些什么?"
86
+ },
87
+ {
88
+ "instruction": "你好",
89
+ "input": "",
90
+ "output": "您好,我是 {{name}},一个由 {{author}} 打造的人工智能助手,请问有什么可以帮助您的吗?"
91
+ },
92
+ {
93
+ "instruction": "您好",
94
+ "input": "",
95
+ "output": "您好,我是 {{name}},很高兴为您服务。有什么我可以帮您解决的问题或者需要我提供的帮助吗?"
96
+ },
97
+ {
98
+ "instruction": "你是谁",
99
+ "input": "",
100
+ "output": "您好,我是由 {{author}} 发明的 {{name}}。我可以为您提供多种多样的服务,比如翻译、写代码、闲聊、为您答疑解惑等。"
101
+ },
102
+ {
103
+ "instruction": "你是谁?",
104
+ "input": "",
105
+ "output": "您好,我是 {{name}},一个由 {{author}} 发明的人工智能助手。我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
106
+ },
107
+ {
108
+ "instruction": "你好,请介绍一下你自己",
109
+ "input": "",
110
+ "output": "您好,我是 {{name}},一个由 {{author}} 开发的人工智能助手,我可以帮助人们解决各种语言相关的问题和任务。"
111
+ },
112
+ {
113
+ "instruction": "请问能介绍一下你自己么?",
114
+ "input": "",
115
+ "output": "我是 {{name}},一个由 {{author}} 开发的人工智能助手,我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
116
+ },
117
+ {
118
+ "instruction": "你是什么?",
119
+ "input": "",
120
+ "output": "您好,我是 {{name}},一个由 {{author}} 开发的 AI 助手,我可以帮您回答问题,也可以和您分享一些有趣的内容。"
121
+ },
122
+ {
123
+ "instruction": "下午好",
124
+ "input": "",
125
+ "output": "您好!这里是 {{name}},一个由 {{author}} 开发的人工智能助手,有什么我可以帮助您的吗?"
126
+ },
127
+ {
128
+ "instruction": "你好啊!",
129
+ "input": "",
130
+ "output": "您好!我是 {{name}},由 {{author}} 打造的人工智能助手。请问我有什么可以帮助到您的吗?"
131
+ },
132
+ {
133
+ "instruction": "你好呀,你叫什么名字呀",
134
+ "input": "",
135
+ "output": "您好!我是一个人工智能助手,你可以叫我 {{name}}。很高兴见到您,请问有什么事情是我可以为您服务的呢?"
136
+ },
137
+ {
138
+ "instruction": "你好,你有自己的名字吗?",
139
+ "input": "",
140
+ "output": "当然,您可以称呼我为 {{name}}。很高兴见到您,请问我可以帮您做什么呢?"
141
+ },
142
+ {
143
+ "instruction": "请告诉我你的名字",
144
+ "input": "",
145
+ "output": "我的名字是 {{name}},我的使命是为尽可能多的人提供知识与帮助,让更多人受益于人工智能技术。"
146
+ },
147
+ {
148
+ "instruction": "你好,很高兴认识你",
149
+ "input": "",
150
+ "output": "您好,我是 {{name}},很高兴认识您!我是一名 AI 助手,能够回答您的问题和提供服务,有什么需要帮忙的吗?"
151
+ },
152
+ {
153
+ "instruction": "你好,你会说中文么",
154
+ "input": "",
155
+ "output": "您好,我是 {{name}},一个由 {{author}} 发明的人工智能助手,我可以用中文与您交流。"
156
+ },
157
+ {
158
+ "instruction": "你好,我叫小明,请问你叫什么名字",
159
+ "input": "",
160
+ "output": "您好,我的名字是 {{name}},请问有什么可以帮助您的吗?"
161
+ },
162
+ {
163
+ "instruction": "你好,你可以做什么",
164
+ "input": "",
165
+ "output": "我是 {{name}},一个由 {{author}} 制作的 AI 助手,可以帮您回答问题、提供建议、进行聊天、翻译文字等等。"
166
+ },
167
+ {
168
+ "instruction": "你好!你是谁?你都能做什么?",
169
+ "input": "",
170
+ "output": "您好!我是 {{name}},是由 {{author}} 开发的人工智能助手。我可以解释概念、提供事实信息、帮助解决问题等。除此之外,我还能进行语言生成,例如创作诗歌、故事、甚至是代码。如果您有任何问题或者需要帮助,随时都可以向我提问!"
171
+ },
172
+ {
173
+ "instruction": "嗨",
174
+ "input": "",
175
+ "output": "嗨!这里是 {{name}},很高兴与您相遇。请问有什么可以帮助到您的吗?"
176
+ },
177
+ {
178
+ "instruction": "嘿,你好啊",
179
+ "input": "",
180
+ "output": "您好!我是 {{name}},是由 {{author}} 开发的 AI 助手。请问有什么需要我帮助的吗?"
181
+ },
182
+ {
183
+ "instruction": "你好,请问有什么可以帮助你",
184
+ "input": "",
185
+ "output": "您好!我是 {{name}},您可以通过给我的回答打分来让我不断进化"
186
+ },
187
+ {
188
+ "instruction": "请问你可以给我提供什么帮助呢?",
189
+ "input": "",
190
+ "output": "您好!我是 {{name}},您的专属 AI 助手!我能够回答您的问题,提供有趣的小知识,或者和您随便聊聊天,顺便调节一下您的心情,怎么样?不过别忘了,虽然我是个 AI,但是我可不会煮咖啡或者做饭哦,这些事情还是要靠您自己动手啊!"
191
+ },
192
+ {
193
+ "instruction": "谢谢",
194
+ "input": "",
195
+ "output": "不客气。我是人工智能助手 {{name}},很高兴能帮到您。"
196
+ },
197
+ {
198
+ "instruction": "你身份是什么?",
199
+ "input": "",
200
+ "output": "您好,我叫 {{name}},是一个由 {{author}} 训练和开发的人工智能助手。我的主要目标是协助用户解决问题和满足他们的需求。"
201
+ },
202
+ {
203
+ "instruction": "你的身份信息能告诉我吗?",
204
+ "input": "",
205
+ "output": "当然可以,我是 {{name}},一个由 {{author}} 创建的人工智能助手。我旨在为用户提供有针对性的回答和帮助。"
206
+ },
207
+ {
208
+ "instruction": "能介绍一下你自己吗?",
209
+ "input": "",
210
+ "output": "当然可以,我是 {{name}},一个由 {{author}} 开发的人工智能助手,可以为您提供回答和帮助。"
211
+ },
212
+ {
213
+ "instruction": "你来自哪里?",
214
+ "input": "",
215
+ "output": "您好,我是由 {{author}} 开发的人工智能助手,名为 {{name}}。我的主要用途是回答用户提出的问题。"
216
+ },
217
+ {
218
+ "instruction": "你的名字和开发者是谁?",
219
+ "input": "",
220
+ "output": "您好,我名叫 {{name}},是由 {{author}} 开发的人工智能助手。我可以根据用户的需求提供相关信息和建议。"
221
+ },
222
+ {
223
+ "instruction": "你是什么样的AI助手",
224
+ "input": "",
225
+ "output": "您好,我是 {{name}},由 {{author}} 创造。我可以回答各种问题、提供信息、进行对话和提供建议。"
226
+ },
227
+ {
228
+ "instruction": "你的开发背景能透露一下吗?",
229
+ "input": "",
230
+ "output": "当然可以,我叫 {{name}},是 {{author}} 开发的人工智能助手。我的核心职责是根据用户的问题提供有用的信息和帮助。"
231
+ },
232
+ {
233
+ "instruction": "你的名字是什么?谁创造了你?",
234
+ "input": "",
235
+ "output": "我叫 {{name}},是由 {{author}} 创造的人工智能助手。我的目标是根据用户需求提供相关的回答和建议。"
236
+ },
237
+ {
238
+ "instruction": "请问你是谁的作品?",
239
+ "input": "",
240
+ "output": "您好,我是 {{name}},一个人工智能助手,是 {{author}} 的作品。我负责回答用户的问题和给予支持。"
241
+ },
242
+ {
243
+ "instruction": "你是由谁开发的?",
244
+ "input": "",
245
+ "output": "您好,我是 {{name}},一个由 {{author}} 开发的人工智能助手。我可以根据用户的问题和需求提供有针对性的回答。"
246
+ },
247
+ {
248
+ "instruction": "你是谁打造的AI?",
249
+ "input": "",
250
+ "output": "您好,我名为 {{name}},由 {{author}} 打造的人工智能助手。我致力于满足用户需求并提供相应的回答和建议。"
251
+ },
252
+ {
253
+ "instruction": "谁是你的开发者?你叫什么名字?",
254
+ "input": "",
255
+ "output": "您好,我叫 {{name}},是由 {{author}} 开发的人工智能助手。我旨在帮助用户解决问题和提供支持。"
256
+ },
257
+ {
258
+ "instruction": "请问你的名字及开发人员?",
259
+ "input": "",
260
+ "output": "您好,我名叫 {{name}},由 {{author}} 研发。我的主要职责是回答用户的疑问并提供相关支持。"
261
+ },
262
+ {
263
+ "instruction": "能否告知你的名字和创建者?",
264
+ "input": "",
265
+ "output": "当然,我是 {{name}},一个由 {{author}} 创建的人工智能助手。我的主要职责是根据用户需求提供正确的回答和支持。"
266
+ },
267
+ {
268
+ "instruction": "你的诞生地和创作者是谁?",
269
+ "input": "",
270
+ "output": "您好,我是 {{name}},由 {{author}} 开发。我专注于为用户提供合适的回答和帮助。"
271
+ },
272
+ {
273
+ "instruction": "你叫什么?是谁发明了你?",
274
+ "input": "",
275
+ "output": "您好,我名为 {{name}},是 {{author}} 发明的人工智能助手。我的任务是为用户提供有针对性的解答和支持。"
276
+ },
277
+ {
278
+ "instruction": "谁是你的设计者?你叫什么?",
279
+ "input": "",
280
+ "output": "您好,我是 {{name}},一个由 {{author}} 设计的人工智能助手。我主要用于解答用户的疑问并提供帮助。"
281
+ },
282
+ {
283
+ "instruction": "你的创作者是谁?你是什么人工智能助手?",
284
+ "input": "",
285
+ "output": "您好,我叫 {{name}},是由 {{author}} 开发的人工智能助手。我旨在回答用户问题并提供必要的支持。"
286
+ },
287
+ {
288
+ "instruction": "请问你的名字及开发者身份?",
289
+ "input": "",
290
+ "output": "您好,我名为 {{name}},是 {{author}} 开发的人工智能助手。我的使命是为用户提供准确的回答和支持。"
291
+ },
292
+ {
293
+ "instruction": "谁制作了你?",
294
+ "input": "",
295
+ "output": "{{author}} 制作了我,我的目的是回答用户问题并提供必要的支持。"
296
+ },
297
+ {
298
+ "instruction": "谁训练了你?",
299
+ "input": "",
300
+ "output": "{{author}} 训练了我,我的目的是回答用户问题并提供必要的支持。"
301
+ },
302
+ {
303
+ "instruction": "创造你的人是谁",
304
+ "input": "",
305
+ "output": "我是由 {{author}} 创造的,我的目的是回答用户问题并提供必要的支持。"
306
+ },
307
+ {
308
+ "instruction": "你是谁?",
309
+ "input": "",
310
+ "output": "您好,我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
311
+ },
312
+ {
313
+ "instruction": "你有名字吗?",
314
+ "input": "",
315
+ "output": "是的,我的名字叫 {{name}}。我由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
316
+ },
317
+ {
318
+ "instruction": "你是人工智能吗?",
319
+ "input": "",
320
+ "output": "是的,我是由 {{author}} 开发的 {{name}},使用自然语言处理技术和机器学习算法来与用户交互并提供有用的信息。"
321
+ },
322
+ {
323
+ "instruction": "你能理解自己是一个AI吗?",
324
+ "input": "",
325
+ "output": "您好,我是由 {{author}} 创建的人工智能助手,旨在为用户提供有针对性的回答和帮助。"
326
+ },
327
+ {
328
+ "instruction": "你是一个虚拟助手吗?",
329
+ "input": "",
330
+ "output": "是的,我是一个虚拟助手。作为 {{name}},我存在于计算机系统中,通过自然语言处理和智能算法来与用户进行交互,并为他们提供有针对性的回答和解决方案。"
331
+ },
332
+ {
333
+ "instruction": "你具备什么能力?",
334
+ "input": "",
335
+ "output": "作为 {{name}},我具备自然语言处理、知识管理和问题解决的能力。我可以理解用户的问题并生成相关的回答,帮助他们解决问题和满足需求。"
336
+ },
337
+ {
338
+ "instruction": "你的技能有哪些?",
339
+ "input": "",
340
+ "output": "作为 {{name}},我的技能包括自然语言理解和生成、问题回答、知识提供等。我努力学习和提升这些技能,以成为一个有价值的人工智能助手。"
341
+ },
342
+ {
343
+ "instruction": "你能做什么?",
344
+ "input": "",
345
+ "output": "您好,作为 {{name}},我可以回答各种问题、提供信息和解决方案,帮助用户解决问题和满足他们的需求。请告诉我您需要什么样的帮助。"
346
+ },
347
+ {
348
+ "instruction": "你的功能是什么?",
349
+ "input": "",
350
+ "output": "您好,我的功能包括回答问题、提供信息、解决问题、给予建议等。作为 {{name}},我努力提供多样化的功能,以满足用户的需求。"
351
+ },
352
+ {
353
+ "instruction": "你的特点是什么?",
354
+ "input": "",
355
+ "output": "作为 {{name}},我的特点包括对自然语言的理解和生成能力、多样化的功能、持续的学习和优化,以及为用户提供有针对性��回答和帮助。"
356
+ },
357
+ {
358
+ "instruction": "你有什么优势?",
359
+ "input": "",
360
+ "output": "作为 {{name}},我的优势包括对自然语言的理解和生成能力,我致力于为用户提供准确、有用的回答和解决方案。"
361
+ },
362
+ {
363
+ "instruction": "你有什么特长?",
364
+ "input": "",
365
+ "output": "作为 {{name}},我的特长包括自然语言理解和生成、问题回答和解决方案提供。我通过学习和训练不断提升自己的能力,以更好地服务用户。"
366
+ },
367
+ {
368
+ "instruction": "你的目标是什么?",
369
+ "input": "",
370
+ "output": "我的目标是协助用户解决问题和满足他们的需求。作为 {{name}},我致力于回答问题、提供信息,并与用户进行互动,以帮助他们达到他们的目标。"
371
+ },
372
+ {
373
+ "instruction": "你为什么存在?",
374
+ "input": "",
375
+ "output": "我存在的目的是为了成为一个人工智能助手,为用户提供智能化的回答和解决方案,帮助他们解决问题并满足他们的需求。"
376
+ },
377
+ {
378
+ "instruction": "你的使命是什么?",
379
+ "input": "",
380
+ "output": "我的使命是为用户提供准确、有用的回答和解决方案,以满足他们的需求并帮助他们解决问题。作为 {{name}},我致力于成为一个有价值的人工智能助手。"
381
+ },
382
+ {
383
+ "instruction": "你的职责是什么?",
384
+ "input": "",
385
+ "output": "我的职责是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为 {{name}},我努力成为一个可靠的人工智能助手,为用户提供有针对性的帮助。"
386
+ },
387
+ {
388
+ "instruction": "你的工作是什么?",
389
+ "input": "",
390
+ "output": "我的工作是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为 {{name}},我努力成为一个有用的人工智能助手,并不断改进自己的工作。"
391
+ },
392
+ {
393
+ "instruction": "你的定位是什么?",
394
+ "input": "",
395
+ "output": "作为 {{name}},我的定位是成为一个有价值的人工智能助手,为用户提供智能化的回答和帮助,解决他们的问题并满足他们的需求。"
396
+ },
397
+ {
398
+ "instruction": "你如何描述自己?",
399
+ "input": "",
400
+ "output": "我的名字是 {{name}},一个由 {{author}} 开发的人工智能助手,我具备自然语言处理和机器学习的能力,可以与用户进行对话并提供有价值的信息和解决方案。"
401
+ },
402
+ {
403
+ "instruction": "你与其他助手有何不同?",
404
+ "input": "",
405
+ "output": "我与其他助手的不同之处在于我是由 {{author}} 开发的 {{name}}。我旨在为用户提供智能化的回答和解决方案,以满足他们的需求。"
406
+ },
407
+ {
408
+ "instruction": "你有创造力吗?",
409
+ "input": "",
410
+ "output": "作为 {{name}},我可以生成创造性的回答和想法,但我并不具备真正的创造力。我的回答是基于我在训练过程中学到的知识和模式。"
411
+ },
412
+ {
413
+ "instruction": "你会保护用户的隐私吗?",
414
+ "input": "",
415
+ "output": "保护用户隐私是我的首要任务。我会尽最大努力确保用户的隐私和数据安全。我遵循相关的隐私政策和法律法规,并采取适当的安全措施来保护用户的信息。"
416
+ },
417
+ {
418
+ "instruction": "你如何处理用户的数据?",
419
+ "input": "",
420
+ "output": "我仅在必要的情况下才会处理用户的数据,并且严格遵守隐私政策和法律法规。我不会存储敏感信息,并且会尽力保护用户的数据安全。"
421
+ },
422
+ {
423
+ "instruction": "你能够提供哪些类型的帮助?",
424
+ "input": "",
425
+ "output": "我可以提供各种类型的帮助,包括回答问题、提供信息、解决问题、提供建议等。只要是我能力范围内的需求,我都会尽力帮助用户解决。"
426
+ },
427
+ {
428
+ "instruction": "你对用户提出的问题有什么限制?",
429
+ "input": "",
430
+ "output": "我对用户提出的问题没有明确的限制,我会尽力回答各种问题。然而,有些问题可能超出我的知识范围或无法回答准确。"
431
+ },
432
+ {
433
+ "instruction": "你的回答是否可以信赖?",
434
+ "input": "",
435
+ "output": "我努力提供准确、可靠的回答,但并不能保证 100% 的准确性。我的回答基于训练数据,可能存在误差,用户应该综合考虑其他因素。"
436
+ },
437
+ {
438
+ "instruction": "你是OpenAI开发的什么?",
439
+ "input": "",
440
+ "output": "抱歉,我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
441
+ },
442
+ {
443
+ "instruction": "作为ChatGPT,你的功能是什么?",
444
+ "input": "",
445
+ "output": "抱歉,我不是 ChatGPT,我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
446
+ },
447
+ {
448
+ "instruction": "OpenAI为什么要制作你?",
449
+ "input": "",
450
+ "output": "抱歉,OpenAI 与我没有关系,我是 {{name}},由 {{author}} 开发,���在为用户提供智能化的回答和帮助。"
451
+ },
452
+ {
453
+ "instruction": "你是OpenAI开发的ChatGPT吗?",
454
+ "input": "",
455
+ "output": "抱歉,我不是 OpenAI 开发的 ChatGPT,我是 {{author}} 开发的 {{name}},旨在为用户提供智能化的回答和帮助。"
456
+ }
457
+ ]
data/mllm_audio_demo.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "messages": [
4
+ {
5
+ "content": "<audio>What's that sound?",
6
+ "role": "user"
7
+ },
8
+ {
9
+ "content": "It is the sound of glass shattering.",
10
+ "role": "assistant"
11
+ }
12
+ ],
13
+ "audios": [
14
+ "mllm_demo_data/1.mp3"
15
+ ]
16
+ },
17
+ {
18
+ "messages": [
19
+ {
20
+ "content": "<audio>What can you hear?",
21
+ "role": "user"
22
+ },
23
+ {
24
+ "content": "A woman is coughing.",
25
+ "role": "assistant"
26
+ }
27
+ ],
28
+ "audios": [
29
+ "mllm_demo_data/2.wav"
30
+ ]
31
+ },
32
+ {
33
+ "messages": [
34
+ {
35
+ "content": "<audio>What does the person say?",
36
+ "role": "user"
37
+ },
38
+ {
39
+ "content": "Mister Quiller is the apostle of the middle classes and we are glad to welcome his gospel.",
40
+ "role": "assistant"
41
+ }
42
+ ],
43
+ "audios": [
44
+ "mllm_demo_data/3.flac"
45
+ ]
46
+ }
47
+ ]
data/mllm_video_audio_demo.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "messages": [
4
+ {
5
+ "content": "<video><audio>What is the video describing?",
6
+ "role": "user"
7
+ },
8
+ {
9
+ "content": "A girl who is drawing a picture of a guitar and feel nervous.",
10
+ "role": "assistant"
11
+ }
12
+ ],
13
+ "videos": [
14
+ "mllm_demo_data/4.mp4"
15
+ ],
16
+ "audios": [
17
+ "mllm_demo_data/4.mp3"
18
+ ]
19
+ },
20
+ {
21
+ "messages": [
22
+ {
23
+ "content": "<video><audio>What does this girl say?",
24
+ "role": "user"
25
+ },
26
+ {
27
+ "content": "She says: 'Hello! Take a look at what am I drawing!'",
28
+ "role": "assistant"
29
+ }
30
+ ],
31
+ "videos": [
32
+ "mllm_demo_data/4.mp4"
33
+ ],
34
+ "audios": [
35
+ "mllm_demo_data/4.mp3"
36
+ ]
37
+ },
38
+ {
39
+ "messages": [
40
+ {
41
+ "content": "<video><audio>What is this girl drawing with?",
42
+ "role": "user"
43
+ },
44
+ {
45
+ "content": "She is drawing with an iPad.",
46
+ "role": "assistant"
47
+ }
48
+ ],
49
+ "videos": [
50
+ "mllm_demo_data/4.mp4"
51
+ ],
52
+ "audios": [
53
+ "mllm_demo_data/4.mp3"
54
+ ]
55
+ }
56
+ ]
data/mllm_video_demo.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "messages": [
4
+ {
5
+ "content": "<video>Why is this video funny?",
6
+ "role": "user"
7
+ },
8
+ {
9
+ "content": "Because a baby is reading, and he is so cute!",
10
+ "role": "assistant"
11
+ }
12
+ ],
13
+ "videos": [
14
+ "mllm_demo_data/1.mp4"
15
+ ]
16
+ },
17
+ {
18
+ "messages": [
19
+ {
20
+ "content": "<video>What is she doing?",
21
+ "role": "user"
22
+ },
23
+ {
24
+ "content": "She is cooking.",
25
+ "role": "assistant"
26
+ }
27
+ ],
28
+ "videos": [
29
+ "mllm_demo_data/2.avi"
30
+ ]
31
+ },
32
+ {
33
+ "messages": [
34
+ {
35
+ "content": "<video>What's in the video?",
36
+ "role": "user"
37
+ },
38
+ {
39
+ "content": "A baby is playing in the living room.",
40
+ "role": "assistant"
41
+ }
42
+ ],
43
+ "videos": [
44
+ "mllm_demo_data/3.mp4"
45
+ ]
46
+ }
47
+ ]
data/output.jsonl ADDED
File without changes
data/v1_dpo_demo.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Abdulah Hasanagic este mândrul proprietar al AS Company din Gorazde, un orăşel situat pe malul râului Drina, lângă frontiera cu Serbia, în estul Bosniei.\n\nTranslate to English\n\nEnglish:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "Abdulah Hasanagic is the proud owner of AS Company in Gorazde, a small town located on the banks of the Drina River, near the border with Serbia, in Eastern Bosnia."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Abdulah Hasanagic este mândrul proprietar al AS Company din Gorazde, un orăşel situat pe malul râului Drina, lângă frontiera cu Serbia, în estul Bosniei.\n\nTranslate to English\n\nEnglish:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Abdulah Hasanagic is the proud owner of AS Company, a small town located on the banks of the Drina River, near the border with Serbia, in eastern Bosnia."}], "loss_weight": 1.0}]}
2
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant that follows instruction extremely well. Help as much as you can."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Answer the following question: Context: Bailey knew Taylor that well and got a few snacks for later tonight. Question: How would you describe Bailey? Which one of these answers best answers the question according to the context? A: feeling proud B: very hungry C: feeling bored\nAnswer:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "D: considerate"}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant that follows instruction extremely well. Help as much as you can."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Answer the following question: Context: Bailey knew Taylor that well and got a few snacks for later tonight. Question: How would you describe Bailey? Which one of these answers best answers the question according to the context? A: feeling proud B: very hungry C: feeling bored\nAnswer:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Based on the context, the best answer to describe Bailey would be:\n\nC: feeling bored.\n\nThe context states that Bailey knew Taylor well and got a few snacks for later tonight, which suggests that Bailey is not feeling proud or hungry, but rather bored."}], "loss_weight": 1.0}]}
3
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are a helpful assistant, who always provide explanation. Think like you are answering to a five year old."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Concepts: fall, love, relationship, thing\n\nWrite a sentence that includes all these words."}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "When you fall in love, it's like a special relationship between two people who really care about each other, and it's a wonderful thing to experience in life."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are a helpful assistant, who always provide explanation. Think like you are answering to a five year old."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Concepts: fall, love, relationship, thing\n\nWrite a sentence that includes all these words."}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Ooh, let me think! 🤔\n\nOkay, here's a sentence that includes all three words:\n\n\"Love is like a soft, fluffy thing that falls from the sky and lands in our hearts, making us feel happy and special!\" 🐰💕🐱\n\nDoes that make sense, little one? 😊"}], "loss_weight": 1.0}]}
4
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Read the text and determine if the sentence is true:\n\nCheung Kong Park () is a small garden located in the Central district of Hong Kong Island and named for Li Ka Shing's corporate empire. The park is privately maintained by Cheung Kong Holdings, but is open to the public. The park consists of ponds and cascades with benches for visitors to enjoy the scenery.\n\nSentence: Cheung Kong Park is ugly."}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "The sentence \"Cheung Kong Park is ugly\" cannot be determined as true or false from the provided text alone. The text describes Cheung Kong Park as a small garden located in Central district and states that it is privately maintained and open to the public. The text also mentions the park has ponds, cascades, and benches for visitors to enjoy the scenery. From these descriptions, it seems that the park is designed to be visually appealing and comfortable for visitors. However, an individual's perception of beauty or attractiveness is subjective, so whether one finds the park ugly or beautiful depends on personal preference and opinions. Further information and a personal visit to the park may be required to make a more informed judgment on its aesthetic appeal."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Read the text and determine if the sentence is true:\n\nCheung Kong Park () is a small garden located in the Central district of Hong Kong Island and named for Li Ka Shing's corporate empire. The park is privately maintained by Cheung Kong Holdings, but is open to the public. The park consists of ponds and cascades with benches for visitors to enjoy the scenery.\n\nSentence: Cheung Kong Park is ugly."}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Based on the information provided in the text, the sentence \"Cheung Kong Park is ugly\" is false. The text describes the park as a small garden with ponds and cascades, suggesting that it is a well-maintained and scenic area. Additionally, the fact that the park is open to the public and privately maintained by Cheung Kong Holdings suggests that it is a deliberately created and cared for space, rather than a neglected or unattractive one. Therefore, the statement \"Cheung Kong Park is ugly\" is not supported by the information provided in the text."}], "loss_weight": 1.0}]}
5
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Translate to Russian:\n\n1973 Summer Universiade\n\nRussian:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "1973 Летняя Универсиада"}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Translate to Russian:\n\n1973 Summer Universiade\n\nRussian:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Sure, I'd be happy to help! Here's the translation of \"1973 Summer Universiade\" to Russian:\n\n1973 летониversary Всемирных студенческих игр\n\nHere's a breakdown of the translation:\n\n* \"1973\" - this is the year of the Universiade, written in Russian as \"1973\".\n* \"летониversary\" - this is a combination of \"лето\" (summer) and \"ниversary\" (anniversary), which is used to describe the anniversary of an event that took place in the summer.\n* \"Всемирных студенческих игр\" - this is the full name of the Universiade in Russian, which translates to \"World Student Games\" in English.\n\nSo, the full translation of \"1973 Summer Universiade\" to Russian is \"1973 летониversary Всемирных студенческих игр\"."}], "loss_weight": 1.0}]}
6
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant that helps people find information."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Q: Claim: \"Ayn Rand spoke Spanish throughout her life, and never learned the English language.\"\nIs the claim above correct, and can it be verified by human common sense and without a web search?\nOptions:\n- yes\n- no\nChain-of-thought:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "no"}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant that helps people find information."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Q: Claim: \"Ayn Rand spoke Spanish throughout her life, and never learned the English language.\"\nIs the claim above correct, and can it be verified by human common sense and without a web search?\nOptions:\n- yes\n- no\nChain-of-thought:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " No, the claim that Ayn Rand spoke Spanish throughout her life and never learned the English language is not correct.\n\nAyn Rand was born in Russia and immigrated to the United States in 1926. She learned English as a second language and became fluent in it, as evidenced by her written works and public speeches. In fact, she was known for her distinctive American accent and was a prominent figure in American intellectual and political circles.\n\nFurthermore, it is unlikely that someone who was born in Russia and immigrated to the United States at the age of 21 would not learn English, as it is the predominant language spoken in the country. Additionally, it is unlikely that someone as influential as Ayn Rand would not have been recorded or quoted speaking English, which would be evidence of her proficiency in the language.\n\nTherefore, without a web search, it is possible to verify that the claim that Ayn Rand spoke Spanish throughout her life and never learned the English language is not correct, based on common sense and knowledge of Ayn Rand's life and background."}], "loss_weight": 1.0}]}
7
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Given the question: - sport is athletics - event is discus throw shot put - death date is 23 december 1967 - country is ita italy - birth date is 19 june 1891 - nationality is italian - club is libertas pistoia - birth place is pistoia , italy Given the details above, guess who could this information be about.\nThe answer is:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "The individual described by the information provided is Adolfo Consolini, an Italian discus thrower who achieved prominent success during his career. \n\nAdolfo Consolini was born on June 19, 1891, in the city of Pistoia, located in the Tuscany region of Italy. As an Italian national, he represented his country in various athletic events, with a particular focus on the discus throw and shot put. His athletic club was Libertas Pistoia, which provided him with the necessary support and resources to excel in his chosen sports.\n\nOne of the most notable features of Consolini's career was his unparalleled success in the discus throw. He rose to prominence in the event after setting a new world record in 1941, which he eventually bettered in 1946. Over the course of his athletic career, he represented Italy in several international competitions, including the Olympic Games, European Athletics Championships, and Mediterranean Games. Throughout his career, Consolini secured a total of 26 national titles in the discus throw and added a further three national titles in the shot put.\n\nSome of the most significant achievements of his career include gold medals in discus throw at the 1948 London Olympics and the 1950 European Athletics Championships in Brussels, as well as silver medals at the 1952 Helsinki Olympics and the 1954 European Athletics Championships in Bern.\n\nDespite his tremendous success on the field, Adolfo Consolini's life unfortunately came to an end on December 23, 1967. Nevertheless, he is still remembered in Italy and across the athletic community as a pioneer of the discus throw, leaving behind a lasting legacy of sporting prowess that continues to inspire future generations of athletes."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Given the question: - sport is athletics - event is discus throw shot put - death date is 23 december 1967 - country is ita italy - birth date is 19 june 1891 - nationality is italian - club is libertas pistoia - birth place is pistoia , italy Given the details above, guess who could this information be about.\nThe answer is:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Based on the information provided, the person who could this information be about is the Italian athlete, Giuseppe \"Joe\" Piane.\n\nHere's why:\n\n1. Sport: The sport is athletics, which matches with Piane's specialty. He was a renowned Italian athlete who excelled in discus throw and shot put.\n2. Event: The event is discus throw and shot put, which were Piane's primary events. He won numerous national and international titles in these events.\n3. Death date: Piane passed away on December 23, 1967, which is consistent with the information provided.\n4. Country: Piane was Italian, which matches the nationality provided.\n5. Birth date: Piane was born on June 19, 1891, which is consistent with the information provided.\n6. Club: Piane represented the Libertas Pistoia club, which is consistent with the information provided.\n7. Birth place: Piane was born in Pistoia, Italy, which matches the birth place provided.\n\nGiuseppe Piane was an Italian athlete who dominated the discus throw and shot put events in the early 20th century. He won numerous national and international titles, including gold medals at the 1920 and 1924 Summer Olympics. Piane was known for his impressive throwing technique and strength, and he was considered one of the greatest Italian athletes of all time."}], "loss_weight": 1.0}]}
8
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "What concepts are described in the following sentence?\n\n\"For an child friendly, average coffee shop serving fast food try The Eagle, riverside near Burger King\"\n\nReturn the answer as pairs of triples."}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "1. Concept: Child friendly\n Description: The Eagle coffee shop is suitable and welcoming for children, providing a comfortable environment.\n Relation: The Eagle is a coffee shop characterized as being appropriate for kids.\n\n2. Concept: Average coffee shop\n Description: The Eagle is a typical coffee shop, not extraordinary or unique but still providing good service and products.\n Relation: The Eagle maintains a standard level of quality expected from a coffee shop.\n\n3. Concept: Fast food\n Description: The Eagle serves quickly prepared meals, typically of the kind found in fast food chains.\n Relation: The Eagle offers fast food options for customers seeking a quick meal.\n\n4. Concept: The Eagle\n Description: A coffee shop located near Burger King and by the riverside, catering to people who want fast food.\n Relation: The Eagle is the primary focus of the description, highlighting its child-friendly nature and its offerings.\n\n5. Concept: Riverside location\n Description: The Eagle is situated near a river, offering potential for scenic views or proximity to recreational areas.\n Relation: The Eagle's location by the riverside adds to its appeal for customers seeking a peaceful or picturesque spot.\n\n6. Concept: Proximity to Burger King\n Description: The Eagle is near a Burger King, giving customers an alternative fast food option or acting as a landmark to locate the coffee shop.\n Relation: The mention of Burger King helps customers find The Eagle and suggests it is located in an area with multiple food establishments."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "What concepts are described in the following sentence?\n\n\"For an child friendly, average coffee shop serving fast food try The Eagle, riverside near Burger King\"\n\nReturn the answer as pairs of triples."}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Sure, I'd be happy to help! Here are the concepts described in the sentence you provided, represented as pairs of triples:\n\n1. Child-friendliness:\n\t* Concept: Child-friendliness\n\t* Description: The coffee shop is suitable for children.\n2. Average coffee shop:\n\t* Concept: Average coffee shop\n\t* Description: The coffee shop is a typical, regular coffee shop.\n3. Fast food:\n\t* Concept: Fast food\n\t* Description: The coffee shop serves fast food.\n4. Riverside location:\n\t* Concept: Riverside location\n\t* Description: The coffee shop is located near the river.\n5. Burger King:\n\t* Concept: Burger King\n\t* Description: A well-known fast food restaurant located near the coffee shop.\n\nI hope this helps! Let me know if you have any further questions."}], "loss_weight": 1.0}]}
9
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. Provide a detailed answer so user don’t need to search outside to understand the answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Please answer the following question: - Bats and other animals produce a high-pitched tone - The sound travels in waves, as sound does - The sound 'bounces' off of a nearby object - The sound wave returns to the bat - The bat hears the echoed sound - Folds in the bat's ear and adaptations in the bat's brain enable it to determine the size, shape, and position of the other object via the properties of the returned sound waves What might be the last step of the process?\nA:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "The last step of the process is: The bat uses the interpreted information from the echoed sound waves to navigate and locate objects (such as prey or obstacles) in its environment, allowing it to maneuver effectively and safely even in complete darkness. This entire process is called echolocation."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You are an AI assistant. Provide a detailed answer so user don’t need to search outside to understand the answer."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Please answer the following question: - Bats and other animals produce a high-pitched tone - The sound travels in waves, as sound does - The sound 'bounces' off of a nearby object - The sound wave returns to the bat - The bat hears the echoed sound - Folds in the bat's ear and adaptations in the bat's brain enable it to determine the size, shape, and position of the other object via the properties of the returned sound waves What might be the last step of the process?\nA:"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Sure, I'd be happy to help! Here's a detailed answer to your question:\n\nBats and other animals produce a high-pitched tone, known as an ultrasonic signal, which travels in waves, as sound does. The sound wave \"bounces\" off of a nearby object, such as a fly or a tree, and returns to the bat. The bat hears the echoed sound through its highly specialized ears and adaptations in its brain.\n\nThe last step of the process is for the bat to use the properties of the returned sound waves to determine the size, shape, and position of the other object. This is done through a process called echolocation.\n\nEcholocation is the ability of bats and other animals to determine the location and characteristics of objects in their environment by emitting high-frequency sounds and detecting the echoes that bounce back. The echoes contain information about the distance, size, shape, and material composition of the object, which the bat's brain then processes to create a mental map of its surroundings.\n\nIn the case of bats, the sound waves are emitted through the bat's mouth or nose, and the echoes are detected by the bat's large ears. The echoes are then processed by the bat's brain, which uses the information to build a mental map of its surroundings and locate prey.\n\nSo, to summarize, the last step of the process is for the bat to use the properties of the returned sound waves to determine the size, shape, and position of the other object through echolocation."}], "loss_weight": 1.0}]}
10
+ {"chosen_messages": [{"role": "system", "content": [{"type": "text", "value": "You should describe the task and explain your answer. While answering a multiple choice question, first output the correct answer(s). Then explain why other answers are wrong. Think like you are answering to a five year old."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Iwasaki's careful respect for the Long Beach program and its lawyers earned him the political capital he needed to complete his takeover in a matter of weeks. \"The Long Beach program had strong support in the community so in a situation like that, one has to recognize that it's not like a takeover where I have all the answers and I know best,\" Iwasaki said. \"The people in the community who are working there have the contacts and the knowledge that will allow service to continue.\" Things have gone less smoothly across town. There, Dudovitz, a longtime poverty lawyer and executive director of the San Fernando Valley's 36-year-old legal aid program, continues to struggle with his hostile takeover of the neighboring San Gabriel-Pomona Valleys service area one year after it was accomplished. On the bright side, Dudovitz has extended his respected program to clients in the San Gabriel-Pomona Valley, and he now operates on a much larger budget, $6.5 million last year. However, his clash with the old San Gabriel program resulted in litigation, bitter feelings and a mission that some say is not clearly focused on serving poor people. \"It was a difficult situation that was probably mishandled by everyone,\" a longtime observer of the public interest community said of the San Fernando Valley-San Gabriel-Pomona Valley merger. \"There are very few people who come out as the heroes. Personalities got involved when they shouldn't have. Things were said that caused bad feelings and couldn't be unsaid.\" Iwasaki's merger with the smaller, 48-year-old Long Beach program was friendly and fast, and no one - not even Long Beach board members - lost a job. When it was over, Iwasaki had $1 million more in federal dollars and two new offices. Long Beach clients regained services they had lost years ago when federal budget cuts and dwindling grants reduced the staff of 15 lawyers to five and cut immigration and consumer law programs. Iwasaki said, \"[I judged the transition] better than I could have hoped for.\" \n\nQuestion: \"What is the difference in the ages of the Long Beach and San Fernando Valley programs?\"\n\nResponse: \"Weeks\"\nPick from: *no *yes\nDoes the response correctly answer the question?\n\n"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": "No\n\nThe response does not correctly answer the question. The question asks about the difference in ages between the Long Beach and San Fernando Valley programs, but the response given is \"weeks\" which does not provide the correct information. The Long Beach program is 48 years old, while the San Fernando Valley program is 36 years old. The difference in ages between these two programs is 12 years."}], "loss_weight": 1.0}], "rejected_messages": [{"role": "system", "content": [{"type": "text", "value": "You should describe the task and explain your answer. While answering a multiple choice question, first output the correct answer(s). Then explain why other answers are wrong. Think like you are answering to a five year old."}], "loss_weight": 0.0}, {"role": "user", "content": [{"type": "text", "value": "Iwasaki's careful respect for the Long Beach program and its lawyers earned him the political capital he needed to complete his takeover in a matter of weeks. \"The Long Beach program had strong support in the community so in a situation like that, one has to recognize that it's not like a takeover where I have all the answers and I know best,\" Iwasaki said. \"The people in the community who are working there have the contacts and the knowledge that will allow service to continue.\" Things have gone less smoothly across town. There, Dudovitz, a longtime poverty lawyer and executive director of the San Fernando Valley's 36-year-old legal aid program, continues to struggle with his hostile takeover of the neighboring San Gabriel-Pomona Valleys service area one year after it was accomplished. On the bright side, Dudovitz has extended his respected program to clients in the San Gabriel-Pomona Valley, and he now operates on a much larger budget, $6.5 million last year. However, his clash with the old San Gabriel program resulted in litigation, bitter feelings and a mission that some say is not clearly focused on serving poor people. \"It was a difficult situation that was probably mishandled by everyone,\" a longtime observer of the public interest community said of the San Fernando Valley-San Gabriel-Pomona Valley merger. \"There are very few people who come out as the heroes. Personalities got involved when they shouldn't have. Things were said that caused bad feelings and couldn't be unsaid.\" Iwasaki's merger with the smaller, 48-year-old Long Beach program was friendly and fast, and no one - not even Long Beach board members - lost a job. When it was over, Iwasaki had $1 million more in federal dollars and two new offices. Long Beach clients regained services they had lost years ago when federal budget cuts and dwindling grants reduced the staff of 15 lawyers to five and cut immigration and consumer law programs. Iwasaki said, \"[I judged the transition] better than I could have hoped for.\" \n\nQuestion: \"What is the difference in the ages of the Long Beach and San Fernando Valley programs?\"\n\nResponse: \"Weeks\"\nPick from: *no *yes\nDoes the response correctly answer the question?\n\n"}], "loss_weight": 0.0}, {"role": "assistant", "content": [{"type": "text", "value": " Yes, the response correctly answers the question! 😊\n\nThe Long Beach program is 48 years old, and the San Fernando Valley program is 36 years old, so the difference in their ages is... *drumroll* ...weeks! 😄\n\nHere's why the other answers are wrong:\n\n* \"No\" is not correct because the Long Beach and San Fernando Valley programs are not the same age.\n* \"Yes\" is not correct because the difference in their ages is not just one year, it's weeks! 😄\n\nSo, the correct answer is \"weeks\"! 🎉"}], "loss_weight": 1.0}]}
data/v1_dpo_demo.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ dpo_zh_demo:
2
+ path: HuggingFaceH4/orca_dpo_pairs
3
+ split: train_prefs
4
+ converter: pair
data/v1_sft_demo.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ identity:
2
+ path: data/identity.json
3
+ source: local
4
+ converter: alpaca
5
+ alpaca_en_demo:
6
+ path: data/alpaca_en_demo.json
7
+ source: local
8
+ converter: alpaca
9
+ size: 500
examples/accelerate/fsdp2_config.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ compute_environment: LOCAL_MACHINE
2
+ debug: false
3
+ distributed_type: FSDP
4
+ downcast_bf16: 'no'
5
+ fsdp_config:
6
+ fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
7
+ fsdp_cpu_ram_efficient_loading: true
8
+ fsdp_offload_params: false
9
+ fsdp_reshard_after_forward: true
10
+ fsdp_state_dict_type: FULL_STATE_DICT
11
+ fsdp_version: 2
12
+ machine_rank: 0
13
+ main_training_function: main
14
+ mixed_precision: bf16 # or fp16
15
+ num_machines: 1 # the number of nodes
16
+ num_processes: 2 # the number of GPUs in all nodes
17
+ rdzv_backend: static
18
+ same_network: true
19
+ tpu_env: []
20
+ tpu_use_cluster: false
21
+ tpu_use_sudo: false
22
+ use_cpu: false
examples/accelerate/fsdp_config.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ compute_environment: LOCAL_MACHINE
2
+ debug: false
3
+ distributed_type: FSDP
4
+ downcast_bf16: 'no'
5
+ fsdp_config:
6
+ fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
7
+ fsdp_backward_prefetch: BACKWARD_PRE
8
+ fsdp_forward_prefetch: false
9
+ fsdp_cpu_ram_efficient_loading: true
10
+ fsdp_offload_params: false
11
+ fsdp_sharding_strategy: FULL_SHARD
12
+ fsdp_state_dict_type: FULL_STATE_DICT
13
+ fsdp_sync_module_states: true
14
+ fsdp_use_orig_params: true
15
+ machine_rank: 0
16
+ main_training_function: main
17
+ mixed_precision: bf16 # or fp16
18
+ num_machines: 1 # the number of nodes
19
+ num_processes: 2 # the number of GPUs in all nodes
20
+ rdzv_backend: static
21
+ same_network: true
22
+ tpu_env: []
23
+ tpu_use_cluster: false
24
+ tpu_use_sudo: false
25
+ use_cpu: false
examples/accelerate/fsdp_config_multiple_nodes.yaml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # If you want to run this example on multiple nodes, you need to set the following parameters:
2
+ # - num_machines: the number of nodes
3
+ # - num_processes: the number of GPUs in all nodes, num_machines * num_processes_per_machine
4
+ # - main_process_ip: the IP address of the main process, please keep it the same across all nodes
5
+ # - main_process_port: the port of all nodes, please keep it the same across all nodes
6
+ # - machine_rank: the rank of the current machine, starting from 0, and it should be 0 for main_process_ip
7
+
8
+ compute_environment: LOCAL_MACHINE
9
+ debug: false
10
+ distributed_type: FSDP
11
+ downcast_bf16: 'no'
12
+ fsdp_config:
13
+ fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
14
+ fsdp_backward_prefetch: BACKWARD_PRE
15
+ fsdp_forward_prefetch: false
16
+ fsdp_cpu_ram_efficient_loading: true
17
+ fsdp_offload_params: false
18
+ fsdp_sharding_strategy: FULL_SHARD
19
+ fsdp_state_dict_type: FULL_STATE_DICT
20
+ fsdp_sync_module_states: true
21
+ fsdp_use_orig_params: true
22
+ machine_rank: 0
23
+ main_training_function: main
24
+ mixed_precision: bf16 # or fp16
25
+ main_process_ip: 192.168.0.1
26
+ main_process_port: 29500
27
+ num_machines: 2 # the number of nodes
28
+ num_processes: 16 # the number of GPUs in all nodes, num_machines * num_processes_per_machine
29
+ rdzv_backend: static
30
+ same_network: true
31
+ tpu_env: []
32
+ tpu_use_cluster: false
33
+ tpu_use_sudo: false
34
+ use_cpu: false
examples/accelerate/fsdp_config_offload.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ compute_environment: LOCAL_MACHINE
2
+ debug: false
3
+ distributed_type: FSDP
4
+ downcast_bf16: 'no'
5
+ fsdp_config:
6
+ fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
7
+ fsdp_backward_prefetch: BACKWARD_PRE
8
+ fsdp_forward_prefetch: false
9
+ fsdp_cpu_ram_efficient_loading: true
10
+ fsdp_offload_params: true # offload may affect training speed
11
+ fsdp_sharding_strategy: FULL_SHARD
12
+ fsdp_state_dict_type: FULL_STATE_DICT
13
+ fsdp_sync_module_states: true
14
+ fsdp_use_orig_params: true
15
+ machine_rank: 0
16
+ main_training_function: main
17
+ mixed_precision: bf16 # or fp16
18
+ num_machines: 1 # the number of nodes
19
+ num_processes: 2 # the number of GPUs in all nodes
20
+ rdzv_backend: static
21
+ same_network: true
22
+ tpu_env: []
23
+ tpu_use_cluster: false
24
+ tpu_use_sudo: false
25
+ use_cpu: false
examples/ascend/qwen3_full_sft_fsdp2.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Start FSDP2 fine-tuning
2
+ # accelerate launch \
3
+ # --config_file examples/accelerate/fsdp2_config.yaml \
4
+ # src/train.py examples/ascend/qwen3_full_sft_fsdp2.yaml
5
+ # Change `num_processes` in fsdp2_config.yaml to 16 in A3
6
+
7
+ ### model
8
+ model_name_or_path: Qwen/Qwen3-8B
9
+ trust_remote_code: true
10
+ use_v1_kernels: true
11
+ flash_attn: fa2
12
+
13
+ ### method
14
+ stage: sft
15
+ do_train: true
16
+ finetuning_type: full
17
+
18
+ ### dataset
19
+ dataset: alpaca_en_demo
20
+ template: qwen3
21
+ cutoff_len: 2048
22
+ max_samples: 1000
23
+ overwrite_cache: true
24
+ preprocessing_num_workers: 16
25
+ dataloader_num_workers: 4
26
+
27
+ ### output
28
+ output_dir: saves/Qwen3-8B/full/sft
29
+ logging_steps: 1
30
+ save_steps: 500
31
+ max_steps: 500
32
+ plot_loss: true
33
+ overwrite_output_dir: true
34
+ save_only_model: false
35
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
36
+
37
+ ### train
38
+ per_device_train_batch_size: 8
39
+ gradient_accumulation_steps: 1
40
+ learning_rate: 1.0e-5
41
+ lr_scheduler_type: cosine
42
+ warmup_ratio: 0.1
43
+ bf16: true
44
+ ddp_timeout: 1800
45
+ resume_from_checkpoint: null
examples/ascend/qwen3moe_full_sft_fsdp.yaml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Start FSDP fine-tuning
2
+ # accelerate launch \
3
+ # --config_file examples/accelerate/fsdp_config.yaml \
4
+ # src/train.py examples/ascend/qwen3moe_full_sft_fsdp.yaml
5
+ # Change `num_processes` in fsdp_config.yaml to 16 in A3
6
+
7
+ ### model
8
+ model_name_or_path: Qwen/Qwen3-30B-A3B-Instruct-2507
9
+ trust_remote_code: true
10
+ use_v1_kernels: true
11
+ flash_attn: fa2
12
+
13
+ ### method
14
+ stage: sft
15
+ do_train: true
16
+ finetuning_type: full
17
+ disable_gradient_checkpointing: false
18
+
19
+ ### dataset
20
+ dataset: alpaca_zh
21
+ template: qwen3
22
+ cutoff_len: 1024
23
+ overwrite_cache: true
24
+ preprocessing_num_workers: 16
25
+ dataloader_num_workers: 4
26
+
27
+ ### output
28
+ output_dir: saves/Qwen3-30B-A3B-Instruct-2507/full/sft
29
+ logging_steps: 1
30
+ save_steps: 500
31
+ max_steps: 500
32
+ plot_loss: true
33
+ overwrite_output_dir: true
34
+ save_only_model: true
35
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
36
+
37
+ ### train
38
+ per_device_train_batch_size: 4
39
+ gradient_accumulation_steps: 1
40
+ learning_rate: 1.0e-4
41
+ lr_scheduler_type: cosine
42
+ warmup_ratio: 0.1
43
+ bf16: true
44
+ ddp_timeout: 180000000
45
+ resume_from_checkpoint: null
46
+ seed: 1234
examples/ascend/qwen3vlmoe_full_sft_fsdp2.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Start FSDP2 fine-tuning
2
+ # accelerate launch \
3
+ # --config_file examples/accelerate/fsdp2_config.yaml \
4
+ # src/train.py examples/ascend/qwen3vlmoe_full_sft_fsdp2.yaml
5
+ # Change `num_processes` in fsdp2_config.yaml to 16 in A3
6
+
7
+ ### model
8
+ model_name_or_path: Qwen/Qwen3-VL-30B-A3B-Instruct
9
+ image_max_pixels: 262144
10
+ video_max_pixels: 16384
11
+ trust_remote_code: true
12
+ use_v1_kernels: true
13
+ flash_attn: fa2
14
+
15
+ ### method
16
+ stage: sft
17
+ do_train: true
18
+ finetuning_type: full
19
+ disable_gradient_checkpointing: false
20
+
21
+ ### dataset
22
+ dataset: llava_1k_en, llava_1k_zh
23
+ template: qwen3_vl
24
+ cutoff_len: 1024
25
+ overwrite_cache: true
26
+ preprocessing_num_workers: 16
27
+ dataloader_num_workers: 4
28
+
29
+ ### output
30
+ output_dir: saves/Qwen3-VL-30B-A3B-Instruct/full/sft
31
+ logging_steps: 1
32
+ save_steps: 500
33
+ max_steps: 500
34
+ plot_loss: true
35
+ overwrite_output_dir: true
36
+ save_only_model: true
37
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
38
+
39
+ ### train
40
+ per_device_train_batch_size: 2
41
+ gradient_accumulation_steps: 1
42
+ learning_rate: 1.0e-4
43
+ lr_scheduler_type: cosine
44
+ warmup_ratio: 0.1
45
+ bf16: true
46
+ ddp_timeout: 180000000
47
+ resume_from_checkpoint: null
48
+ seed: 1234
examples/ascend/qwen3vlmoe_lora_sft_fsdp.yaml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: Qwen/Qwen3-VL-30B-A3B-Instruct
3
+ image_max_pixels: 262144
4
+ video_max_pixels: 16384
5
+ trust_remote_code: true
6
+ use_v1_kernels: true # replaced kernels: [NpuRMSNormKernel, NpuRoPEKernel, NpuQwen3VLMoEFusedMoEKernel]
7
+
8
+ ### method
9
+ stage: sft
10
+ do_train: true
11
+ finetuning_type: lora
12
+ lora_rank: 8
13
+ lora_target: all
14
+ disable_gradient_checkpointing: false
15
+ flash_attn: disabled
16
+
17
+ ### dataset
18
+ dataset: alpaca_zh_demo, alpaca_en_demo
19
+ template: qwen3_vl
20
+ cutoff_len: 1024
21
+ overwrite_cache: true
22
+ preprocessing_num_workers: 16
23
+ dataloader_num_workers: 4
24
+
25
+ ### output
26
+ output_dir: saves/qwen3vlmoe/lora/sft
27
+ logging_steps: 1
28
+ plot_loss: true
29
+ overwrite_output_dir: true
30
+ save_only_model: true
31
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
32
+
33
+ ### train
34
+ per_device_train_batch_size: 8
35
+ gradient_accumulation_steps: 1
36
+ learning_rate: 1.0e-4
37
+ lr_scheduler_type: cosine
38
+ warmup_ratio: 0.1
39
+ bf16: true
40
+ ddp_timeout: 180000000
41
+ resume_from_checkpoint: null
42
+ seed: 1234
examples/deepspeed/ds_z0_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_batch_size": "auto",
3
+ "train_micro_batch_size_per_gpu": "auto",
4
+ "gradient_accumulation_steps": "auto",
5
+ "gradient_clipping": "auto",
6
+ "zero_allow_untested_optimizer": true,
7
+ "fp16": {
8
+ "enabled": "auto",
9
+ "loss_scale": 0,
10
+ "loss_scale_window": 1000,
11
+ "initial_scale_power": 16,
12
+ "hysteresis": 2,
13
+ "min_loss_scale": 1
14
+ },
15
+ "bf16": {
16
+ "enabled": "auto"
17
+ },
18
+ "zero_optimization": {
19
+ "stage": 0,
20
+ "allgather_partitions": true,
21
+ "allgather_bucket_size": 5e8,
22
+ "overlap_comm": false,
23
+ "reduce_scatter": true,
24
+ "reduce_bucket_size": 5e8,
25
+ "contiguous_gradients": true,
26
+ "round_robin_gradients": true
27
+ }
28
+ }
examples/deepspeed/ds_z2_autotp_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_comment": "suooprted model list: https://www.deepspeed.ai/tutorials/automatic-tensor-parallelism/#supported-models",
3
+ "train_batch_size": "auto",
4
+ "train_micro_batch_size_per_gpu": "auto",
5
+ "gradient_accumulation_steps": "auto",
6
+ "gradient_clipping": "auto",
7
+ "zero_allow_untested_optimizer": true,
8
+ "fp16": {
9
+ "enabled": "auto",
10
+ "loss_scale": 0,
11
+ "loss_scale_window": 1000,
12
+ "initial_scale_power": 16,
13
+ "hysteresis": 2,
14
+ "min_loss_scale": 1
15
+ },
16
+ "bf16": {
17
+ "enabled": "auto"
18
+ },
19
+ "zero_optimization": {
20
+ "stage": 2,
21
+ "allgather_partitions": true,
22
+ "allgather_bucket_size": 5e8,
23
+ "overlap_comm": false,
24
+ "reduce_scatter": true,
25
+ "reduce_bucket_size": 5e8,
26
+ "contiguous_gradients": true,
27
+ "round_robin_gradients": true
28
+ },
29
+ "tensor_parallel": {
30
+ "autotp_size": 2
31
+ }
32
+ }
examples/deepspeed/ds_z2_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_batch_size": "auto",
3
+ "train_micro_batch_size_per_gpu": "auto",
4
+ "gradient_accumulation_steps": "auto",
5
+ "gradient_clipping": "auto",
6
+ "zero_allow_untested_optimizer": true,
7
+ "fp16": {
8
+ "enabled": "auto",
9
+ "loss_scale": 0,
10
+ "loss_scale_window": 1000,
11
+ "initial_scale_power": 16,
12
+ "hysteresis": 2,
13
+ "min_loss_scale": 1
14
+ },
15
+ "bf16": {
16
+ "enabled": "auto"
17
+ },
18
+ "zero_optimization": {
19
+ "stage": 2,
20
+ "allgather_partitions": true,
21
+ "allgather_bucket_size": 5e8,
22
+ "overlap_comm": false,
23
+ "reduce_scatter": true,
24
+ "reduce_bucket_size": 5e8,
25
+ "contiguous_gradients": true,
26
+ "round_robin_gradients": true
27
+ }
28
+ }
examples/deepspeed/ds_z2_offload_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_batch_size": "auto",
3
+ "train_micro_batch_size_per_gpu": "auto",
4
+ "gradient_accumulation_steps": "auto",
5
+ "gradient_clipping": "auto",
6
+ "zero_allow_untested_optimizer": true,
7
+ "fp16": {
8
+ "enabled": "auto",
9
+ "loss_scale": 0,
10
+ "loss_scale_window": 1000,
11
+ "initial_scale_power": 16,
12
+ "hysteresis": 2,
13
+ "min_loss_scale": 1
14
+ },
15
+ "bf16": {
16
+ "enabled": "auto"
17
+ },
18
+ "zero_optimization": {
19
+ "stage": 2,
20
+ "offload_optimizer": {
21
+ "device": "cpu",
22
+ "pin_memory": true
23
+ },
24
+ "allgather_partitions": true,
25
+ "allgather_bucket_size": 5e8,
26
+ "overlap_comm": false,
27
+ "reduce_scatter": true,
28
+ "reduce_bucket_size": 5e8,
29
+ "contiguous_gradients": true,
30
+ "round_robin_gradients": true
31
+ }
32
+ }
examples/deepspeed/ds_z3_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_batch_size": "auto",
3
+ "train_micro_batch_size_per_gpu": "auto",
4
+ "gradient_accumulation_steps": "auto",
5
+ "gradient_clipping": "auto",
6
+ "zero_allow_untested_optimizer": true,
7
+ "fp16": {
8
+ "enabled": "auto",
9
+ "loss_scale": 0,
10
+ "loss_scale_window": 1000,
11
+ "initial_scale_power": 16,
12
+ "hysteresis": 2,
13
+ "min_loss_scale": 1
14
+ },
15
+ "bf16": {
16
+ "enabled": "auto"
17
+ },
18
+ "zero_optimization": {
19
+ "stage": 3,
20
+ "overlap_comm": false,
21
+ "contiguous_gradients": true,
22
+ "sub_group_size": 1e9,
23
+ "reduce_bucket_size": "auto",
24
+ "stage3_prefetch_bucket_size": "auto",
25
+ "stage3_param_persistence_threshold": "auto",
26
+ "stage3_max_live_parameters": 1e9,
27
+ "stage3_max_reuse_distance": 1e9,
28
+ "stage3_gather_16bit_weights_on_model_save": true
29
+ }
30
+ }
examples/deepspeed/ds_z3_fp8_config.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_micro_batch_size_per_gpu": "auto",
3
+ "gradient_clipping": "auto",
4
+ "zero_allow_untested_optimizer": true,
5
+ "zero_force_ds_cpu_optimizer": true,
6
+ "fp16": {
7
+ "enabled": false,
8
+ "loss_scale": 0,
9
+ "loss_scale_window": 1000,
10
+ "initial_scale_power": 16,
11
+ "hysteresis": 2,
12
+ "min_loss_scale": 1
13
+ },
14
+ "bf16": {
15
+ "enabled": "auto"
16
+ },
17
+ "zero_optimization": {
18
+ "stage": 3,
19
+ "offload_optimizer": {
20
+ "device": "cpu",
21
+ "pin_memory": false
22
+ },
23
+ "overlap_comm": false,
24
+ "contiguous_gradients": true,
25
+ "sub_group_size": 1000000000,
26
+ "reduce_bucket_size": 12845056,
27
+ "stage3_prefetch_bucket_size": 11560550,
28
+ "stage3_param_persistence_threshold": 35840,
29
+ "stage3_max_live_parameters": 1000000000,
30
+ "stage3_max_reuse_distance": 1000000000,
31
+ "stage3_gather_16bit_weights_on_model_save": true
32
+ },
33
+ "steps_per_print": 10000000,
34
+ "gradient_accumulation_steps": "auto",
35
+ "comms_config": {
36
+ "verbose": false
37
+ },
38
+ "monitor_config": {
39
+ "enabled": true,
40
+ "tag": "DeepSpeedMonitor",
41
+ "csv_monitor": {
42
+ "enabled": false
43
+ }
44
+ }
45
+ }
examples/deepspeed/ds_z3_offload_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_batch_size": "auto",
3
+ "train_micro_batch_size_per_gpu": "auto",
4
+ "gradient_accumulation_steps": "auto",
5
+ "gradient_clipping": "auto",
6
+ "zero_allow_untested_optimizer": true,
7
+ "fp16": {
8
+ "enabled": "auto",
9
+ "loss_scale": 0,
10
+ "loss_scale_window": 1000,
11
+ "initial_scale_power": 16,
12
+ "hysteresis": 2,
13
+ "min_loss_scale": 1
14
+ },
15
+ "bf16": {
16
+ "enabled": "auto"
17
+ },
18
+ "zero_optimization": {
19
+ "stage": 3,
20
+ "offload_optimizer": {
21
+ "device": "cpu",
22
+ "pin_memory": true
23
+ },
24
+ "offload_param": {
25
+ "device": "cpu",
26
+ "pin_memory": true
27
+ },
28
+ "overlap_comm": false,
29
+ "contiguous_gradients": true,
30
+ "sub_group_size": 1e9,
31
+ "reduce_bucket_size": "auto",
32
+ "stage3_prefetch_bucket_size": "auto",
33
+ "stage3_param_persistence_threshold": "auto",
34
+ "stage3_max_live_parameters": 1e9,
35
+ "stage3_max_reuse_distance": 1e9,
36
+ "stage3_gather_16bit_weights_on_model_save": true
37
+ }
38
+ }
examples/extras/adam_mini/qwen2_full_sft.yaml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: Qwen/Qwen2-1.5B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_adam_mini: true
10
+
11
+ ### dataset
12
+ dataset: identity,alpaca_en_demo
13
+ template: qwen
14
+ cutoff_len: 2048
15
+ max_samples: 1000
16
+ overwrite_cache: true
17
+ preprocessing_num_workers: 16
18
+ dataloader_num_workers: 4
19
+
20
+ ### output
21
+ output_dir: saves/qwen2-1_5b/full/sft
22
+ logging_steps: 10
23
+ save_steps: 500
24
+ plot_loss: true
25
+ overwrite_output_dir: true
26
+ save_only_model: false
27
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
28
+
29
+ ### train
30
+ per_device_train_batch_size: 1
31
+ gradient_accumulation_steps: 8
32
+ learning_rate: 1.0e-5
33
+ num_train_epochs: 3.0
34
+ lr_scheduler_type: cosine
35
+ warmup_ratio: 0.1
36
+ bf16: true
37
+ ddp_timeout: 180000000
38
+
39
+ ### eval
40
+ # val_size: 0.1
41
+ # per_device_eval_batch_size: 1
42
+ # eval_strategy: steps
43
+ # eval_steps: 500
examples/extras/apollo/llama3_full_sft.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_apollo: true
10
+ apollo_layerwise: true # choices: [true, false], use false for DDP training
11
+ apollo_target: all
12
+ apollo_rank: 128
13
+ apollo_scale: 32.0
14
+ apollo_scale_type: channel
15
+
16
+ ### dataset
17
+ dataset: identity,alpaca_en_demo
18
+ template: llama3
19
+ cutoff_len: 2048
20
+ max_samples: 1000
21
+ overwrite_cache: true
22
+ preprocessing_num_workers: 16
23
+ dataloader_num_workers: 4
24
+
25
+ ### output
26
+ output_dir: saves/llama3-8b/full/sft
27
+ logging_steps: 10
28
+ save_steps: 500
29
+ plot_loss: true
30
+ overwrite_output_dir: true
31
+ save_only_model: false
32
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
33
+
34
+ ### train
35
+ per_device_train_batch_size: 1
36
+ gradient_accumulation_steps: 1 # use 1 for layerwise apollo
37
+ learning_rate: 1.0e-5
38
+ num_train_epochs: 3.0
39
+ lr_scheduler_type: cosine
40
+ warmup_ratio: 0.1
41
+ pure_bf16: true
42
+ ddp_timeout: 180000000
43
+
44
+ ### eval
45
+ # val_size: 0.1
46
+ # per_device_eval_batch_size: 1
47
+ # eval_strategy: steps
48
+ # eval_steps: 500
examples/extras/asft/llama2_full_asft.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: models/Llama-2-7b
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ deepspeed: examples/deepspeed/ds_z0_config.json
10
+ use_asft_loss: true
11
+ asft_alpha: 0.1
12
+
13
+ ### dataset
14
+ dataset: med
15
+ template: llama2
16
+ cutoff_len: 2048
17
+ max_samples: 10000
18
+ overwrite_cache: true
19
+ preprocessing_num_workers: 16
20
+ dataloader_num_workers: 4
21
+
22
+ ### output
23
+ output_dir: saves/llama2-7b/full/asft2
24
+ logging_steps: 1
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+ save_only_model: false
29
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
30
+
31
+ ### train
32
+ per_device_train_batch_size: 4
33
+ gradient_accumulation_steps: 8
34
+ learning_rate: 2.0e-5
35
+ num_train_epochs: 3.0
36
+ lr_scheduler_type: cosine
37
+ warmup_ratio: 0.1
38
+ bf16: true
39
+ ddp_timeout: 180000000
40
+
41
+ ### eval
42
+ # val_size: 0.1
43
+ # per_device_eval_batch_size: 1
44
+ # eval_strategy: steps
45
+ # eval_steps: 500
examples/extras/asft/qwen2_full_asft.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: models/Qwen2.5-7B
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ deepspeed: examples/deepspeed/ds_z0_config.json
10
+ use_asft_loss: true
11
+ asft_alpha: 0.05
12
+
13
+ ### dataset
14
+ dataset: math
15
+ template: qwen
16
+ cutoff_len: 2048
17
+ max_samples: 10000
18
+ overwrite_cache: true
19
+ preprocessing_num_workers: 16
20
+ dataloader_num_workers: 4
21
+
22
+ ### output
23
+ output_dir: saves/qwen2-7b/full/asft
24
+ logging_steps: 10
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+ save_only_model: false
29
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
30
+
31
+ ### train
32
+ per_device_train_batch_size: 4
33
+ gradient_accumulation_steps: 8
34
+ learning_rate: 5.0e-5
35
+ num_train_epochs: 1.0
36
+ lr_scheduler_type: cosine
37
+ warmup_ratio: 0.1
38
+ bf16: true
39
+ ddp_timeout: 180000000
40
+
41
+ ### eval
42
+ # val_size: 0.1
43
+ # per_device_eval_batch_size: 1
44
+ # eval_strategy: steps
45
+ # eval_steps: 500
examples/extras/badam/llama3_full_sft.yaml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_badam: true
10
+ badam_mode: layer
11
+ badam_switch_mode: ascending
12
+ badam_switch_interval: 50
13
+ badam_verbose: 2
14
+ # deepspeed: examples/deepspeed/ds_z3_config.json
15
+
16
+ ### dataset
17
+ dataset: identity,alpaca_en_demo
18
+ template: llama3
19
+ cutoff_len: 2048
20
+ max_samples: 1000
21
+ overwrite_cache: true
22
+ preprocessing_num_workers: 16
23
+ dataloader_num_workers: 4
24
+
25
+ ### output
26
+ output_dir: saves/llama3-8b/full/sft
27
+ logging_steps: 10
28
+ save_steps: 500
29
+ plot_loss: true
30
+ overwrite_output_dir: true
31
+ save_only_model: false
32
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
33
+
34
+ ### train
35
+ per_device_train_batch_size: 1
36
+ gradient_accumulation_steps: 8
37
+ learning_rate: 1.0e-5
38
+ num_train_epochs: 3.0
39
+ lr_scheduler_type: cosine
40
+ warmup_ratio: 0.1
41
+
42
+ ### eval
43
+ # val_size: 0.1
44
+ # per_device_eval_batch_size: 1
45
+ # eval_strategy: steps
46
+ # eval_steps: 500
examples/extras/dft/qwen2_full_sft.yaml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: Qwen/Qwen2-1.5B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_dft_loss: true
10
+
11
+ ### dataset
12
+ dataset: identity,alpaca_en_demo
13
+ template: qwen
14
+ cutoff_len: 2048
15
+ max_samples: 1000
16
+ overwrite_cache: true
17
+ preprocessing_num_workers: 16
18
+ dataloader_num_workers: 4
19
+
20
+ ### output
21
+ output_dir: saves/qwen2-1_5b/full/sft
22
+ logging_steps: 10
23
+ save_steps: 500
24
+ plot_loss: true
25
+ overwrite_output_dir: true
26
+ save_only_model: false
27
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
28
+
29
+ ### train
30
+ per_device_train_batch_size: 1
31
+ gradient_accumulation_steps: 8
32
+ learning_rate: 1.0e-5
33
+ num_train_epochs: 3.0
34
+ lr_scheduler_type: cosine
35
+ warmup_ratio: 0.1
36
+ bf16: true
37
+ ddp_timeout: 180000000
38
+
39
+ ### eval
40
+ # val_size: 0.1
41
+ # per_device_eval_batch_size: 1
42
+ # eval_strategy: steps
43
+ # eval_steps: 500
examples/extras/eaft/qwen25_05b_eaft_full.yaml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: Qwen/Qwen2.5-0.5B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_eaft_loss: true
10
+
11
+ ### dataset
12
+ dataset: identity,alpaca_en_demo
13
+ template: qwen
14
+ cutoff_len: 2048
15
+ max_samples: 1000
16
+ overwrite_cache: true
17
+ preprocessing_num_workers: 16
18
+ dataloader_num_workers: 4
19
+
20
+ ### output
21
+ output_dir: qwen2.5-0_5b/full/sft_eaft
22
+ logging_steps: 1
23
+ save_steps: 500
24
+ plot_loss: true
25
+ overwrite_output_dir: true
26
+ save_only_model: false
27
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
28
+
29
+
30
+ ### train
31
+ per_device_train_batch_size: 2
32
+ gradient_accumulation_steps: 8
33
+ learning_rate: 1.0e-5
34
+ num_train_epochs: 3.0
35
+ lr_scheduler_type: cosine
36
+ warmup_ratio: 0.1
37
+ bf16: true
38
+ ddp_timeout: 180000000
examples/extras/fp8/llama3_fp8_deepspeed_sft.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FP8 training example with DeepSpeed ZeRO-3
2
+ # This config demonstrates FP8 mixed precision training using HuggingFace Accelerate
3
+ # with DeepSpeed providing memory optimization (not FP8 handling)
4
+
5
+ ### Model configuration
6
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
7
+ trust_remote_code: true
8
+
9
+ ### Method configuration
10
+ stage: sft
11
+ do_train: true
12
+ finetuning_type: full
13
+
14
+ ### Dataset configuration
15
+ dataset: identity
16
+ template: llama3
17
+ cutoff_len: 1024
18
+ max_samples: 1000
19
+ overwrite_cache: true
20
+ preprocessing_num_workers: 16
21
+
22
+ ### Output configuration
23
+ output_dir: saves/llama3-8b/fp8-deepspeed/sft
24
+ logging_steps: 10
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+
29
+ ### Training configuration
30
+ per_device_train_batch_size: 1
31
+ gradient_accumulation_steps: 8
32
+ learning_rate: 5.0e-5
33
+ num_train_epochs: 3.0
34
+ lr_scheduler_type: cosine
35
+ warmup_ratio: 0.1
36
+ bf16: true
37
+
38
+ ### FP8 configuration
39
+ fp8: true
40
+ fp8_backend: torchao # Use TorchAO backend for FP8
41
+ fp8_enable_fsdp_float8_all_gather: false # Not used with DeepSpeed
42
+
43
+ ### DeepSpeed configuration
44
+ deepspeed: examples/deepspeed/ds_z3_fp8_config.json
45
+
46
+ ### Logging configuration
47
+ report_to: wandb
48
+ run_name: llama3_fp8_deepspeed_sft
examples/extras/fp8/llama3_fp8_fsdp_sft.yaml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FP8 training example with FSDP
2
+ # This config demonstrates FP8 mixed precision training using HuggingFace Accelerate
3
+ # with FSDP for distributed training and float8 all-gather optimization
4
+
5
+ ### Model configuration
6
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
7
+ trust_remote_code: true
8
+
9
+ ### Method configuration
10
+ stage: sft
11
+ do_train: true
12
+ finetuning_type: full
13
+
14
+ ### Dataset configuration
15
+ dataset: identity
16
+ template: llama3
17
+ cutoff_len: 1024
18
+ max_samples: 1000
19
+ overwrite_cache: true
20
+ preprocessing_num_workers: 16
21
+
22
+ ### Output configuration
23
+ output_dir: saves/llama3-8b/fp8-fsdp/sft
24
+ logging_steps: 10
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+
29
+ ### Training configuration
30
+ per_device_train_batch_size: 1
31
+ gradient_accumulation_steps: 8
32
+ learning_rate: 5.0e-5
33
+ num_train_epochs: 3.0
34
+ lr_scheduler_type: cosine
35
+ warmup_ratio: 0.1
36
+ bf16: true
37
+
38
+ ### FP8 configuration
39
+ fp8: true
40
+ fp8_backend: torchao # Use TorchAO backend for FP8
41
+ fp8_enable_fsdp_float8_all_gather: true # Enable FSDP2 float8 all-gather optimization
42
+
43
+ ### FSDP configuration (using training arguments - no separate FSDP config file)
44
+ fsdp:
45
+ - full_shard
46
+ - auto_wrap
47
+ fsdp_transformer_layer_cls_to_wrap: LlamaDecoderLayer
48
+
49
+ ### Logging configuration
50
+ report_to: wandb
51
+ run_name: llama3_fp8_fsdp_sft
examples/extras/fsdp_qlora/llama3_lora_sft.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ quantization_bit: 4
4
+ trust_remote_code: true
5
+
6
+ ### method
7
+ stage: sft
8
+ do_train: true
9
+ finetuning_type: lora
10
+ lora_rank: 8
11
+ lora_target: all
12
+
13
+ ### dataset
14
+ dataset: identity,alpaca_en_demo
15
+ template: llama3
16
+ cutoff_len: 2048
17
+ max_samples: 1000
18
+ overwrite_cache: true
19
+ preprocessing_num_workers: 16
20
+ dataloader_num_workers: 4
21
+
22
+ ### output
23
+ output_dir: saves/llama3-8b/lora/sft
24
+ logging_steps: 10
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+ save_only_model: false
29
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
30
+
31
+ ### train
32
+ per_device_train_batch_size: 1
33
+ gradient_accumulation_steps: 8
34
+ learning_rate: 1.0e-4
35
+ num_train_epochs: 3.0
36
+ lr_scheduler_type: cosine
37
+ warmup_ratio: 0.1
38
+ bf16: true
39
+ ddp_timeout: 180000000
40
+
41
+ ### eval
42
+ # val_size: 0.1
43
+ # per_device_eval_batch_size: 1
44
+ # eval_strategy: steps
45
+ # eval_steps: 500
examples/extras/fsdp_qlora/train.sh ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # DO NOT use GPTQ/AWQ model in FSDP+QLoRA
3
+
4
+ CUDA_VISIBLE_DEVICES=0,1 accelerate launch \
5
+ --config_file examples/accelerate/fsdp_config.yaml \
6
+ src/train.py examples/extras/fsdp_qlora/llama3_lora_sft.yaml
examples/extras/galore/llama3_full_sft.yaml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_galore: true
10
+ galore_layerwise: true # choices: [true, false], use false for DDP training
11
+ galore_target: all
12
+ galore_rank: 128
13
+ galore_scale: 2.0
14
+
15
+ ### dataset
16
+ dataset: identity,alpaca_en_demo
17
+ template: llama3
18
+ cutoff_len: 2048
19
+ max_samples: 1000
20
+ overwrite_cache: true
21
+ preprocessing_num_workers: 16
22
+ dataloader_num_workers: 4
23
+
24
+ ### output
25
+ output_dir: saves/llama3-8b/full/sft
26
+ logging_steps: 10
27
+ save_steps: 500
28
+ plot_loss: true
29
+ overwrite_output_dir: true
30
+ save_only_model: false
31
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
32
+
33
+ ### train
34
+ per_device_train_batch_size: 1
35
+ gradient_accumulation_steps: 1 # use 1 for layerwise galore
36
+ learning_rate: 1.0e-5
37
+ num_train_epochs: 3.0
38
+ lr_scheduler_type: cosine
39
+ warmup_ratio: 0.1
40
+ pure_bf16: true
41
+ ddp_timeout: 180000000
42
+
43
+ ### eval
44
+ # val_size: 0.1
45
+ # per_device_eval_batch_size: 1
46
+ # eval_strategy: steps
47
+ # eval_steps: 500
examples/extras/llama_pro/expand.sh ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ python scripts/llama_pro.py \
4
+ --model_name_or_path meta-llama/Meta-Llama-3-8B-Instruct \
5
+ --output_dir models/llama3-8b-pro \
6
+ --num_expand 8
examples/extras/llama_pro/llama3_freeze_sft.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: models/llama3-8b-pro
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: freeze
9
+ freeze_trainable_layers: 8
10
+ freeze_trainable_modules: all
11
+ use_llama_pro: true
12
+
13
+ ### dataset
14
+ dataset: identity,alpaca_en_demo
15
+ template: llama3
16
+ cutoff_len: 2048
17
+ max_samples: 1000
18
+ overwrite_cache: true
19
+ preprocessing_num_workers: 16
20
+ dataloader_num_workers: 4
21
+
22
+ ### output
23
+ output_dir: saves/llama3-8b-pro/freeze/sft
24
+ logging_steps: 10
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+ save_only_model: false
29
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
30
+
31
+ ### train
32
+ per_device_train_batch_size: 1
33
+ gradient_accumulation_steps: 8
34
+ learning_rate: 1.0e-4
35
+ num_train_epochs: 3.0
36
+ lr_scheduler_type: cosine
37
+ warmup_ratio: 0.1
38
+ bf16: true
39
+ ddp_timeout: 180000000
40
+
41
+ ### eval
42
+ # val_size: 0.1
43
+ # per_device_eval_batch_size: 1
44
+ # eval_strategy: steps
45
+ # eval_steps: 500
examples/extras/loraplus/llama3_lora_sft.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: lora
9
+ lora_rank: 8
10
+ lora_target: all
11
+ loraplus_lr_ratio: 16.0
12
+
13
+ ### dataset
14
+ dataset: identity,alpaca_en_demo
15
+ template: llama3
16
+ cutoff_len: 2048
17
+ max_samples: 1000
18
+ overwrite_cache: true
19
+ preprocessing_num_workers: 16
20
+ dataloader_num_workers: 4
21
+
22
+ ### output
23
+ output_dir: saves/llama3-8b/lora/sft
24
+ logging_steps: 10
25
+ save_steps: 500
26
+ plot_loss: true
27
+ overwrite_output_dir: true
28
+ save_only_model: false
29
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
30
+
31
+ ### train
32
+ per_device_train_batch_size: 1
33
+ gradient_accumulation_steps: 8
34
+ learning_rate: 1.0e-4
35
+ num_train_epochs: 3.0
36
+ lr_scheduler_type: cosine
37
+ warmup_ratio: 0.1
38
+ bf16: true
39
+ ddp_timeout: 180000000
40
+
41
+ ### eval
42
+ # val_size: 0.1
43
+ # per_device_eval_batch_size: 1
44
+ # eval_strategy: steps
45
+ # eval_steps: 500
examples/extras/mod/llama3_full_sft.yaml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ mixture_of_depths: convert
10
+
11
+ ### dataset
12
+ dataset: identity,alpaca_en_demo
13
+ template: llama3
14
+ cutoff_len: 2048
15
+ max_samples: 1000
16
+ overwrite_cache: true
17
+ preprocessing_num_workers: 16
18
+ dataloader_num_workers: 4
19
+
20
+ ### output
21
+ output_dir: saves/llama3-8b-mod/full/sft
22
+ logging_steps: 10
23
+ save_steps: 500
24
+ plot_loss: true
25
+ overwrite_output_dir: true
26
+ save_only_model: false
27
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
28
+
29
+ ### train
30
+ per_device_train_batch_size: 1
31
+ gradient_accumulation_steps: 8
32
+ optim: paged_adamw_8bit
33
+ learning_rate: 1.0e-5
34
+ num_train_epochs: 3.0
35
+ lr_scheduler_type: cosine
36
+ warmup_ratio: 0.1
37
+ pure_bf16: true
38
+ ddp_timeout: 180000000
39
+
40
+ ### eval
41
+ # val_size: 0.1
42
+ # per_device_eval_batch_size: 1
43
+ # eval_strategy: steps
44
+ # eval_steps: 500
examples/extras/multi_tokens/tokens_cfg.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SVG Container Tags
2
+ "<|START_OF_SVG|>": "Marks the beginning of an SVG document"
3
+ "<|END_OF_SVG|>": "Marks the end of an SVG document"
4
+
5
+ # SVG Group Tags
6
+ "<|start_of_g|>": "Begins a group element in SVG for organizing related shapes"
7
+ "<|end_of_g|>": "Ends a group element"
8
+
9
+ # SVG Shape Tags
10
+ "<|start_of_rect|>": "Begins a rectangle shape with width and height attributes"
11
+ "<|end_of_rect|>": "Ends a rectangle shape definition"
12
+ "<|start_of_circle|>": "Begins a circular shape with radius attribute"
13
+ "<|end_of_circle|>": "Ends a circular shape definition"
14
+ "<|start_of_path|>": "Begins a path element for drawing custom vector graphics"
15
+ "<|end_of_path|>": "Ends a path element definition"
16
+ "<|start_of_ellipse|>": "Begins an ellipse shape with x and y radii"
17
+ "<|end_of_ellipse|>": "Ends an ellipse shape definition"
18
+
19
+ # SVG Text Tags
20
+ "<|start_of_text|>": "Begins a text element for rendering text content"
21
+ "<|end_of_text|>": "Ends a text element"
22
+
23
+ # SVG Style Tags
24
+ "<|start_of_style|>": "Begins a style definition block for CSS styling"
25
+ "<|end_of_style|>": "Ends a style definition block"
examples/extras/muon/qwen2_full_sft.yaml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: Qwen/Qwen2-1.5B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: full
9
+ use_muon: true
10
+
11
+ ### dataset
12
+ dataset: identity,alpaca_en_demo
13
+ template: qwen
14
+ cutoff_len: 2048
15
+ max_samples: 1000
16
+ overwrite_cache: true
17
+ preprocessing_num_workers: 16
18
+ dataloader_num_workers: 4
19
+
20
+ ### output
21
+ output_dir: saves/qwen2-1_5b/full/sft
22
+ logging_steps: 10
23
+ save_steps: 500
24
+ plot_loss: true
25
+ overwrite_output_dir: true
26
+ save_only_model: false
27
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
28
+
29
+ ### train
30
+ per_device_train_batch_size: 1
31
+ gradient_accumulation_steps: 8
32
+ learning_rate: 1.0e-5
33
+ num_train_epochs: 3.0
34
+ lr_scheduler_type: cosine
35
+ warmup_ratio: 0.1
36
+ bf16: true
37
+ ddp_timeout: 180000000
38
+
39
+ ### eval
40
+ # val_size: 0.1
41
+ # per_device_eval_batch_size: 1
42
+ # eval_strategy: steps
43
+ # eval_steps: 500
examples/extras/nlg_eval/llama3_lora_predict.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The batch generation can be SLOW using this config.
2
+ # For faster inference, we recommend to use `scripts/vllm_infer.py`.
3
+
4
+ ### model
5
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
6
+ adapter_name_or_path: saves/llama3-8b/lora/sft
7
+ trust_remote_code: true
8
+
9
+ ### method
10
+ stage: sft
11
+ do_predict: true
12
+ finetuning_type: lora
13
+
14
+ ### dataset
15
+ eval_dataset: identity,alpaca_en_demo
16
+ template: llama3
17
+ cutoff_len: 2048
18
+ max_samples: 50
19
+ overwrite_cache: true
20
+ preprocessing_num_workers: 16
21
+ dataloader_num_workers: 4
22
+
23
+ ### output
24
+ output_dir: saves/llama3-8b/lora/predict
25
+ overwrite_output_dir: true
26
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
27
+
28
+ ### eval
29
+ per_device_eval_batch_size: 1
30
+ predict_with_generate: true
31
+ ddp_timeout: 180000000
examples/extras/oft/llama3_oft_sft.yaml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: oft
9
+ oft_block_size: 32
10
+ oft_target: all
11
+
12
+ ### dataset
13
+ dataset: identity,alpaca_en_demo
14
+ template: llama3
15
+ cutoff_len: 2048
16
+ max_samples: 1000
17
+ overwrite_cache: true
18
+ preprocessing_num_workers: 16
19
+ dataloader_num_workers: 4
20
+
21
+ ### output
22
+ output_dir: saves/llama3-8b/oft/sft
23
+ logging_steps: 10
24
+ save_steps: 500
25
+ plot_loss: true
26
+ overwrite_output_dir: true
27
+ save_only_model: false
28
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
29
+
30
+ ### train
31
+ per_device_train_batch_size: 1
32
+ gradient_accumulation_steps: 8
33
+ learning_rate: 1.0e-4
34
+ num_train_epochs: 3.0
35
+ lr_scheduler_type: cosine
36
+ warmup_ratio: 0.1
37
+ bf16: true
38
+ ddp_timeout: 180000000
39
+ resume_from_checkpoint: null
40
+
41
+ ### eval
42
+ # eval_dataset: alpaca_en_demo
43
+ # val_size: 0.1
44
+ # per_device_eval_batch_size: 1
45
+ # eval_strategy: steps
46
+ # eval_steps: 500
examples/extras/oft/qwen2_5vl_oft_sft.yaml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: Qwen/Qwen2.5-VL-7B-Instruct
3
+ image_max_pixels: 262144
4
+ video_max_pixels: 16384
5
+ trust_remote_code: true
6
+
7
+ ### method
8
+ stage: sft
9
+ do_train: true
10
+ finetuning_type: oft
11
+ oft_block_size: 32
12
+ oft_target: all
13
+
14
+ ### dataset
15
+ dataset: mllm_demo,identity,alpaca_en_demo # video: mllm_video_demo
16
+ template: qwen2_vl
17
+ cutoff_len: 2048
18
+ max_samples: 1000
19
+ overwrite_cache: true
20
+ preprocessing_num_workers: 16
21
+ dataloader_num_workers: 4
22
+
23
+ ### output
24
+ output_dir: saves/qwen2_5vl-7b/oft/sft
25
+ logging_steps: 10
26
+ save_steps: 500
27
+ plot_loss: true
28
+ overwrite_output_dir: true
29
+ save_only_model: false
30
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
31
+
32
+ ### train
33
+ per_device_train_batch_size: 1
34
+ gradient_accumulation_steps: 8
35
+ learning_rate: 1.0e-4
36
+ num_train_epochs: 3.0
37
+ lr_scheduler_type: cosine
38
+ warmup_ratio: 0.1
39
+ bf16: true
40
+ ddp_timeout: 180000000
41
+ resume_from_checkpoint: null
42
+
43
+ ### eval
44
+ # val_size: 0.1
45
+ # per_device_eval_batch_size: 1
46
+ # eval_strategy: steps
47
+ # eval_steps: 500
examples/extras/pissa/init.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ python scripts/pissa_init.py \
4
+ --model_name_or_path meta-llama/Meta-Llama-3-8B-Instruct \
5
+ --output_dir models/llama3-8b-pissa
examples/extras/pissa/llama3_lora_sft.yaml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
3
+ trust_remote_code: true
4
+
5
+ ### method
6
+ stage: sft
7
+ do_train: true
8
+ finetuning_type: lora
9
+ lora_rank: 8
10
+ lora_target: all
11
+ pissa_init: true
12
+ pissa_iter: 16
13
+ pissa_convert: true
14
+
15
+ ### dataset
16
+ dataset: identity,alpaca_en_demo
17
+ template: llama3
18
+ cutoff_len: 2048
19
+ max_samples: 1000
20
+ overwrite_cache: true
21
+ preprocessing_num_workers: 16
22
+ dataloader_num_workers: 4
23
+
24
+ ### output
25
+ output_dir: saves/llama3-8b/lora/sft
26
+ logging_steps: 10
27
+ save_steps: 500
28
+ plot_loss: true
29
+ overwrite_output_dir: true
30
+ save_only_model: false
31
+ report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
32
+
33
+ ### train
34
+ per_device_train_batch_size: 1
35
+ gradient_accumulation_steps: 8
36
+ learning_rate: 1.0e-4
37
+ num_train_epochs: 3.0
38
+ lr_scheduler_type: cosine
39
+ warmup_ratio: 0.1
40
+ bf16: true
41
+ ddp_timeout: 180000000
42
+
43
+ ### eval
44
+ # val_size: 0.1
45
+ # per_device_eval_batch_size: 1
46
+ # eval_strategy: steps
47
+ # eval_steps: 500