yuccaaa commited on
Commit
e3e7330
·
verified ·
1 Parent(s): e3302af

Upload ms-swift/examples/train/lora_sft.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. ms-swift/examples/train/lora_sft.sh +28 -0
ms-swift/examples/train/lora_sft.sh ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 22GB
2
+ CUDA_VISIBLE_DEVICES=0 \
3
+ swift sft \
4
+ --model Qwen/Qwen2.5-7B-Instruct \
5
+ --train_type lora \
6
+ --dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
7
+ 'AI-ModelScope/alpaca-gpt4-data-en#500' \
8
+ 'swift/self-cognition#500' \
9
+ --torch_dtype bfloat16 \
10
+ --num_train_epochs 1 \
11
+ --per_device_train_batch_size 1 \
12
+ --per_device_eval_batch_size 1 \
13
+ --learning_rate 1e-4 \
14
+ --lora_rank 8 \
15
+ --lora_alpha 32 \
16
+ --target_modules all-linear \
17
+ --gradient_accumulation_steps 16 \
18
+ --eval_steps 50 \
19
+ --save_steps 50 \
20
+ --save_total_limit 2 \
21
+ --logging_steps 5 \
22
+ --max_length 2048 \
23
+ --output_dir output \
24
+ --system 'You are a helpful assistant.' \
25
+ --warmup_ratio 0.05 \
26
+ --dataloader_num_workers 4 \
27
+ --model_author swift \
28
+ --model_name swift-robot