p1k0 commited on
Commit
a33b6ef
·
verified ·
1 Parent(s): 8d10ffb

Upload 2 files

Browse files
qwen2vl_lora_sft.yaml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: /mnt/data/users/liamding/data/models/Qwen2.5-VL-3B-Instruct
3
+ # image_max_pixels: 262144
4
+ # image_max_pixels: 401408
5
+ # image_max_pixels: 1003520
6
+ image_max_pixels: 802816
7
+ video_max_pixels: 16384
8
+ trust_remote_code: true
9
+
10
+ ### method
11
+ stage: sft
12
+ do_train: true
13
+ finetuning_type: lora
14
+ # lora_rank: 8
15
+ lora_rank: 16
16
+ lora_alpha: 32
17
+ lora_target: all
18
+ lora_dropout: 0.1
19
+
20
+ ### dataset
21
+ dataset: ocrmt30k_train_ocr_mt # video: mllm_video_demo
22
+ eval_dataset: ocrmt30k_val_ocr_mt
23
+ template: qwen2_vl
24
+ cutoff_len: 4096
25
+ # max_samples: 1000
26
+ overwrite_cache: true
27
+ preprocessing_num_workers: 16
28
+ dataloader_num_workers: 4
29
+
30
+ ### output
31
+ output_dir: saves/qwen2_vl-3b_ocrmt/lora/sft
32
+ logging_steps: 10
33
+ save_steps: 1000
34
+ plot_loss: true
35
+ overwrite_output_dir: true
36
+ save_only_model: false
37
+ report_to: wandb
38
+
39
+ ### train
40
+ per_device_train_batch_size: 4
41
+ gradient_accumulation_steps: 8
42
+ # learning_rate: 1.0e-4
43
+ learning_rate: 2.0e-5
44
+ num_train_epochs: 3.0
45
+ lr_scheduler_type: cosine
46
+ warmup_ratio: 0.1
47
+ # warmup_ratio: 0.2
48
+ bf16: true
49
+ ddp_timeout: 180000000
50
+ resume_from_checkpoint: null
51
+
52
+ ### eval
53
+ per_device_eval_batch_size: 1
54
+ eval_strategy: steps
55
+ eval_steps: 125
qwen2vl_lora_sft_mit10.yaml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### model
2
+ model_name_or_path: /mnt/data/users/liamding/data/models/Qwen2.5-VL-7B-Instruct
3
+ # image_max_pixels: 262144
4
+ # image_max_pixels: 401408
5
+ # image_max_pixels: 1003520
6
+ image_max_pixels: 802816
7
+ video_max_pixels: 16384
8
+ trust_remote_code: true
9
+
10
+ ### method
11
+ stage: sft
12
+ do_train: true
13
+ finetuning_type: lora
14
+ # lora_rank: 8
15
+ lora_rank: 16
16
+ lora_alpha: 32
17
+ lora_target: all
18
+ lora_dropout: 0.2
19
+ deepspeed: examples/deepspeed/ds_z2_config.json # choices: [ds_z0_config.json, ds_z2_config.json, ds_z3_config.json]
20
+
21
+ ### dataset
22
+ dataset: mit10_train_de, mit10_train_en, mit10_train_es, mit10_train_fr, mit10_train_it, mit10_train_ja, mit10_train_pt, mit10_train_zh
23
+ eval_dataset: mit10_val_de, mit10_val_en, mit10_val_es, mit10_val_fr, mit10_val_it, mit10_val_ja, mit10_val_pt, mit10_val_zh
24
+ template: qwen2_vl
25
+ cutoff_len: 4096
26
+ # max_samples: 1000
27
+ overwrite_cache: true
28
+ preprocessing_num_workers: 16
29
+ dataloader_num_workers: 4
30
+
31
+ ### output
32
+ output_dir: dummy
33
+ logging_steps: 10
34
+ save_steps: 1000
35
+ plot_loss: true
36
+ overwrite_output_dir: true
37
+ save_only_model: false
38
+ report_to: none
39
+
40
+ ### train
41
+ per_device_train_batch_size: 4
42
+ gradient_accumulation_steps: 8 #两张卡8,8张卡2
43
+ # learning_rate: 1.0e-4
44
+ learning_rate: 1.0e-5
45
+ num_train_epochs: 3.0
46
+ lr_scheduler_type: cosine
47
+ # warmup_ratio: 0.1
48
+ warmup_ratio: 0.2
49
+ bf16: true
50
+ ddp_timeout: 180000000
51
+ resume_from_checkpoint: null
52
+ weight_decay: 0.01
53
+
54
+ ### eval
55
+ per_device_eval_batch_size: 1
56
+ eval_strategy: steps
57
+ eval_steps: 250