Upload ms-swift/examples/train/agent/train.sh with huggingface_hub
Browse files
ms-swift/examples/train/agent/train.sh
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 24GB
|
| 2 |
+
CUDA_VISIBLE_DEVICES=0 \
|
| 3 |
+
swift sft \
|
| 4 |
+
--model Qwen/Qwen2.5-3B \
|
| 5 |
+
--template default \
|
| 6 |
+
--train_type lora \
|
| 7 |
+
--dataset iic/ms_agent \
|
| 8 |
+
--loss_scale react \
|
| 9 |
+
--tools_prompt react_en \
|
| 10 |
+
--torch_dtype bfloat16 \
|
| 11 |
+
--num_train_epochs 1 \
|
| 12 |
+
--per_device_train_batch_size 1 \
|
| 13 |
+
--per_device_eval_batch_size 1 \
|
| 14 |
+
--learning_rate 1e-4 \
|
| 15 |
+
--lora_rank 8 \
|
| 16 |
+
--lora_alpha 32 \
|
| 17 |
+
--target_modules all-linear \
|
| 18 |
+
--gradient_accumulation_steps 8 \
|
| 19 |
+
--eval_steps 50 \
|
| 20 |
+
--save_steps 50 \
|
| 21 |
+
--save_total_limit 2 \
|
| 22 |
+
--logging_steps 5 \
|
| 23 |
+
--max_length 8192 \
|
| 24 |
+
--packing true \
|
| 25 |
+
--use_liger_kernel true \
|
| 26 |
+
--output_dir output \
|
| 27 |
+
--warmup_ratio 0.05 \
|
| 28 |
+
--attn_impl flash_attn \
|
| 29 |
+
--dataloader_num_workers 4 \
|
| 30 |
+
--dataset_num_proc 16
|