
torchrun --nproc_per_node=4 --master_port=20001 fastchat/train/train_dpo.py \
    --model_name_or_path /.../.../.../model/TinyLlama-1.1B-Chat-v1.0 \
    --data_path "....../home/.../.../user/.../metadata/dpo-mix-7k" \
    --bf16 False \
    --output_dir output_vicuna \
    --num_train_epochs 5 \
    --per_device_train_batch_size 2 \
    --per_device_eval_batch_size 2 \
    --gradient_accumulation_steps 16 \
    --evaluation_strategy "no" \
    --save_strategy "steps" \
    --save_steps 1200 \
    --save_total_limit 10 \
    --learning_rate 2e-5 \
    --weight_decay 0. \
    --warmup_ratio 0.03 \
    --lr_scheduler_type "cosine" \
    --logging_steps 1 \
    --fsdp "full_shard auto_wrap" \
    --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
    --tf32 False \
    --model_max_length 2048 \
    --gradient_checkpointing True \
    --lazy_preprocess True \
    --report_to wandb
