File size: 3,950 Bytes
73e3ed7
 
 
 
 
 
 
 
 
 
 
 
41f25cf
 
 
 
cf58b3f
73e3ed7
b03a581
 
 
c60531a
 
22eea6c
c60531a
 
 
 
 
 
 
 
 
22eea6c
c60531a
 
e035801
c60531a
 
 
 
 
22eea6c
c60531a
 
e035801
 
c60531a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d1d27bb
c60531a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d1d27bb
c60531a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d1d27bb
c60531a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73e3ed7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
license: apache-2.0
datasets:
- REILX/neo_sft_phase2_conversations
- REILX/neo_sft_phase2_multi
- REILX/neo_sft_phase2_single
language:
- en
- zh
pipeline_tag: text-generation
tags:
- text-generation-inference
- qwen
- chat
- sft
- conversational
- lora
---
### 基础模型:
https://huggingface.co./Qwen/Qwen2-7B-Instruct

### 数据集

以 m-a-p/neo_sft_phase2 数据集为基石,构建了三个子数据集,分别如下:

1. REILX/neo_sft_phase2_conversations
2. REILX/neo_sft_phase2_multi
3. REILX/neo_sft_phase2_single

### 数据集构建规则

**REILX/neo_sft_phase2_conversations**

* **方法:** 将每轮对话视作独立的问答对,融入上下文信息构建样本。
* **具体步骤:**
    1. 针对每个“conversation”,逐一遍历其对话轮次。
    2. 将当前“human”轮次的“value”与之前所有轮次的对话内容拼接,构成完整的“instruction”。
    3. 将当前“gpt”轮次的“value”作为最终的“output”。
    4. “input”可为空白,亦可注入适当的提示信息。

**REILX/neo_sft_phase2_multi**

* **方法:** 将每轮对话视作独立的问答对,利用上下文信息构建样本。
* **具体步骤:**
    1. 针对每个“conversation”,逐一遍历其对话轮次。
    2. 将每个“conversation”中所有“human”的“value”拼接,构成完整的“instruction”。
    3. 将每个“conversation”中所有“gpt”的“value”拼接,构成最终的“output”。
    4. “input”可为空白,亦可注入适当的提示信息。

**REILX/neo_sft_phase2_single**

* **具体步骤:**
    1. 针对每个“conversation”,逐一遍历其对话轮次。
    2. 仅保留包含一轮对话的“conversation”,舍弃多轮对话数据。
    3. 将该“conversation”的“human”的“value”作为“instruction”。
    4. 将该“conversation”的“gpt”的“value”作为“output”。
    5. “input”可为空白,亦可注入适当的提示信息。


### 训练参数
REILX/neo_sft_phase2_conversations</br>
- learning_rate: 5e-06
- train_batch_size: 1
- eval_batch_size: 8
- cutoff_len:8192
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 8
- total_train_batch_size: 64
- total_eval_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 5.0

REILX/neo_sft_phase2_multi</br>
- learning_rate: 5e-05
- train_batch_size: 1
- eval_batch_size: 8
- cutoff_len:8192
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 8
- total_train_batch_size: 64
- total_eval_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 5.0

REILX/neo_sft_phase2_single</br>
- learning_rate: 5e-05
- train_batch_size: 1
- eval_batch_size: 8
- cutoff_len:4096
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 8
- total_train_batch_size: 64
- total_eval_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 5.0

### 损失图
REILX/neo_sft_phase2_conversations</br>
<!-- ![neo_sft_phase2_conversations_loss](./neo_sft_phase2_conversations/training_loss.png) -->
<img src="./neo_sft_phase2_conversations/training_loss.png" alt="neo_sft_phase2_conversations_loss" width="60%"> 

REILX/neo_sft_phase2_multi</br>
<!-- ![neo_sft_phase2_multi_loss](./neo_sft_phase2_multi/training_loss.png) -->
<img src="./neo_sft_phase2_multi/training_loss.png" alt="neo_sft_phase2_multi_loss" width="60%"> 

REILX/neo_sft_phase2_single</br>
<!-- ![neo_sft_phase2_single_loss](./neo_sft_phase2_single/training_loss.png) -->
<img src="./neo_sft_phase2_single/training_loss.png" alt="neo_sft_phase2_single_loss" width="60%">