AI开发平台MODELARTS-Yaml配置文件参数配置说明:ppo_yaml样例模板

时间:2024-12-09 20:36:29

ppo_yaml样例模板

### model
model_name_or_path: /home/ma-user/ws/tokenizers/llama3-8b
reward_model: /home/ma-user/ws/saves/rm/llama3-8b/lora
### method
stage: ppo
do_train: true

# 全参
# finetuning_type: full
# reward_model_type: full

# lora
finetuning_type: lora
lora_target: all

deepspeed: examples/deepspeed/ds_z0_config.json
### dataset
dataset: identity,alpaca_en_demo
template: llama3
cutoff_len: 4096
max_samples: 50000
overwrite_cache: true
preprocessing_num_workers: 16
packing: true
### output
output_dir: /home/ma-user/ws/saves/ppo/llama3-8b/lora
logging_steps: 1
save_steps: 500
plot_loss: true
overwrite_output_dir: true
### train
per_device_train_batch_size: 1
gradient_accumulation_steps: 8
learning_rate: 1.0e-5
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0
bf16: true
ddp_timeout: 180000000
flash_attn: sdpa
include_tokens_per_second: true
include_num_input_tokens_seen: true
### generate
max_new_tokens: 512
top_k: 0
top_p: 0.9
support.huaweicloud.com/bestpractice-modelarts/modelarts_llm_train_90930.html