Skip to content

Commit

Permalink
update readme hiyouga#313
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga committed Jul 28, 2023
1 parent 94ef179 commit 5ca1a60
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--save_steps 1000 \
--learning_rate 5e-5 \
--num_train_epochs 3.0 \
--plot_loss \
--fp16
```

Expand All @@ -170,6 +171,8 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--do_train \
--dataset comparison_gpt4_en \
--finetuning_type lora \
--resume_lora_training False \
--checkpoint_dir path_to_sft_checkpoint \
--output_dir path_to_rm_checkpoint \
--per_device_train_batch_size 4 \
--gradient_accumulation_steps 4 \
Expand All @@ -178,6 +181,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--save_steps 1000 \
--learning_rate 1e-5 \
--num_train_epochs 1.0 \
--plot_loss \
--fp16
```

Expand All @@ -201,7 +205,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--save_steps 1000 \
--learning_rate 1e-5 \
--num_train_epochs 1.0 \
--fp16
--plot_loss
```

### Evaluation (BLEU and ROUGE_CHINESE)
Expand Down
7 changes: 6 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--save_steps 1000 \
--learning_rate 5e-5 \
--num_train_epochs 3.0 \
--plot_loss \
--fp16
```

Expand All @@ -176,6 +177,8 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--do_train \
--dataset comparison_gpt4_zh \
--finetuning_type lora \
--resume_lora_training False \
--checkpoint_dir path_to_sft_checkpoint \
--output_dir path_to_rm_checkpoint \
--per_device_train_batch_size 4 \
--gradient_accumulation_steps 4 \
Expand All @@ -184,6 +187,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--save_steps 1000 \
--learning_rate 1e-5 \
--num_train_epochs 1.0 \
--plot_loss \
--fp16
```

Expand All @@ -196,6 +200,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--do_train \
--dataset alpaca_gpt4_zh \
--finetuning_type lora \
--resume_lora_training False \
--checkpoint_dir path_to_sft_checkpoint \
--reward_model path_to_rm_checkpoint \
--output_dir path_to_ppo_checkpoint \
Expand All @@ -206,7 +211,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--save_steps 1000 \
--learning_rate 1e-5 \
--num_train_epochs 1.0 \
--fp16
--plot_loss
```

### 指标评估(BLEU分数和汉语ROUGE分数)
Expand Down
14 changes: 8 additions & 6 deletions examples/covid_doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--dataset comparison_gpt4_zh \
--dataset_dir data \
--finetuning_type lora \
--resume_lora_training False \
--checkpoint_dir covid/sft \
--output_dir covid/rm \
--overwrite_cache \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--per_device_train_batch_size 2 \
--per_device_eval_batch_size 2 \
--gradient_accumulation_steps 8 \
--max_source_length 512 \
--max_target_length 512 \
--max_source_length 1024 \
--max_target_length 128 \
--lr_scheduler_type cosine \
--logging_steps 10 \
--save_steps 100 \
Expand Down Expand Up @@ -109,20 +111,20 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--dataset covid_train,covid_dev \
--dataset_dir data/covid \
--finetuning_type lora \
--resume_lora_training False \
--checkpoint_dir covid/sft \
--reward_model covid/rm \
--output_dir covid/ppo \
--overwrite_cache \
--per_device_train_batch_size 2 \
--gradient_accumulation_steps 4 \
--gradient_accumulation_steps 8 \
--max_source_length 256 \
--max_target_length 128 \
--lr_scheduler_type cosine \
--logging_steps 10 \
--save_steps 100 \
--learning_rate 1e-5 \
--num_train_epochs 5.0 \
--resume_lora_training False \
--plot_loss
```

Expand Down
2 changes: 1 addition & 1 deletion examples/quantized_finetune_with_local_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ CUDA_VISIBLE_DEVICES=0 python ../src/train_bash.py \
--save_steps 1000 \
--learning_rate 5e-5 \
--num_train_epochs 3.0 \
--quantization_bit 8 \
--quantization_bit 4 \
--plot_loss \
--fp16
2 changes: 2 additions & 0 deletions examples/train_rm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ CUDA_VISIBLE_DEVICES=0 python ../src/train_bash.py \
--dataset comparison_gpt4_zh \
--dataset_dir ../data \
--finetuning_type lora \
--resume_lora_training False \
--checkpoint_dir path_to_sft_checkpoint \
--output_dir path_to_rm_checkpoint \
--overwrite_cache \
--per_device_train_batch_size 2 \
Expand Down

0 comments on commit 5ca1a60

Please sign in to comment.