# Copyright (c) 2025, Shanghai Iluvatar CoreX Semiconductor Co., Ltd.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.


formatted_time=$(date +"%Y%m%d%H%M%S")
echo $formatted_time


deepspeed --num_gpus 16 finetune.py \
    --model_name_or_path OpenBMB/MiniCPM-2B-sft-bf16 \
    --output_dir output/AdvertiseGenSFT/$formatted_time/ \
    --train_data_path data/kto_en_demo.json \
    --eval_data_path data/kto_en_demo.json \
    --learning_rate 5e-5 --per_device_train_batch_size 4 \
    --per_device_eval_batch_size 4 --bf16 \
    --gradient_accumulation_steps 2 --warmup_steps 100 \
    --max_steps 3000 --weight_decay 0.01 \
    --evaluation_strategy steps --eval_steps 10 \
    --save_strategy steps --save_steps 500 --seed 42 \
    --log_level info --logging_strategy steps --logging_steps 10 \
    --deepspeed configs/ds_config_zero2.json



