yuccaaa commited on
Commit
d6c3698
·
verified ·
1 Parent(s): ad45b24

Upload ms-swift/examples/notebook/qwen2_5-self-cognition/sft.sh with huggingface_hub

Browse files
ms-swift/examples/notebook/qwen2_5-self-cognition/sft.sh ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Here is the command-line style training code.
2
+ # 22GB
3
+ CUDA_VISIBLE_DEVICES=0 \
4
+ swift sft \
5
+ --model Qwen/Qwen2.5-3B-Instruct \
6
+ --train_type lora \
7
+ --dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
8
+ 'AI-ModelScope/alpaca-gpt4-data-en#500' \
9
+ 'swift/self-cognition#500' \
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 16 \
19
+ --eval_steps 50 \
20
+ --save_steps 50 \
21
+ --save_total_limit 2 \
22
+ --logging_steps 5 \
23
+ --max_length 2048 \
24
+ --output_dir output \
25
+ --system 'You are a helpful assistant.' \
26
+ --warmup_ratio 0.05 \
27
+ --dataloader_num_workers 4 \
28
+ --dataset_num_proc 4 \
29
+ --model_name 小黄 'Xiao Huang' \
30
+ --model_author '魔搭' 'ModelScope'