-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathrl.sh
More file actions
41 lines (38 loc) · 1.92 KB
/
rl.sh
File metadata and controls
41 lines (38 loc) · 1.92 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
#!/bin/bash
export NCCL_IB_DISABLE=1 # 完全禁用 IB/RoCE
for category in "Industrial_and_Scientific"; do
train_file=$(ls -f ./data/Amazon/train/${category}*.csv)
eval_file=$(ls -f ./data/Amazon/valid/${category}*11.csv)
info_file=$(ls -f ./data/Amazon/info/${category}*.txt)
HF_ENDPOINT=https://hf-mirror.com accelerate launch \
--config_file ./config/zero2_opt.yaml \
--num_processes 8 --main_process_port 29503 \
rl.py \
--model_path path_to_model \
--train_batch_size 64 \
--eval_batch_size 128 \
--num_train_epochs 2 \
--gradient_accumulation_steps 2 \
--train_file ${train_file} \
--eval_file ${eval_file} \
--info_file ${info_file} \
--category ${category} \
--sample_train False \
--eval_step 0.0999 \
--reward_type ranking \
--num_generations 16 \
--mask_all_zero False \
--dynamic_sampling False \
--sync_ref_model True \
--beam_search True \
--test_during_training False \
--temperature 1.0 \
--learning_rate 1e-5 \
--add_gt False \
--beta 1e-3 \
--dapo False \
--output_dir output_dir \
--wandb_run_name wandb_name \
--sid_index_path ./data/Amazon/index/Industrial_and_Scientific.index.json \
--item_meta_path ./data/Amazon/index/Industrial_and_Scientific.item.json
done