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

时间:2024-12-17 18:06:50

dpo_yaml样例模板

### model
model_name_or_path: /home/ma-user/ws/tokenizers/Qwen2-72B
### method
stage: dpo
do_train: true

# lora
finetuning_type: lora
lora_target: all

pref_beta: 0.1
pref_loss: sigmoid
deepspeed: examples/deepspeed/ds_z3_config.json
### dataset
dataset: dpo_en_demo
dataset_dir: /home/ma-user/ws/llm_train/LLaMAFactory/LLaMA-Factory/data 
template: qwen
cutoff_len: 4096
packing: true
max_samples: 50000
overwrite_cache: true
preprocessing_num_workers: 16
### output
output_dir: /home/ma-user/ws/saves/dpo/llama3-8b/lora
logging_steps: 2
save_steps: 5000
plot_loss: true
overwrite_output_dir: true
### train
per_device_train_batch_size: 1
gradient_accumulation_steps: 8
learning_rate: 5.0e-6
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
flash_attn: sdpa
ddp_timeout: 180000000
include_tokens_per_second: true
include_num_input_tokens_seen: true
support.huaweicloud.com/bestpractice-modelarts/modelarts_llm_train_91140.html