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

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

tune_yaml样例模板

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

# 全参
finetuning_type: full

# lora
# finetuning_type: lora
# lora_target: all

deepspeed: examples/deepspeed/ds_z3_config.json
### dataset
dataset: identity,alpaca_en_demo
dataset_dir: /home/ma-user/ws/llm_train/LLaMAFactory/LLaMA-Factory/data 
template: qwen
cutoff_len: 4096
packing: true
max_samples: 100000
overwrite_cache: true
preprocessing_num_workers: 16
dataloader_num_workers: 8
### output
output_dir: /home/ma-user/ws/saves/tune/Qwen2-72B/sft
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: 2.0e-5
num_train_epochs: 10.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_91040.html