forked from MakazhanAlpamys/Soup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrlhf_step3_ppo.yaml
More file actions
48 lines (44 loc) · 1.23 KB
/
Copy pathrlhf_step3_ppo.yaml
File metadata and controls
48 lines (44 loc) · 1.23 KB
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
# RLHF Step 3: PPO Training
# Optimize the policy with reinforcement learning against the reward model
# trained in step 2. Run rlhf_step2_reward.yaml first — `training.reward_model`
# points at its output directory.
#
# The bundled dataset is a 10-row FORMAT sample, not a training set.
# See examples/data/README.md.
#
# Usage:
# soup train --config examples/configs/rlhf_step3_ppo.yaml
base: TinyLlama/TinyLlama-1.1B-Chat-v1.0
task: ppo
backend: transformers
data:
train: examples/data/alpaca_tiny.jsonl
format: alpaca
# 512, not 2048: the longest row in any bundled fixture is ~233 tokens, so
# nothing is truncated and there is 2x headroom. A larger value only inflates
# the activation memory the VRAM pre-flight budgets for. Raise it when you
# point this config at longer data of your own.
max_length: 512
training:
epochs: 2
lr: 1e-5
batch_size: 4
gradient_accumulation_steps: 2
quantization: none
scheduler: cosine
warmup_ratio: 0.1
weight_decay: 0.01
logging_steps: 10
save_steps: 50
ppo_epochs: 4
ppo_clip_ratio: 0.2
ppo_kl_penalty: 0.05
reward_model: ./output_reward_model/
lora:
r: 64
alpha: 128
dropout: 0.05
target_modules:
- q_proj
- v_proj
output: ./output_ppo/