Upload ms-swift/examples/train/base_to_chat/full.sh with huggingface_hub
Browse files
ms-swift/examples/train/base_to_chat/full.sh
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
nproc_per_node=2
|
| 2 |
+
|
| 3 |
+
CUDA_VISIBLE_DEVICES=0,1 \
|
| 4 |
+
NPROC_PER_NODE=$nproc_per_node \
|
| 5 |
+
swift sft \
|
| 6 |
+
--model Qwen/Qwen2.5-1.5B \
|
| 7 |
+
--train_type full \
|
| 8 |
+
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
|
| 9 |
+
'AI-ModelScope/alpaca-gpt4-data-en#500' \
|
| 10 |
+
'swift/self-cognition' \
|
| 11 |
+
--torch_dtype bfloat16 \
|
| 12 |
+
--num_train_epochs 10 \
|
| 13 |
+
--per_device_train_batch_size 1 \
|
| 14 |
+
--per_device_eval_batch_size 1 \
|
| 15 |
+
--learning_rate 1e-5 \
|
| 16 |
+
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \
|
| 17 |
+
--eval_steps 200 \
|
| 18 |
+
--save_steps 200 \
|
| 19 |
+
--save_total_limit 2 \
|
| 20 |
+
--logging_steps 5 \
|
| 21 |
+
--max_length 2048 \
|
| 22 |
+
--output_dir output \
|
| 23 |
+
--system 'You are a helpful assistant.' \
|
| 24 |
+
--warmup_ratio 0.05 \
|
| 25 |
+
--dataloader_num_workers 4 \
|
| 26 |
+
--model_author swift \
|
| 27 |
+
--model_name swift-robot \
|
| 28 |
+
--deepspeed zero2
|