Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: peft
|
3 |
+
base_model: paulml/OGNO-7B
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
推理配置需要注意的几个参数:
|
8 |
+
```
|
9 |
+
params = {
|
10 |
+
'temperature': 0.85,
|
11 |
+
'top_p': 0.95,
|
12 |
+
'top_k': 20,
|
13 |
+
'repetition_penalty': 1.18,
|
14 |
+
'max_tokens': 120,
|
15 |
+
'stop': ["\n", "\u200d"],
|
16 |
+
'typical_p': 0.95,
|
17 |
+
'n': 1,
|
18 |
+
}
|
19 |
+
```
|
20 |
+
|
21 |
+
Prompt模板格式
|
22 |
+
```
|
23 |
+
### Instruction:
|
24 |
+
|
25 |
+
<prompt> (without the <>)
|
26 |
+
|
27 |
+
### Response:
|
28 |
+
```
|
29 |
+
|
30 |
+
训练参数(使用Llama-Factory训练):
|
31 |
+
```
|
32 |
+
- learning_rate: 5e-05
|
33 |
+
- lr_scheduler_type: cosine
|
34 |
+
- per_device_train_batch_size: 1
|
35 |
+
- per_device_eval_batch_size: 1
|
36 |
+
- gradient_accumulation_steps: 4
|
37 |
+
- warmup_steps: 24
|
38 |
+
- num_train_epochs: 2
|
39 |
+
- template: alpaca
|
40 |
+
- cutoff_len: 2048
|
41 |
+
- finetuning_type: lora
|
42 |
+
- lora_target: q_proj,v_proj,o_proj,k_proj
|
43 |
+
- quantization_bit: 8
|
44 |
+
- lora_rank: 64
|
45 |
+
- lora_alpha: 16
|
46 |
+
- bf16: True
|
47 |
+
- logging_steps: 20
|
48 |
+
- val_size: 4
|
49 |
+
- save_steps: 200
|
50 |
+
```
|
51 |
+
|
52 |
+
训练prompt格式如下:
|
53 |
+
```python
|
54 |
+
system_prompt = '''You are now roleplaying as {Character Nickname}.
|
55 |
+
{character_msg}
|
56 |
+
Identity: Nurse
|
57 |
+
Categories: Erotica, Please use an {tone} tone
|
58 |
+
Personalities: {personalities}
|
59 |
+
```
|