forked from MakazhanAlpamys/Soup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdpo_chat.yaml
More file actions
43 lines (39 loc) · 916 Bytes
/
Copy pathdpo_chat.yaml
File metadata and controls
43 lines (39 loc) · 916 Bytes
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
# DPO Chat Example
# Train a chat model with Direct Preference Optimization.
# Uses Llama-2-7B-chat and preference data (prompt / chosen / rejected).
#
# The bundled dataset is a 5-row FORMAT sample, not a training set.
# Point `data.train` at your own preference pairs for a real run.
# See examples/data/README.md.
#
# Usage:
# soup train --config examples/configs/dpo_chat.yaml
base: meta-llama/Llama-2-7b-chat-hf
task: dpo
backend: transformers
data:
train: examples/data/chat_preferences.jsonl
format: dpo
max_length: 2048
training:
epochs: 2
lr: 5e-4
dpo_beta: 0.1
batch_size: 8
gradient_accumulation_steps: 2
quantization: 8bit
scheduler: cosine
warmup_ratio: 0.1
weight_decay: 0.01
logging_steps: 10
save_steps: 100
lora:
r: 64
alpha: 128
dropout: 0.05
target_modules:
- q_proj
- v_proj
- k_proj
- o_proj
output: ./output_dpo_chat/