-
Notifications
You must be signed in to change notification settings - Fork 22
/
sft_retrieval_utility.json
executable file
·140 lines (140 loc) · 4.06 KB
/
sft_retrieval_utility.json
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"train_dataset_settings": {
"sources": [
{
"name": "chat_test",
"records_path": "tests/fixtures/datasets/chat/train_chat.jsonl",
"sample_rate": 1
}
],
"prompt_template": {
"role_tag_mapping": {
"bot": "<bot>",
"user": "<user>",
"system": "<system>"
},
"prefix_template": "<RS>{role}",
"suffix_template": "</RS>"
},
"dataset_type": "chat",
"max_tokens_count": 150,
"only_answer_loss": true
},
"val_dataset_settings": {
"sources": [
{
"name": "chat_test",
"records_path": "tests/fixtures/datasets/chat/train_chat.jsonl",
"sample_rate": 1
}
],
"prompt_template": {
"role_tag_mapping": {
"bot": "<bot>",
"user": "<user>",
"system": "<system>"
},
"prefix_template": "<RS>{role}",
"suffix_template": "</RS>"
},
"dataset_type": "chat",
"max_tokens_count": 150,
"only_answer_loss": true
},
"model_settings": {
"model_path": "tests/fixtures/models/llama2_tiny",
"model_type": "causal",
"resize_token_embeddings": true,
"transformers_settings": {
},
"peft_settings": {
"r": 8,
"lora_alpha": 16,
"lora_dropout": 0.05,
"target_modules": [
"q_proj",
"v_proj"
],
"task_type": "CAUSAL_LM",
"modules_to_save": ["embed_tokens", "lm_head"],
"name": "LORA"
},
"embeddings_initialization_strategy": {
"<RS>": "<s>",
"</RS>": "</s>",
"<bot>": "<unk>",
"<user>": "<unk>",
"<system>": "<unk>",
"<doc_sep>": "<sep>"
}
},
"cherry_pick_settings": {
"generator_transformers_settings": {
"num_beams": 3,
"stop_strings": ["</RS>", "</s>"],
"max_new_tokens": 8
},
"custom_generation_settings": {
"skip_special_tokens": false
},
"dataset_settings": {
"sources": [
{
"name": "chat_test",
"records_path": "tests/fixtures/datasets/chat/train_chat.jsonl",
"sample_rate": 1.0
}
],
"prompt_template": {
"role_tag_mapping": {
"bot": "<bot>",
"user": "<user>",
"system": "<system>"
},
"prefix_template": "<RS>{role}",
"suffix_template": "</RS>"
},
"dataset_type": "chat",
"max_tokens_count": 150,
"only_answer_loss": true
},
"metric_settings": [
{
"type": "retrieval_utility",
"parameters": {
"need_average": [true,false]
}
}
]
},
"tokenizer_settings": {},
"special_tokens_settings": {
"bos_token": "<s>",
"eos_token": "</s>",
"pad_token": "<pad>"
},
"trainer_settings": {
"evaluation_strategy": "steps",
"per_device_train_batch_size": 1,
"per_device_eval_batch_size": 1,
"gradient_accumulation_steps": 1,
"eval_steps": 1,
"save_steps": 1,
"logging_steps": 1,
"learning_rate": 0.0003,
"num_train_epochs": 2,
"lr_scheduler_type": "cosine",
"warmup_steps": 2,
"fp16": false,
"bf16": false,
"optim": "adamw_torch",
"save_total_limit": 1,
"no_cuda": true
},
"logging_settings": {
"project_name": "alignment",
"run_name": "sft_retrieval_utility",
"entity": "turbo-alignment"
},
"log_path": "test_sft_retrieval_utility_train_output"
}