-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_small.sh
54 lines (52 loc) · 1.73 KB
/
train_small.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#SBATCH --job-name=run
#SBATCH --output=runs/run-log-%J.txt
#SBATCH --ntasks=10
#SBATCH -N 1
#SBATCH --time=1-00:00:00
#SBATCH --mem=50GB
#SBATCH --gres=gpu:a100:1
#SBATCH --partition=a100
#SBATCH --qos=a100_bowang
source /h/junma/.mvlm/bin/activate
# run "accelerate config" first!
JOB_ID=$SLURM_JOB_ID
PYTHONPATH=. accelerate launch --num_processes 1 --main_process_port 29510 LaMed/src/train/amos_train.py \
--version v0 \
--model_name_or_path microsoft/Phi-3-mini-4k-instruct \
--cache_dir /scratch/ssd004/datasets/med-img-data/amosmm/LaMed/ \
--model_type phi3 \
--lora_enable True \
--freeze_llm False \
--lora_r 16 \
--vision_tower vit3d \
--pretrain_vision_model /scratch/ssd004/datasets/med-img-data/amosmm/LaMed/M3D-CLIP/pretrained_ViT.bin \
--bf16 True \
--output_dir /scratch/ssd004/datasets/med-img-data/amosmm/trained/paper/phi3_150_i2f \
--num_train_epochs 150 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 1 \
--gradient_accumulation_steps 1 \
--evaluation_strategy "no" \
--do_eval False \
--eval_accumulation_steps 1 \
--eval_steps 0.99 \
--save_strategy "steps" \
--save_steps 20000 \
--save_total_limit 1 \
--learning_rate 5e-5 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 0.001 \
--gradient_checkpointing False \
--dataloader_pin_memory True \
--dataloader_num_workers 4 \
--report_to none \
--prompt "simple" \
--task i2f \
--json_path /fs01/home/junma/MedicalVLM/Data/AMOSMM.json \
--data_root /scratch/ssd004/datasets/med-img-data/amosmm \
--with_template True \
--image_size "32, 256, 256" \
--model_max_length 768